How to Use State Machines to Control Behavior and Animations in Phaser

Suppose you’re building a platformer game, where the hero can walk, jump and attack. The hero can jump while standing or walking, but he can’t attack while jumping or walking. Also, the player can not jumping again while it is in the air (no double jumping). We can start implementing the hero code as below. … Read more