// Update is called once per frame
    void Update()
    {
        if (isReadyForNewWave)
        {
            isReadyForNewWave = false;

            waveSpawner.StartWave(0.5f, delegate() {
                PromptText.AddMessage("wave is done, here comes the big guy", 2.0f);

                isReadyForMiniBoss = true;
            });

            waveSpawner.enemy_number *= 2;
        }

        if (isReadyForMiniBoss)
        {
            isReadyForMiniBoss = false;

            miniBossSpawner.SpawnMiniBoss(delegate() {
                PromptText.AddMessage("big guy is done", 2.0f);
                isReadyForNewWave = true;
            });
        }

        // remove due to tapCount
        //if(Application.isMobilePlatform && !Application.isEditor)
        //	MobileTouchInput();
        //else
        MouseInput();
    }
Example #2
0
    public IEnumerator AttackCycle(float delay)
    {
        // wait till you get there
        yield return(new WaitForSeconds(delay));


        // attack loop
        for (int i = 0; i < healthCount; i++)
        {
            yield return(StartCoroutine(QuicktimeEventStart(quickTime_limit)));

            yield return(new WaitForSeconds(quickTime_delays));
        }

        // slash fury
        PromptText.AddMessage("Slash him up", slashFury_time);
        isFurySlashing = true;
        isHit          = true;
        SetColliderActive(1);
        yield return(new WaitForSeconds(slashFury_time));

        SetColliderActive(0);
        isFurySlashing = false;

        animator.SetTrigger("die");
        Sounds_dying.PlaySound();

        yield return(new WaitForSeconds(1.0f));

        Game_Controller.StartScrollingScenery();
        Player_Controller.StartRunning();

        onDefeatCall();

        Destroy(gameObject);
    }