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.
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.