Ejemplo n.º 1
0
    IEnumerator Chargers()
    {
        while (true)
        {
            while (SaveGame.RoundScore < 5)
            {
                yield return(null);
            }

            const float WarnDelay = 0.5f;

            // Warn player
            AudioManager.Instance.PlayClip(AudioManager.Instance.MiscAudioSource, AudioManager.Instance.AudioData.ChargerWarning);
            yield return(new WaitForSeconds(WarnDelay));

            int amount = 1 + (SaveGame.RoundScore / 15);
            if (Random.value < 0.1f)
            {
                amount += 1;
            }

            PositionUtility.SpawnDirection dir = PositionUtility.GetRandomDirOutside();

            yield return(PositionUtility.SpawnGroup(ActorTypeEnum.SmallCharger, amount, 0.1f, true, dir));

            // Wait semi-random after spawning
            float delay = 12 + Random.value * 2;
            yield return(new WaitForSeconds(delay));
        }
    }
Ejemplo n.º 2
0
    IEnumerator DeedWhiteWalkers()
    {
        while (true)
        {
            int amount = 5 + Random.Range(0, 2);
            amount += currentDeed_.DeedCurrentScore / 5;

            PositionUtility.SpawnDirection dir = PositionUtility.SpawnDirection.TopOrBottom;
            yield return(PositionUtility.SpawnGroup(ActorTypeEnum.LargeWalker, amount, 0.1f, true, dir));

            float delay = 5.0f;
            yield return(new WaitForSeconds(delay));
        }
    }
Ejemplo n.º 3
0
    IEnumerator BigWalkers()
    {
        while (true)
        {
            int amount = 1 + Random.Range(0, 2);
            amount += SaveGame.RoundScore / 15;

            float delay = SaveGame.RoundScore == 1 ? 5 + Random.value * 3 : 20 + Random.value + amount;
            yield return(new WaitForSeconds(delay));

            bool inside = Random.value < 0.2f;
            PositionUtility.SpawnDirection dir = PositionUtility.GetRandomDirOutside();
            yield return(PositionUtility.SpawnGroup(ActorTypeEnum.LargeWalker, amount, 0.1f, !inside, dir));
        }
    }
Ejemplo n.º 4
0
    IEnumerator DeedMachinegun()
    {
        while (true)
        {
            int amount = 5 + (currentDeed_.DeedCurrentScore / 5);
            if (Random.value < 0.1f)
            {
                amount += 2;
            }

            bool inside = Random.value < 0.5f || SaveGame.RoundScore == 1;
            PositionUtility.SpawnDirection dir = PositionUtility.GetRandomDirOutside();

            yield return(PositionUtility.SpawnGroup(ActorTypeEnum.SmallWalker, amount, 0.1f, !inside, dir));

            float delay = 4 + Random.value;
            yield return(new WaitForSeconds(delay));
        }
    }
Ejemplo n.º 5
0
    IEnumerator DeedSniper()
    {
        const float InitialDelay = 3.0f;

        yield return(new WaitForSeconds(InitialDelay));

        while (true)
        {
            int amount = 5 + currentDeed_.DeedCurrentScore / 10;

            if (Random.value < 0.1f)
            {
                amount++;
            }

            bool inside = Random.value < 0.05f;
            PositionUtility.SpawnDirection dir = Random.value < 0.5f ? PositionUtility.SpawnDirection.LeftOrRight : PositionUtility.SpawnDirection.TopOrBottom;
            yield return(PositionUtility.SpawnGroup(ActorTypeEnum.Caster, amount, 0.1f, !inside, dir));

            float delay = 5 + Random.value * 2;
            yield return(new WaitForSeconds(delay));
        }
    }
Ejemplo n.º 6
0
    IEnumerator CasterSkellies()
    {
        while (true)
        {
            int amount = 1 + SaveGame.RoundScore / 15;

            if (amount > 3)
            {
                amount = 3;
            }

            if (Random.value < 0.1f)
            {
                amount++;
            }

            float delay = SaveGame.RoundScore == 1 ? 15 + Random.value * 3 : 20 + Random.value * 5;
            yield return(new WaitForSeconds(delay));

            bool inside = Random.value < 0.05f;
            PositionUtility.SpawnDirection dir = PositionUtility.GetRandomDirOutside();
            yield return(PositionUtility.SpawnGroup(ActorTypeEnum.Caster, amount, 0.1f, !inside, dir));
        }
    }