Ejemplo n.º 1
0
 public boatController(string size)
 {
     boat = Object.Instantiate(Resources.Load("prefabs/boat", typeof(GameObject))
                               , rightPos, Quaternion.identity, null) as GameObject;
     boat.name    = "boat";
     toSolveClick = boat.AddComponent(typeof(firstScenceSolveClick)) as firstScenceSolveClick;
     toSolveClick.setName(boat.name);
     updateBoatMove = boat.AddComponent(typeof(boatMoveBeahave)) as boatMoveBeahave;
     defaultSize    = size;
     this.size      = defaultSize;
 }
Ejemplo n.º 2
0
 public peopleController(string name, int number, Vector3 pos, string status, string size)
 {
     people = Object.Instantiate(Resources.Load("prefabs/" + name, typeof(GameObject))
                                 , pos, Quaternion.identity, null) as GameObject;
     people.name = name + number.ToString();
     solveClick  = people.AddComponent(typeof(firstScenceSolveClick)) as firstScenceSolveClick;
     solveClick.setName(people.name);
     this.number = number;
     this.status = status;
     defaultSize = size;
     this.size   = size;
 }