Animation not working when code splited into modules

I was trying to break my code into modules. I was trying to get the following hierarchy -
Screenshot from 2023-01-11 00-27-09

Everything’s working i.e. sprite creation, movements, except animation.
One peculiar thing is the value of accumulator property in the sprite.anims is 0 when called in Character but have a value > 0 when called in the Game scene.

Heres a link to the code -

In movement() change to`${}-idle`, true);


1 Like

Real Thanks dude

1 Like