Hi, someone can help me please ? I’m new in phaser. I try to make a space shooter. I’d like to bring the ships back to the top of the screen when they explode. i arrive to make the animations of the explostion but after that the ships don’t appear again in the screen. i’m using this function.
resetShipPos(ship) {
ship.y = 0;
var randomX = Phaser.Math.Between(0, config.width);
ship.x = randomX;
}
destroyShip(pointer, gameObject) {
gameObject.setTexture("explosion");
gameObject.play("explode");
this.resetShipPos(ship);
}
someone have an idea