This is a state machine by Adam Roth for your Phaser Sprites. With it you can control the passage of the sprite through various states. In the example provided the dog sprite naturally moves through walking, laying down and sleeping, controlled via the state manager.