From 39f1952f94f4a31378c70d0891a7b1c99f29586e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 11 May 2020 19:16:36 +0200 Subject: [PATCH] Putting player names depth at a high depth to have them always visible --- front/src/Phaser/Entity/PlayableCaracter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/Phaser/Entity/PlayableCaracter.ts b/front/src/Phaser/Entity/PlayableCaracter.ts index 33b5c3aa..c258a9fb 100644 --- a/front/src/Phaser/Entity/PlayableCaracter.ts +++ b/front/src/Phaser/Entity/PlayableCaracter.ts @@ -37,7 +37,7 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite { this.PlayerValue = name; this.PlayerTexture = texture; this.playerName = new BitmapText(scene, x, y - 25, 'main_font', name, 8); - this.playerName.setOrigin(0.5).setCenterAlign(); + this.playerName.setOrigin(0.5).setCenterAlign().setDepth(99999); scene.add.existing(this.playerName); this.scene.sys.updateList.add(this);