void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Car" && !other.isTrigger) { //print(this.gameObject.name); thisCar = other.gameObject.GetComponent <superTurn>(); thisCar.wayCar2(this.gameObject.name); } }
void Start() { turnComponent = GetComponent <superTurn>(); moveCarComponent = GetComponent <moveCar>(); }