Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces significant improvements to how unit movement is rendered and how input events are handled in the client, focusing on smoother animations and better event consumption. The most important changes are grouped below by theme.
Input Event Handling
MouseUpEventnow includes aconsumedflag to indicate if the event has already been handled by a layer, preventing duplicate processing. The main game runner andUnitLayerboth respect this flag to ensure clicks are only processed once, improving interaction reliability. [1] [2] [3] [4] [5]Unit Animation and Rendering
UnitLayerto compute and render interpolated positions for selected unit types, resulting in much smoother animations. [1] [2] [3] [4] [5] [6] [7]Replay Speed Support
UnitLayer, allowing animation speed to adapt to replay controls. This includes event listening and tick interval adjustment. [1] [2] [3]Unit Selection and Click Consumption
Code Organization and Refactoring
drawSpriteAtPositionmethod, centralizing rendering details and supporting both interpolated and standard rendering flows.These changes collectively provide smoother unit movement, more robust input handling, and improved replay experience.