Exemple #1
0
    IEnumerator Pattern00()
    {
        Debug.Log("Pattern00");
        while (!Active)
        {
            yield return(null);
        }

        FX.EffectPlay(FX.ENEMYS.BOSS_CUCKOO_FIRST_BEEP);
        Bird_King.SetBool("Song", true);
        yield return(null);

        GameObject This  = Instantiate(_Spawning, SpawnPos[0].transform.position, Quaternion.identity);
        GameObject This2 = Instantiate(_Spawning, SpawnPos[1].transform.position, Quaternion.identity);

        Bird_King.SetBool("Song", false);
        yield return(new WaitForSeconds(1));

        Destroy(This);
        Destroy(This2);

        for (int i = 0; i < 2; i++)
        {
            Bird bird = Instantiate(_Bird, SpawnPos[i].transform.position, Quaternion.identity).GetComponent <Bird>();
            bird.transform.parent = transform.parent;
            yield return(null);

            bird.whatState   = 2;
            bird.entityValue = 0;
            bird.GetComponent <Animator>().SetInteger("WhatState", 2);
        }

        FX.AudioPlay(FX.BGMS.BOSS_BGM);
        yield return(new WaitForSeconds(1));

        Finish_Pattern00 = true;
        while (!AttackStart)
        {
            yield return(null);
        }

        Wheel.SetBool("Move", true);
        StartCoroutine(Pattern);
    }