Platform-Game
Platform-Game copied to clipboard
Enemy Killed Animation
Enemy Killed Animation
Currently when the player character jumps on an enemy character it falls off the screen.
Create an animation that makes the enemy character explode instead of falling away every time there is a collision.
There are a number of JQuery plugins to help with sprite animation.
can we add a dissolving or fading effect?
@EdwardDunn since we are jumping on the enemies, why not squeeze them and make them fall to the ground? This can be done, quit simple, by changing height and using the function hitBottom. I can do a pull-request if you like to.
awesome first game, by the way!
I don't think you can easily use the Jquery animation tools typical for CSS animation since the sprites are using the Canvas object - antoschd probably has the easiest method.
I couldn't find anything that felt like a cool death animation here: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Advanced_animations
@antoschd Great idea, Its nice and simple but really adds to the game play. If other contributors want to create a more advanced animation that is fine but this is a good start. Go ahead and create a PR for your change.
I will keep this issue open for anyone who wants to keep working on animations.