Beispiel #1
0
    IEnumerator Execute()
    {
        yield return(new WaitForSeconds(2));

        animator.SetTrigger("Toggle");

        yield return(new WaitForSeconds(1.5f));

        bossController.CallNewAction();
    }
Beispiel #2
0
    IEnumerator Execute()
    {
        yield return(new WaitForSeconds(.5f));

        SetBomb(Vector2.up * Random.Range(0f, 4f) + Vector2.right * Random.Range(-8, -3));
        yield return(new WaitForSeconds(.3f));

        SetBomb(Vector2.up * Random.Range(0f, 4f) + Vector2.right * Random.Range(3, 8));

        yield return(new WaitForSeconds(2));

        animator.SetTrigger("Toggle");
        bossController.CallNewAction();
    }
Beispiel #3
0
    IEnumerator Execute()
    {
        for (int i = -1; i < fakeOuts; i++)
        {
            animator.SetTrigger("Hide");
            yield return(new WaitForSeconds(1));

            List <int> possibleX = new List <int> {
                -6, 0, 6
            };
            if (transform.position.x < -3)
            {
                possibleX.RemoveAt(0);
            }
            else if (transform.position.x < 3)
            {
                possibleX.RemoveAt(1);
            }
            else
            {
                possibleX.RemoveAt(2);
            }

            int xSpawnPosition = possibleX[Random.Range(0, possibleX.Count)];
            groundShakeParticles.transform.position = new Vector2(xSpawnPosition, groundShakeParticles.transform.position.y);
            groundShakeParticles.Play();

            yield return(new WaitForSeconds(1.2f));

            groundShakeParticles.Stop();
            transform.position = new Vector2(xSpawnPosition, transform.position.y);
            animator.SetTrigger("Toggle");
        }

        yield return(new WaitForSeconds(1));

        bossController.CallNewAction();
    }
Beispiel #4
0
    IEnumerator Execute()
    {
        yield return(new WaitForSeconds(.2f));

        switch (pattern)
        {
        default:
        case 0:
            PatternInterleaved(false);
            break;

        case 1:
            PatternInterleaved(true);
            break;

        case 2:
            PatternLeftAndRight(false);
            break;

        case 3:
            PatternLeftAndRight(true);
            break;

        case 4:
            PatternSidesToCenter(false);
            break;

        case 5:
            PatternSidesToCenter(true);
            break;
        }

        yield return(new WaitForSeconds(2.5f));

        animator.SetTrigger("Toggle");
        soundWavePS.Stop();
        bossController.CallNewAction();
    }