1 decade ago by ansimuz
Hi
What would be the best way to check and set an animation while the player is pushing an entity block?
What would be the best way to check and set an animation while the player is pushing an entity block?
This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact
player.is_pushing
. If so you could run a simple check in your player.update
method:if(this.is_pushing) this.currentAnim = this.anims.pushing; else this.currentAnim = this.anims.standing;
039;re colliding with is a block. You could then set #this.isPushing
, possibly with a direction as well (so you know to flip the animation).