GreenFour / pencil-knight

TCSS 491 Computational Worlds project
MIT License
0 stars 1 forks source link

Actor "facingRight" state should be replaced by velocity #6

Closed pilocchii closed 6 years ago

pilocchii commented 6 years ago

The Actor.states.facingRight property should be removed. Instead, the direction the actor is facing can be gathered from a negative or positive horizontal velocity (or delta x). In a similar vein, jumping and falling and their related animations could be gathered by +/- delta y. This should reduce the amount of state-based flags actors deal with, and streamline the class.

All Actors and children of Actor need to be refactored to match.