Name of map users

- Add name on user
 - Delete NonPlayer class not used
This commit is contained in:
gparant 2020-05-03 22:24:14 +02:00
parent 8355a89dc5
commit b65e37c468
10 changed files with 46 additions and 65 deletions

View file

@ -42,7 +42,11 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite {
if(this.bubble) {
this.bubble.moveBubble(this.x, this.y);
}
this.playerName.setPosition(this.x, this.y - 25);
this.updatePlayerNamePosition(this.x, this.y);
}
updatePlayerNamePosition(x: number, y: number){
this.playerName.setPosition(x, y - 25);
}
stop(){
@ -59,4 +63,9 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite {
this.bubble = null;
}, 3000)
}
destroy(fromScene?: boolean): void {
super.destroy(fromScene);
this.playerName.destroy();
}
}