Ejemplo n.º 1
0
 public character_action_controller(boat_action_controller boat, int type)
 {
     this.character_type = type;
     this.coast_number   = type;
     this.boat           = boat;
     this.character      = Instantiate(Resources.Load(type == 0 ? "devil" : "hero")) as GameObject;
     Transform[] children = this.character.GetComponentsInChildren <Transform> ();
     children [1].GetComponent <character_action> ().setCharacterActionController(this);
     children [2].GetComponent <character_action> ().setCharacterActionController(this);
     isMoving = false;
     isOnBoat = false;
 }
Ejemplo n.º 2
0
 public void LoadResources()
 {
     Debug.Log("load resources");
     water_surface = Instantiate(Resources.Load("water_surface"), new Vector3(-1, 0, -1), Quaternion.identity) as GameObject;
     coasts        = new coast_action_controller[2];
     coasts [0]    = new coast_action_controller(new Vector3(-6, 0, 0), 0);
     coasts [1]    = new coast_action_controller(new Vector3(6, 0, 0), 1);
     boat          = new boat_action_controller(coasts);
     characters    = new character_action_controller[6];
     for (int i = 0; i < 6; i++)
     {
         characters [i] = new character_action_controller(boat, i % 2);
         coasts [i % 2].getOnCoast(characters [i]);
     }
 }
Ejemplo n.º 3
0
 public void setBoatActionController(boat_action_controller bac)
 {
     this.bac = bac;
 }
Ejemplo n.º 4
0
 public void setBoatController(boat_action_controller bc)
 {
     this.boat = bc;
 }