Skip to content
Advertisement

Phaser3 framework javascript: current anims index

In phaser 3 framework, what syntax do I use to check the current frame index?

I want to make a hit area appear only when the player’s sprite sheet reaches a certain index(the index displaying the motion of ‘attack’). I want to accomplish this through detecting its current frame index.

How can I do this?

Advertisement

Answer

The solution is found. //hitbox solution: https://newdocs.phaser.io/docs/3.52.0/Phaser.Animations.Events.ANIMATION_COMPLETE_KEY

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement