예제 #1
0
    void OnCollisionEnter(Collision collision)
    {
        if (bIsEaten || fm == null)
        {
            return;
        }

        if (collision.gameObject.tag != "Fish")
        {
            return;
        }

        fm.EatFood(this);
        bIsEaten = true;
    }