Display power buffs
This commit is contained in:
parent
515602b670
commit
034e6beca6
8 changed files with 86 additions and 25 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue