Esempio n. 1
0
 void Start()
 {
     cube_Script       = FindObjectOfType <Cube_Test>();
     cast_Box_Pos_Cube = cube_Script.cast_Box_Pos;
     boxCollider       = cube_Script.boundry.GetComponent <BoxCollider>();
     if (this.transform.position.x > cast_Box_Pos_Cube.x)
     {
         cardinalDirectionNum = 1;
     }
     if (this.transform.position.x < cast_Box_Pos_Cube.x)
     {
         cardinalDirectionNum = 2;
     }
     if (this.transform.position.z > cast_Box_Pos_Cube.z)
     {
         cardinalDirectionNum = 3;
         this.transform.Rotate(0f, 90f, 0f);
     }
     if (this.transform.position.z < cast_Box_Pos_Cube.z)
     {
         cardinalDirectionNum = 4;
         this.transform.Rotate(0f, 90f, 0f);
     }
 }
Esempio n. 2
0
 void Start()
 {
     nitros_Cast_Vertical = FindObjectOfType <Cube_Test>();
     nitros_Movement      = FindObjectOfType <Nitros_Find>();
     game_Manage          = FindObjectOfType <Game_Manager>();
 }