New answers tagged

0

don't use addlistener on the animation you can either 1) use on on your game object (Sprite) this.on('animationcomplete', this.arrow, this); https://phaser.io/examples/v3/view/animation/on-complete-callback or 2) use the .chain function https://phaser.io/examples/v3/view/animation/chained-animation


0

Note: This answer expands on https://gamedev.stackexchange.com/a/150166/35344. Let's take a player entity that has a few methods for movement: struct Player { void moveLeft() { xVel = -1 } void moveRight() { xVel = 1 } }; Then, with a setup such as the following, we can bind the movement methods to our callback manager (...


Top 50 recent answers are included