I’m not sure what the issue is, but all of my Sprite animations will not go passed the first frame and my tweens do not work. I am using Phaser 3.87.0.
For example, I have a Hero sprite, that has a 2 frame animation when moving left and right: khipugame/src/sprites/hero.js at 340e521eb8aeb9f7d5653a94b806255382ba69bf · mdbudnick/khipugame · GitHub but it will not cycle through the 2 frames. If I add randomFrame: true
, it will choose one of the frames, but they do not cycle.
The Hero’s animation is based on the velocity of the sprite, defined in this function: khipugame/src/sprites/hero.js at 340e521eb8aeb9f7d5653a94b806255382ba69bf · mdbudnick/khipugame · GitHub
Which is continuously called in the update right above: khipugame/src/sprites/hero.js at 340e521eb8aeb9f7d5653a94b806255382ba69bf · mdbudnick/khipugame · GitHub
The game can be playtested here: K'uychi Khipu Game and you will see that when you hit right and left, you will get one of the 2 frames for ‘run’, but it will never cycle through both.
I am having this issue with all my animations, Spider walking: khipugame/src/sprites/spider.js at 340e521eb8aeb9f7d5653a94b806255382ba69bf · mdbudnick/khipugame · GitHub
Coin rotation: khipugame/src/sprites/coin.js at 340e521eb8aeb9f7d5653a94b806255382ba69bf · mdbudnick/khipugame · GitHub
Even the tweens I’ve defined don’t work: khipugame/src/scenes/play.js at 340e521eb8aeb9f7d5653a94b806255382ba69bf · mdbudnick/khipugame · GitHub
There’s something fundamentally broken with the animations in my game, and I can’t figure it out.