Re-add entity tick logic to BaseGame.Update() method #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The entity tick system was missing from the
BaseGame.Update()
method. WhileBaseGame.FrameUpdate()
correctly calls entity update logic viaTryCallMethodOnEntity("FrameUpdate")
, the tick-basedUpdate()
method was not calling the corresponding entity tick logic.This meant that:
Update()
methods were never being called during game ticksEvent.Tick
system was not being fired from the main game loopIActor
interface (missingFrameUpdate()
) and theActor
class implementation[Event.Tick]
decorated methods weren't executingSolution
Added the missing entity tick logic to
BaseGame.Update()
:Also updated the
IActor
interface to include theFrameUpdate()
method for consistency with theActor
implementation.Added comprehensive test coverage in
EntityTickTests.cs
to verify that:Update()
methods are called during ticks[Event.Tick]
decorated methods are properly invokedVerification
This change aligns with existing patterns:
BaseGame.FrameUpdate()
already usesTryCallMethodOnEntity("FrameUpdate")
Event.Run(assembly, Event.TickAttribute.Name)
afterUpdate()
Player
use bothFrameUpdate()
overrides and[Event.Tick]
decorated methodsThe fix restores proper entity tick functionality and transform interpolation for actors with minimal surgical changes (only 4 lines of code added) while maintaining full compatibility with existing entity implementations.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.