Display power buffs

This commit is contained in:
henriquenakashima 2020-10-10 21:49:04 -04:00
parent 515602b670
commit 034e6beca6
8 changed files with 86 additions and 25 deletions

View file

@ -7,6 +7,8 @@ public class HeroInfoUI : MonoBehaviour
{
protected GameObject target;
protected BattleParticipant battleParticipant;
protected BattleState battleState;
public Text nameText;
public Image healthBarBgImage;
public Image healthBarFgImage;
@ -24,11 +26,13 @@ public class HeroInfoUI : MonoBehaviour
private static Color MED_HP_COLOR = new Color(0.8f, 0.8f, 0f);
private static Color LOW_HP_COLOR = new Color(0.8f, 0f, 0f);
public void Init(GameObject sprite, BattleParticipant battleParticipant) {
public void Init(
GameObject sprite, BattleParticipant battleParticipant, BattleState battleState) {
this.target = sprite;
this.battleParticipant = battleParticipant;
this.battleState = battleState;
this.statusUI.Init(battleParticipant);
this.statusUI.Init(battleParticipant, battleState);
}
// Start is called before the first frame update