Пример #1
0
 void addUnitsToList(UnitVector l1, Unit[] l2)
 {
     foreach (Unit o in l2)
     {
         l1.add(o);
     }
 }
Пример #2
0
    public Unit generateTestTeam(GameObject x)
    {
        GameObject temp = GameObject.Instantiate(x);

        //TestUnit tempU = new TestUnit();
        temp.AddComponent <TestUnit>();
        temp.transform.position += new Vector3(1f, 1f, 0f);
        units.add(temp.GetComponent <TestUnit>());
        return(temp.GetComponent <TestUnit>());
    }