Exemple #1
0
    void OnTriggerStay2D(Collider2D other)
    {
        if (Input.GetButtonUp("Fire2") && other == grannyCollider)
        {
            bool pickedUp = itemUse.HoldChocolate();

            if (pickedUp)
            {
                Destroy(gameObject);
            }
        }
    }