コード例 #1
0
 void OnTriggerStay(Collider other)
 {
     if (alive)
     {
         if (other.gameObject.CompareTag("Car"))
         {
             carControl.SlowDown();
         }
         alive = carControl.IsMoving();
     }
 }
コード例 #2
0
 void OnTriggerStay(Collider other)
 {
     if (alive)
     {
         if (other.gameObject.CompareTag("Lane_Separator") || other.gameObject.CompareTag("Car"))
         {
             carControl.TurnLeft();
         }
         alive = carControl.IsMoving();
     }
 }