Exemplo n.º 1
0
 public void NSwitch()
 {
     generator_now.Generate();
     cube_now = generator_now.cube.GetComponent <CubeBehavior>();
     if (cube_now.GetDir() == 0)
     {
         target = null;
     }
     else
     {
         target = generator_now.neighbors[cube_now.GetDir() - 1];
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     generator_now = StartGenerator.GetComponent <CubeGenerator> ();
     generator_now.SetMoving(true);
     cube_now = generator_now.cube.GetComponent <CubeBehavior>();
     if (cube_now.GetDir() == 0)
     {
         target = null;
     }
     else
     {
         target = generator_now.neighbors[cube_now.GetDir() - 1];
     }
 }
Exemplo n.º 3
0
 public void SwitchG(GameObject next_generator)
 {
     generator_now.SetMoving(false);
     next_generator.GetComponent <CubeGenerator> ().SetLast(generator_now.gameObject);
     generator_now = next_generator.GetComponent <CubeGenerator>();
     generator_now.SetMoving(true);
     cube_now = generator_now.cube.GetComponent <CubeBehavior>();
     if (cube_now.GetDir() == 0)
     {
         target = null;
     }
     else
     {
         target = generator_now.neighbors[cube_now.GetDir() - 1];
     }
 }