Create SingleTargeting

This commit is contained in:
henriquenakashima 2020-09-19 15:30:41 -04:00
parent 05fee309c3
commit 611601934d
6 changed files with 57 additions and 27 deletions

View file

@ -43,7 +43,7 @@ public class BattleController : MonoBehaviour
heroSprites[i].transform.position = new Vector3(-6 + 6 * i, 0, 0);
BattleParticipantSprite bps = heroSprites[i].AddComponent<BattleParticipantSprite>();
bps.Init(battlePlayerControls, heroes[i]);
bps.OnSpriteClicked += battlePlayerControls.OnParticipantSpriteClicked;
bps.OnSpriteClicked += battlePlayerControls.NotifyParticipantSpriteClicked;
heroUIs[i] = (HeroInfoUI) Instantiate(heroUIPrefab.gameObject, uiCanvas.transform).GetComponent(typeof(HeroInfoUI));
heroUIs[i].Init(heroSprites[i], heroes[i]);
@ -63,7 +63,7 @@ public class BattleController : MonoBehaviour
monsterSprites[i].transform.position = new Vector3(-6 + 6 * i, 3, 0);
BattleParticipantSprite bps = monsterSprites[i].AddComponent<BattleParticipantSprite>();
bps.Init(battlePlayerControls, monsters[i]);
bps.OnSpriteClicked += battlePlayerControls.OnParticipantSpriteClicked;
bps.OnSpriteClicked += battlePlayerControls.NotifyParticipantSpriteClicked;
monsterUIs[i] = (HeroInfoUI) Instantiate(heroUIPrefab.gameObject, uiCanvas.transform).GetComponent(typeof(HeroInfoUI));
monsterUIs[i].Init(monsterSprites[i], monsters[i]);