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

@ -16,7 +16,7 @@ public class BattleSprites: MonoBehaviour
private Dictionary<BattleMonster, GameObject> mMonsterSprites;
private Dictionary<BattleMonster, HeroInfoUI> mMonsterUIs;
public void Init(BattleHero[] heroes, BattleMonster[] monsters) {
public void Init(BattleHero[] heroes, BattleMonster[] monsters, BattleState battleState) {
mHeroSprites = new Dictionary<BattleHero, GameObject>();
mHeroUIs = new Dictionary<BattleHero, HeroInfoUI>();
mMonsterSprites = new Dictionary<BattleMonster, GameObject>();
@ -35,7 +35,7 @@ public class BattleSprites: MonoBehaviour
hero.OnDeath += bps.NotifyDeath;
HeroInfoUI heroUI = (HeroInfoUI) Instantiate(mHeroUIPrefab.gameObject, mUiCanvas.transform).GetComponent(typeof(HeroInfoUI));
heroUI.Init(sprite, hero);
heroUI.Init(sprite, hero, battleState);
mHeroUIs[hero] = heroUI;
}
@ -52,7 +52,7 @@ public class BattleSprites: MonoBehaviour
monster.OnDeath += bps.NotifyDeath;
HeroInfoUI monsterUI = (HeroInfoUI) Instantiate(mHeroUIPrefab.gameObject, mUiCanvas.transform).GetComponent(typeof(HeroInfoUI));
monsterUI.Init(sprite, monster);
monsterUI.Init(sprite, monster, battleState);
mMonsterUIs[monster] = monsterUI;
}