Beispiel #1
0
 void Start()
 {
     {
         GameObject blueTeam = new GameObject("BlueTeam");
         Model.Troop<Model.Marine> model = new Model.Troop<Model.Marine>(64);
         blueTeam.AddComponent<_blueTeam>().model = model;
     }
 }
Beispiel #2
0
 public Troop(Model.Troop <T> model, GameObject gameObject)
 {
     this.model      = model;
     this.gameObject = gameObject;
     foreach (T childModel in model)
     {
         GameObject childObject = (GameObject)Object.Instantiate(Resources.Load("SoldierBlue"));
         childObject.transform.parent = gameObject.transform;
         childObject.AddComponent <_blueSoldier>().model = childModel;
     }
 }