Пример #1
0
    private void OnCollisionEnter2D(Collision2D c)
    {
        Mushroom mushroom = c.gameObject.GetComponent <Mushroom>();

        if (mushroom)
        {
            mushroom.Hit(1f);
        }
        Die();
    }