void OnCollisionEnter(Collision collision) { GameObject subject = collision.gameObject; PlayerController other = null; if (subject.tag == "Player") { other = subject.GetComponent <PlayerController>(); } else if (subject.tag == "Terrain") { return; } Debug.Log("[!] Collide with " + subject.name); if (null == Owner) { OnCollideWhileUnOwned(collision, other); } else if (other != Owner) { OnCollideWhileOwned(collision, other); } AudioEvents.Event("Crash"); }
public void OnCollisionEnter(Collision coll) { AudioEvents.Event("Crash"); }