Esempio n. 1
0
    private void OnTriggerStay2D(Collider2D collision)
    {
        MushroomBlow mp = gameObject.GetComponentInParent <MushroomBlow>();

        if (mp != null)
        {
            mp.SetBlow(collision.gameObject);
        }
    }
Esempio n. 2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        MushroomBlow mp = gameObject.GetComponentInParent <MushroomBlow>();

        if (collision.gameObject.tag == "player")
        {
            collision.gameObject.GetComponent <PlayerControl>().SetCanJump(true);
        }

        if (mp != null)
        {
            mp.SetBlow(collision.gameObject);
        }
    }