Closed ForNeVeR closed 1 year ago
Currently, we determine Player.Direction by the player velocity, and if the velocity is zero, then it defaults to Right.
Player.Direction
Right
We should preserve the last direction when the player stops.
See TODO[#xxx] in the code.
TODO[#xxx]
What about mutable field with previous direction value in Player type?
No mutable fields, the whole game engine should be immutable.
Currently, we determine
Player.Direction
by the player velocity, and if the velocity is zero, then it defaults toRight
.We should preserve the last direction when the player stops.
See
TODO[#xxx]
in the code.