Beispiel #1
0
    IEnumerator OnTriggerEnter2D(Collider2D coll)
    {
        if (coll.gameObject.tag == "Player")
        {
            if (canPlay)
            {
                sfx.PlayEndMusic();
                sfx.PlaySoundEffect(flagSound);
                anim.Play("Flag_Fall");
                anim.Play("FlagFall_Level3");
                anim.Play("FlagFall_Level1");
                canPlay = false;
            }
        }

        yield return(null);
    }