示例#1
0
    void CheckExplosiveMushroomTrigger(Collider2D collision)
    {
        ExplosiveMushroom mushroom = collision.gameObject.GetComponent <ExplosiveMushroom>();

        if (!mushroom)
        {
            return;
        }

        ActivateMushroom(mushroom);
    }
示例#2
0
 void ActivateMushroom(ExplosiveMushroom mushroom)
 {
     mushroom.Activate();
     Destroy(this.gameObject);
 }