Hello,
Followed the tutorial and then started hacking away to see if i could make a top-down 4 axis game.
Borrowed from a few bits of code on some other melonjs projects I came across and came up with this:
My problem at the moment is that the sprite sheet does not animate - instead it just sticks to the first frame, what i suspect is wrong is that I am setting
"this.renderable.setCurrentAnimation('up');" (same for left right and down)
every time a keypress is made - which, i figure resets the animation to the first frame I've specified in the init/constructor:
"this.renderable.addAnimation("up", [10,11,12,13,14]);"
So i need to keep track of which frame the animation should be on and have that persist across key presses/ticks of the game timer.
Any pointers?
Hoping to get these basics sorted and then get stuck into the engine itself
Cheers