deleteme Posted July 5, 2016 Share Posted July 5, 2016 Hey all! I'm having an issue where i'm trying to reset the player sprite, but it doesn't do anything, and the console yields no errors and i know i'm trying to reset the right thing. I recently grabbed a copy of Phaser 2.5, and yet if i switch back to the older phaser i was using (2.4.4) the reset i have works correctly. I'm a little stumped on what I'm missing here, any help would be appreciated! Link to comment Share on other sites More sharing options...
LTNGames Posted July 5, 2016 Share Posted July 5, 2016 If it works in previous versions than it may be a bug, other than that can't help you much without seeing a bit of your code. I would report it as a bug anyway considering it works for you in previous version. Bug report on github here: https://github.com/photonstorm/phaser/issues Link to comment Share on other sites More sharing options...
deleteme Posted July 5, 2016 Author Share Posted July 5, 2016 So I'm creating my player object and setting up some animations for him player = game.add.sprite(-40, game.world.height - 97, "DoomGuy"); player.animations.add("walk"); player.animations.play("walk", 4, true); player.anchor.setTo(0.5, 0.6); player.scale.setTo(0.7, 0.7); game.camera.follow(player); game.physics.arcade.enable(player); player.body.gravity.y = 680; player.body.collideWorldBounds = true; then later on say when the player is killed by an enemy or completes the level i want him to reset back to spawn and kill him so that i can display a score and i do this with thise line player.reset().kill(); Link to comment Share on other sites More sharing options...
Recommended Posts