コード例 #1
0
    void OnCollisionEnter(Collision collision)
    {
        if (transform.parent == null)
        {
            return;
        }
        DoorController door = transform.parent.GetComponent <DoorController>();

        if (door != null)
        {
            door.ChildCollision(collision);
        }
    }