void setOpposition(GameObject g, iBattleable monster) { _ActiveOpposition = (GameObject)Instantiate(g, _MarkerActiveOpposition.transform.position, _MarkerActiveOpposition.transform.rotation); //battle unit ui GameObject unitUI = _UnitUIPool.GetPooledObject(); awakenUnitUI(unitUI, _MarkerActiveOpposition, _ActiveOpposition); _ActiveOppositionUI = unitUI.GetComponent <BattleUnitUI>(); _ActiveOppositionUI.AddUnit(monster); }
public void SetReserveOppositionC(MonsterType t, iBattleable monster) { GameObject g = _Monsters[(int)t]; _ReserveOppositionC = (GameObject)Instantiate(g, _MarkerReserveOppositionC.transform.position, _MarkerReserveOppositionC.transform.rotation); //battle unit ui GameObject unitUI = _UnitUIPool.GetPooledObject(); awakenUnitUI(unitUI, _MarkerReserveOppositionC, _ReserveOppositionC); _ReserveOppositionCUI = unitUI.GetComponent <BattleUnitUI>(); _ReserveOppositionCUI.AddUnit(monster); }
public void SetActiveUnit(Unit u, PlayerType p) { List <GameObject> prefabs = p == PlayerType.Battlebeard ? _BattlebeardUnits : _StormshaperUnits; _InstigatorPlayerUnit = (GameObject)Instantiate(prefabs[(int)u.Type], _MarkerActivePlayerUnit.transform.position, _MarkerActivePlayerUnit.transform.rotation); //battle unit ui GameObject unitUI = _UnitUIPool.GetPooledObject(); awakenUnitUI(unitUI, _MarkerActivePlayerUnit, _InstigatorPlayerUnit); _InstigatorPlayerUnitUI = unitUI.GetComponent <BattleUnitUI>(); _InstigatorPlayerUnitUI.AddUnit(u); }
public void SetReserveOppositionC(MonsterType t, iBattleable monster) { GameObject g = _Monsters[(int)t]; _ReserveOppositionC = (GameObject)Instantiate(g, _MarkerReserveOppositionC.transform.position, _MarkerReserveOppositionC.transform.rotation); //battle unit ui GameObject unitUI = _UnitUIPool.GetPooledObject(); awakenUnitUI(unitUI, _MarkerReserveOppositionC, _ReserveOppositionC); _ReserveOppositionCUI = unitUI.GetComponent<BattleUnitUI>(); _ReserveOppositionCUI.AddUnit(monster); }
void setOpposition(GameObject g, iBattleable monster) { _ActiveOpposition = (GameObject)Instantiate(g, _MarkerActiveOpposition.transform.position, _MarkerActiveOpposition.transform.rotation); //battle unit ui GameObject unitUI = _UnitUIPool.GetPooledObject(); awakenUnitUI(unitUI, _MarkerActiveOpposition, _ActiveOpposition); _ActiveOppositionUI = unitUI.GetComponent<BattleUnitUI>(); _ActiveOppositionUI.AddUnit(monster); }
public void SetActiveUnit(Unit u, PlayerType p) { List<GameObject> prefabs = p == PlayerType.Battlebeard ? _BattlebeardUnits : _StormshaperUnits; _InstigatorPlayerUnit = (GameObject)Instantiate(prefabs[(int)u.Type], _MarkerActivePlayerUnit.transform.position, _MarkerActivePlayerUnit.transform.rotation); //battle unit ui GameObject unitUI = _UnitUIPool.GetPooledObject(); awakenUnitUI(unitUI, _MarkerActivePlayerUnit, _InstigatorPlayerUnit); _InstigatorPlayerUnitUI = unitUI.GetComponent<BattleUnitUI>(); _InstigatorPlayerUnitUI.AddUnit(u); }