From 0fe1604ff27d87b751412bb076dadf533db5b44a Mon Sep 17 00:00:00 2001 From: Renge Date: Wed, 27 Apr 2022 22:09:14 -0400 Subject: [PATCH] feat: player dot stats ui --- src/shattered_sword/Scenes/GameLevel.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/shattered_sword/Scenes/GameLevel.ts b/src/shattered_sword/Scenes/GameLevel.ts index fc72c65..de10d02 100644 --- a/src/shattered_sword/Scenes/GameLevel.ts +++ b/src/shattered_sword/Scenes/GameLevel.ts @@ -463,6 +463,9 @@ export default class GameLevel extends Scene { this.healthBar.color = Color.RED; this.healthLabel.textColor = Color.RED; } + this.poisonStat.visible = playerAI.poisonCounter > 0 ? true : false; + this.burnStat.visible = playerAI.burnCounter > 0 ? true : false; + this.bleedStat.visible = playerAI.bleedCounter > 0 ? true : false; // this.healthLabel.sizeToText(); //update shield ui @@ -575,15 +578,15 @@ export default class GameLevel extends Scene { this.healthBar.borderWidth = 3; this.healthBar.color = Color.GREEN; - // this.poisonStat = this.add.sprite("poisoning", "UI"); - // this.poisonStat.position.set(55, 25); - // this.poisonStat.scale.set(0.3, 0.3); - // this.burnStat = this.add.sprite("burning", "UI"); - // this.burnStat.position.set(70, 25); - // this.burnStat.scale.set(0.3, 0.3); - // this.bleedStat = this.add.sprite("bleeding", "UI"); - // this.bleedStat.position.set(85, 25); - // this.bleedStat.scale.set(0.3, 0.3); + this.poisonStat = this.add.sprite("poisoning", "UI"); + this.poisonStat.position.set(25, 8); + this.poisonStat.scale.set(1, 1); + this.burnStat = this.add.sprite("burning", "UI"); + this.burnStat.position.set(40, 8); + this.burnStat.scale.set(1, 1); + this.bleedStat = this.add.sprite("bleeding", "UI"); + this.bleedStat.position.set(55, 8); + this.bleedStat.scale.set(1, 1); this.shieldLabel =