IEnumerator mapPlacer()
    {
        EventDriver eventDrivers = GameObject.FindObjectOfType <EventDriver>();

        enemyLeader = eventDrivers.FindParty();

        MCMove mcMove = GameObject.FindObjectOfType <MCMove>();

        enemyUnitParty  = GameObject.Find(enemyLeader).gameObject.GetComponent <UnitParty>();
        playerUnitParty = mcMove.gameObject.GetComponent <UnitParty>();
        List <string> newEnemyLocations  = CalcQuadEnemy();
        List <string> newPlayerLocations = CalcQuadPlayer();


        for (int j = 0; j < enemyUnitParty.enemyUnits.Count; j++)
        {
            Instantiate(enemyUnitParty.enemyUnits[j], GameObject.Find(newEnemyLocations[j]).transform.position + new Vector3(0, 1.4f, 0), setQuaterRotation(0, 0, 0));
            enemyUnitParty.enemyUnits[j].GetComponent <Stats>().levelBoost = enemyUnitParty.levelUP;
        }

        for (int i = 0; i < playerUnitParty.friendlyUnits.Count; i++)
        {
            Instantiate(playerUnitParty.friendlyUnits[i], GameObject.Find(newPlayerLocations[i]).transform.position + new Vector3(0, 1.4f, 0), setQuaterRotation(0, 0, 0));
        }
        goodGo = false;
        yield return(new WaitForSeconds(0.5f));

        gameObject.GetComponent <SpeedCenterTurns>().Ordering();
    }
Пример #2
0
 void Start()
 {
     unitParty = gameObject.GetComponent <UnitParty>();
     unitParty.FriendOrFoe(true);
     BuildPartyList();
     unitParty.CurrentParty(mainMCParty);
 }
Пример #3
0
 void Start()
 {
     unitParty = gameObject.GetComponent <UnitParty>();
     unitParty.FriendOrFoe(false);
     BuildPartyList();
     unitParty.CurrentParty(jimParty);
     unitParty.EnemyLevel(5);
 }