Example #1
0
    IEnumerator OnPanOut()
    {
        NotificationCentre.PostNotification(this, "OnPanOut");

        if (vfxcam)
        {
            //CustomUtilities.SetPosRot (vfxcam, new Vector3(5,1,5), new Vector3(0,-35,0));

            yield return(StartCoroutine(CustomUtilities.MovLocRot(vfxcam, Vector3.zero, new Vector3(1, -45, 0), 0.5f)));

            StartCoroutine(CustomUtilities.MovLocRot(vfxcam, new Vector3(15, 0, -8), Vector3.zero, 2));

            //CustomUtilities.SetPosRot (vfxcam, new Vector3(18,1,-3), new Vector3(0,-35,0));
        }

        NotificationCentre.PostNotification(this, "OnBattleBGM");

        yield return(new WaitForSeconds(3));

        NotificationCentre.PostNotification(this, "OnFadeOut");

        yield return(new WaitForSeconds(1.5f));

        if (vfxcam)
        {
            vfxcam.SetActive(false);
        }

        NotificationCentre.PostNotification(this, "OnFadeIn");
        NotificationCentre.PostNotification(this, "OnEventExit");
        NotificationCentre.PostNotification(this, "OnBattleBegin");

        MissionManager.UpdateMission("Survive  the  horde.");
    }
Example #2
0
    IEnumerator OnEnemyAppear()
    {
        if (zombunny)
        {
            CustomUtilities.SetPosRot(zombunny.gameObject, Vector3.zero, Vector3.zero);
            zombunny.gameObject.SetActive(true);
        }

        yield return(new WaitForSeconds(1));

        GameObject player = GameObject.FindWithTag("Player");

        if (player && zombunny)
        {
            zombunny.Target = player;
        }
        //zombunny.followTarget = true;

        if (zombunny)
        {
            yield return(StartCoroutine(CustomUtilities.MovLocRot(zombunny.gameObject, Vector3.zero, new Vector3(0, 90, 0), 0.5f)));
        }

        yield return(new WaitForSeconds(0.75f));

        StartCoroutine(OnZombunnyAppear());
    }
Example #3
0
    IEnumerator OnZoomInCannon()
    {
        if (cam)
        {
            cam.SetCameraFollow(false);
            CustomUtilities.SetPosRot(cam.gameObject, new Vector3(0, 1, -3), Vector3.zero);
        }

        NotificationCentre.PostNotification(this, "OnFadeIn");
        NotificationCentre.PostNotification(this, "OnBGMFadeIn");

        yield return(new WaitForSeconds(3));

        // Final Pos (3,16,24) Rot (25,30,0)
        if (cam)
        {
            yield return(StartCoroutine(CustomUtilities.MovLocRot(cam.gameObject, new Vector3(3, 15, 27), new Vector3(25, 30, 0), 2)));
        }

        yield return(new WaitForSeconds(1));

        NotificationCentre.PostNotification(this, "OnZombunnyLaugh");

        yield return(new WaitForSeconds(0.5f));

        NotificationCentre.PostNotification(this, "OnIgniteCannon");

        yield return(new WaitForSeconds(0.5f));

        if (cam)
        {
            // Final Pos (3,16,24) Rot (35,45,0)
            yield return(StartCoroutine(CustomUtilities.MovLocRot(cam.gameObject, Vector3.zero, new Vector3(10, 15, 0), 0.7f)));

            // Final Pos (4.2,16.8,22) Rot (35,5,0)
            yield return(StartCoroutine(CustomUtilities.MovLocRot(cam.gameObject, new Vector3(1.2f, 0.8f, -2), new Vector3(0, -40, 0), 0.8f)));
        }

        NotificationCentre.PostNotification(this, "OnFadeOut");

        yield return(new WaitForSeconds(1));

        OnCameraNormalize();
        NotificationCentre.PostNotification(this, "OnEventExit");
        NotificationCentre.PostNotification(this, "OnEnemyRushOverExit");
        NotificationCentre.PostNotification(this, "OnNaturalSpawn");
        NotificationCentre.PostNotification(this, "OnFadeIn");
        MissionManager.UpdateMission("This  room  is  a  nightmare!  Find  the  way  out.");

        yield return(new WaitForSeconds(3));

        NotificationCentre.PostNotification(this, "ActivateCannon");
    }
Example #4
0
    IEnumerator OnEnemyAppear()
    {
        if (vfxcam)
        {
            splashEffect.SetActive(false);;
            vfxcam.SetActive(true);

            CustomUtilities.SetPosRot(vfxcam, new Vector3(22, 2, -2), new Vector3(20, -70, 0));

            NotificationCentre.PostNotification(this, "OnSFXSwift");

            yield return(new WaitForSeconds(0.5f));

            yield return(StartCoroutine(CustomUtilities.MovLocRot(vfxcam, new Vector3(-18.5f, 0, 0), Vector3.zero, 0.7f)));
        }
    }
Example #5
0
    IEnumerator OnPlayerActivate()
    {
        if (player)
        {
            player.SetActive(true);
            gun.EnableGun(false);
            SetPlayerPosRot(new Vector3(21.5f, 0, -1), new Vector3(0, 180, 0));

            yield return(new WaitForSeconds(1));

            ParticleController.Exclamation(player.transform.position, 2);

            yield return(new WaitForSeconds(0.5f));

            yield return(StartCoroutine(CustomUtilities.MovLocRot(player, Vector3.zero, new Vector3(0, 90, 0), 0.5f)));

            yield return(new WaitForSeconds(0.3f));

            NotificationCentre.PostNotification(this, "OnEnemyAppear");
        }
    }
