Example #1
0
 private void Start()
 {
     GameObject[]    r = GameObject.FindGameObjectsWithTag("StartingPipe");
     Object_Rotate[] t = new Object_Rotate[r.Length];
     for (int i = 0; i < r.Length; i++)
     {
         t[i] = r[i].GetComponent <Object_Rotate>();
     }
     StartingPippe = t[Random.Range(0, t.Length)];
     _currentPipe  = StartingPippe;
 }
Example #2
0
 void ChangeDirection(Direction a_Direction)
 {
     _currentAttachedPipe = (_currentAttachedPipe + 1) % AttachedPipes.Length;
     CurrentDirection     = a_Direction.OtherPipe;
     transform.rotation   = Quaternion.Euler(0, 0, a_Direction.Rotation.z);
 }
Example #3
0
 public void ChangePipe(Object_Rotate a_Pipe)
 {
     _currentPipe = a_Pipe;
 }