Jump to content

Phaser - How killed player and reset player on tilmap


sebastien-FR
 Share

Recommended Posts

(sorry, i speak english little bit) :mellow:

How killed player and reset player on tilemap :

"game.load.tilemap('level1', 'assets/games/starstruck/level1.json', null, Phaser.Tilemap.TILED_JSON);"


i tried :

player.kill();                      //its ok the player disappear
player.reset(55, 55);        //its ok the player reset at start position


but if i move the player right or low and if the scrolling work, there is bug when "player.reset(55, 55);".


I am novice, can you help me ? :)

Link to comment
Share on other sites

its ok, i found the problem.

its been at the bad place.

 

function enemykillplayer (player, enemy) {   // this is ok, no bug
 
    lives--;
     livesText.text = 'lives: ' + lives;

      player.kill();

      player.reset(32, 32);

 

}

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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