Example #6
0
    IEnumerator OnZombearAppear()
    {
        if (zombunny)
        {
            zombunny.Resume();
        }

        GameObject player = GameObject.FindWithTag("Player");

        if (zombear & player)
        {
            zombear.gameObject.SetActive(true);
            zombear.Target = player;

            yield return(new WaitForSeconds(0.3f));

            CustomUtilities.SetPosRot(zombear.gameObject, new Vector3(5, 0, 7), Vector3.zero);
            yield return(StartCoroutine(CustomUtilities.MovLocRot(zombear.gameObject, Vector3.zero, new Vector3(0, -160, 0), 0.5f)));

            zombear.Pause();
        }

        yield return(null);
    }
Example #7
0
    IEnumerator OnZombunnyAppear()
    {
        if (vfxcam)
        {
            CustomUtilities.SetPosRot(vfxcam, new Vector3(3.5f, 2, -2), new Vector3(20, -70, 0));
            yield return(StartCoroutine(CustomUtilities.MovLocRot(vfxcam, new Vector3(-1.5f, -1.5f, 2), new Vector3(-20, -20, 0), 0.5f)));

            //NotificationCentre.PostNotification (this, "OnSFXVFX1");
            NotificationCentre.PostNotification(this, "OnGooey1");

            if (splashEffect)
            {
                CustomUtilities.SetPosRotLocal(splashEffect, new Vector3(0.15f, 0.55f, 8), Vector3.zero);
                splashEffect.SetActive(true);
            }

            yield return(new WaitForSeconds(0.1f));

            NotificationCentre.PostNotification(this, "OnGooey1");

            if (splashEffect2)
            {
                CustomUtilities.SetPosRotLocal(splashEffect2, new Vector3(-8, -3.5f, 8), Vector3.zero);
                splashEffect2.SetActive(true);
            }

            yield return(new WaitForSeconds(0.1f));

            NotificationCentre.PostNotification(this, "OnGooey2");

            if (splashEffect3)
            {
                CustomUtilities.SetPosRotLocal(splashEffect3, new Vector3(-4, -2, 6), Vector3.zero);
                splashEffect3.SetActive(true);
            }

            if (textZombunny)
            {
                textZombunny.SetActive(true);
            }

            yield return(StartCoroutine(CustomUtilities.MovLocRot(vfxcam, new Vector3(0, 0.2f, -0.1f), Vector3.zero, 4)));

            if (splashEffect)
            {
                splashEffect.SetActive(false);
            }
            if (splashEffect2)
            {
                splashEffect2.SetActive(false);
            }
            if (splashEffect3)
            {
                splashEffect3.SetActive(false);
            }
            if (textZombunny)
            {
                textZombunny.SetActive(false);
            }

            StartCoroutine(OnZombearAppear());
        }
    }
Example #8
0
    IEnumerator OnZombearAppear()
    {
        NotificationCentre.PostNotification(this, "OnZombearAppear");
        NotificationCentre.PostNotification(this, "OnMonsterCry");

        if (vfxcam)
        {
            CustomUtilities.SetPosRot(vfxcam, new Vector3(2, 0.5f, 0), new Vector3(0, -90, 0));
            yield return(StartCoroutine(CustomUtilities.MovLocRot(vfxcam, Vector3.zero, new Vector3(0, 90, 0), 0.3f)));
        }

        yield return(new WaitForSeconds(0.45f));

        //NotificationCentre.PostNotification (this, "OnSFXVFX2");

        if (vfxcam)
        {
            yield return(StartCoroutine(CustomUtilities.MovLocRot(vfxcam, new Vector3(3, 0.5f, 5), Vector3.zero, 0.2f)));
        }

        NotificationCentre.PostNotification(this, "OnGooey2");

        if (splashEffect)
        {
            CustomUtilities.SetPosRotLocal(splashEffect, new Vector3(6, 1.5f, 7), new Vector3(0, 0, 60));
            splashEffect.SetActive(true);
        }

        yield return(new WaitForSeconds(0.1f));

        NotificationCentre.PostNotification(this, "OnGooey1");

        if (splashEffect2)
        {
            CustomUtilities.SetPosRotLocal(splashEffect2, new Vector3(0, -3.5f, 8), new Vector3(0, 0, 90));
            splashEffect2.SetActive(true);
        }

        yield return(new WaitForSeconds(0.1f));

        NotificationCentre.PostNotification(this, "OnGooey1");

        if (splashEffect3)
        {
            CustomUtilities.SetPosRotLocal(splashEffect3, new Vector3(-1, 1, 4), new Vector3(0, 0, 180));
            splashEffect3.SetActive(true);
        }

        if (textZombear)
        {
            textZombear.SetActive(true);
        }

        if (vfxcam)
        {
            yield return(StartCoroutine(CustomUtilities.MovLocRot(vfxcam, Vector3.zero, new Vector3(-1, -5, 0), 4f)));
            //yield return StartCoroutine (CustomUtilities.MovLocRot (vfxcam, new Vector3(-0.2f,0.1f,0), Vector3.zero, 4f));
        }

        if (splashEffect)
        {
            splashEffect.SetActive(false);
        }
        if (splashEffect2)
        {
            splashEffect2.SetActive(false);
        }
        if (splashEffect3)
        {
            splashEffect3.SetActive(false);
        }
        if (textZombear)
        {
            textZombear.SetActive(false);
        }

        StartCoroutine(OnPanOut());
    }