Exemple #1
0
    IEnumerator C_StartCoroutine()
    {
        yield return(new WaitForSeconds(StartDelay));

//		if (NumberOfSets == 0)
//			NumberOfSets = 1000;

        int I = 0;

//		for(int I=0; I<NumberOfSets; I++)
        while (I < NumberOfSets || NumberOfSets == 0)
        {
            if (ShootDirection)
            {
                SuperScript.ShootDirection(0, ObjectAmount, Target, ObjectDelay, ObjectSpeed);
            }
            if (ShootAtPlayer)
            {
                SuperScript.ShootAtTarget_Player(0, ObjectDelay, ObjectAmount, ObjectSpeed);
            }
            if (WaveyLine)
            {
                if (Xdirection != 0)
                {
                    SuperScript.WaveSpray_Horizontal(0, ObjectAmount, ObjectDelay, Amplitude_Y, PeriodSpeed_Y, ObjectSpeed);
                }
                if (Ydirection != 0)
                {
                    SuperScript.WaveSpray_Vertical(0, ObjectAmount, ObjectDelay, Amplitude_X, PeriodSpeed_X, ObjectSpeed);
                }
            }

            if (SprayInDirection)
            {
                SuperScript.SprayInDirection(0, ObjectAmount, Target, ObjectDelay, ObjectSpeed);
            }
            if (RandomSprayOutwards)
            {
                SuperScript.RandomSprayOutwards(0, ObjectDelay, ObjectAmount, ObjectSpeed);
            }

            // Next 3 count as one object
            if (CircleBurst)
            {
                SuperScript.CircleBurst(0, ObjectAmount, ObjectSpeed);
            }
            if (RandomRain)
            {
                SuperScript.ShootFromTopScreen(0, ObjectAmount, ObjectDelay, ObjectSpeed);
            }
            if (FollowTarget)
            {
                SuperScript.FollowTarget_Player(0, DeathTimer, ObjectSpeed);
            }
            if (RandomSprayBounce)
            {
                SuperScript.RandomSprayBounce(0, ObjectDelay, ObjectAmount, ObjectSpeed);
            }


            yield return(new WaitForSeconds(TimeToSpawnObjects));

            yield return(new WaitForSeconds(DelayBetweenSets));

            I++;
        }

        print(" I AM DONE");
        yield return(null);
    }