コード例 #1
0
    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);
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    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);
    }
コード例 #4
0
    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);
    }
コード例 #5
0
	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);
	}
コード例 #6
0
	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);
	}