// Called at the end of the program initialization void Start() { // Set initial state to open state = CougarState.Run; car = GameObject.Find("Classic_car_1955_style1"); pos = transform.position; rot = transform.rotation; }
void OnCollisionEnter(Collision collision) { // Cougar is dead GameObject obj = collision.gameObject; if (obj != car) { return; } state = CougarState.Dead; animator.speed = 0; }