Jump to content

How make an animation play before my character dies


Finwillwin
 Share

Recommended Posts

I'm trying to make my character have an animation before the game resets:

playerDie: function(){
    if(game.lives > 0){
        game.lives -= 1;
        player.animations.play('die');
        game.time.events.add(Phaser.Timer.SECOND * 10, player.kill);
    }
   

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...