public TankController(TankModel tankModel, TankView tankPrefab)
 {
     TankModel = tankModel;
     TankView  = Object.Instantiate(tankPrefab);
     TankView.Initalise(this);
     Debug.Log("tank view created", TankView);
 }
Ejemplo n.º 2
0
 public TankController(TankModel tankModel, TankView tankPrefab)
 {
     XPos      = Random.Range(40, -40);
     ZPos      = Random.Range(40, -40);
     TankModel = tankModel;
     TankView  = GameObject.Instantiate <TankView>(tankPrefab, new Vector3(XPos, 0f, ZPos), Quaternion.identity);
     // currentPosition =  this.TankView.transform.position;
     TankView.Init(this);
 }
Ejemplo n.º 3
0
 public void CreateTank(int index)
 {
     TankModel      model = new TankModel(tankList.tanks[index]);
     TankController tank  = new TankController(model, tankView);
 }