예제 #1
0
    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");
    }
예제 #2
0
 public void OnCollisionEnter(Collision coll)
 {
     AudioEvents.Event("Crash");
 }