void OnTriggerStay(Collider other) { if (alive) { if (other.gameObject.CompareTag("Car")) { carControl.SlowDown(); } alive = carControl.IsMoving(); } }
void OnTriggerStay(Collider other) { if (alive) { if (other.gameObject.CompareTag("Lane_Separator") || other.gameObject.CompareTag("Car")) { carControl.TurnLeft(); } alive = carControl.IsMoving(); } }