예제 #1
0
    void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == GameConstants.DEBRIS_TAG)
        {
            //find the collision point.
            ContactPoint cp = collision.contacts [0];

            Debris debris = collision.gameObject.GetComponent <Debris>();
            debris.Collect(cp.point, transform);
        }
    }