public void Update() { // Game Complete if (round == null) { GameLevel.that.next(); //if(GameLevel.curLvl == 0){ ++spawnRoundNumber; //} GetSpawnRound (spawnRoundNumber); Camera.main.GetComponent<PrintMessage>().printMessage("Round " + roundNumber, 3); } // Update Round round.Update (); // Round Complete if (round.IsComplete ()) { round = null; ++roundNumber; waveNumber = 0; } }
public void Update() { // Game Complete if (round == null) { GameLevel.that.next(); //if(GameLevel.curLvl == 0){ ++spawnRoundNumber; //} GetSpawnRound(spawnRoundNumber); Camera.main.GetComponent <PrintMessage>().printMessage("Round " + roundNumber, 3); } // Update Round round.Update(); // Round Complete if (round.IsComplete()) { round = null; ++roundNumber; waveNumber = 0; } }
public void Start() { EnemyCount = 0; roundNumber = 1; waveNumber = 0; spawnRoundNumber = -1; gameLogic = this; round = null; //SetupGame (); }
public void Start() { EnemyCount = 0; roundNumber = 1; waveNumber = 0; spawnRoundNumber = -1; gameLogic = this; round = null; //SetupGame (); }
void GetSpawnRound(int roundIndex) { SpawnWave wave; round = new SpawnRound(); if (roundIndex == 0) { // Wave 1 wave = new SpawnWave(); wave.spawnTime = 2.0f; wave.enemySets.Add (new EnemySet("Enemy", 3, 1)); if(spawnRoundNumber == 0){ wave.startFunction = () => { Camera.main.GetComponent<PrintMessage>().printMessage("Left Stick: Move\n\nRight Stick: Shoot", 15.0f); }; } round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 5.0f; wave.enemySets.Add (new EnemySet("Enemy", 8, 1)); wave.enemySets.Add (new EnemySet("Enemy", 3, 2)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 8.0f; wave.enemySets.Add (new EnemySet("Enemy", 12, 2)); wave.enemySets.Add (new EnemySet("Enemy", 8, 3)); wave.enemySets.Add (new EnemySet("Enemy", 2, 4)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 10.0f; wave.enemySets.Add (new EnemySet("SplitEnemy", 2, 1)); if(spawnRoundNumber == 0){ Player.canSplit = true; } round.waves.Add(wave); // Wave 5 wave = new SpawnWave(); wave.spawnTime = 10.0f; wave.enemySets.Add (new EnemySet("SplitEnemy", 2, 1)); if(spawnRoundNumber == 0){ wave.startFunction = () => { Camera.main.GetComponent<PrintMessage>().printMessage("XBox Bumpers:\nSplit your ship appart!\n\nCut large enemies in half", 20.0f); }; } round.waves.Add(wave); // Wave 6 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("EnemyBlob", 1, 100)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent<PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } else if (roundIndex == 1) { // Wave 1 wave = new SpawnWave(); wave.spawnTime = 5.0f; wave.enemySets.Add (new EnemySet("Enemy", 8, 1)); wave.enemySets.Add (new EnemySet("Enemy", 3, 2)); round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 8.0f; wave.enemySets.Add (new EnemySet("Enemy", 12, 2)); wave.enemySets.Add (new EnemySet("Enemy", 8, 3)); wave.enemySets.Add (new EnemySet("Enemy", 2, 4)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 8, 1)); wave.enemySets.Add (new EnemySet("Enemy", 5, 2)); wave.enemySets.Add (new EnemySet("Enemy", 3, 3)); wave.enemySets.Add (new EnemySet("Enemy", 2, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 2, 1)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 8, 1)); wave.enemySets.Add (new EnemySet("Enemy", 5, 2)); wave.enemySets.Add (new EnemySet("Enemy", 3, 3)); wave.enemySets.Add (new EnemySet("Enemy", 2, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 8, 2)); round.waves.Add(wave); // Wave 5 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("EnemyBlob", 2, 100)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent<PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } else if (roundIndex == 2) { // Wave 1 wave = new SpawnWave(); wave.spawnTime = 8.0f; wave.enemySets.Add (new EnemySet("Enemy", 12, 2)); wave.enemySets.Add (new EnemySet("Enemy", 8, 3)); wave.enemySets.Add (new EnemySet("Enemy", 2, 4)); round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 8, 1)); wave.enemySets.Add (new EnemySet("Enemy", 5, 2)); wave.enemySets.Add (new EnemySet("Enemy", 3, 3)); wave.enemySets.Add (new EnemySet("Enemy", 2, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 2, 1)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 20, 1)); wave.enemySets.Add (new EnemySet("Enemy", 10, 2)); wave.enemySets.Add (new EnemySet("Enemy", 8, 3)); wave.enemySets.Add (new EnemySet("Enemy", 5, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 8, 3)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 20, 1)); wave.enemySets.Add (new EnemySet("Enemy", 10, 2)); wave.enemySets.Add (new EnemySet("Enemy", 8, 3)); wave.enemySets.Add (new EnemySet("Enemy", 5, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 8, 1)); wave.enemySets.Add (new EnemySet("SplitEnemy", 6, 2)); wave.enemySets.Add (new EnemySet("SplitEnemy", 4, 3)); wave.enemySets.Add (new EnemySet("SplitEnemy", 2, 4)); round.waves.Add(wave); // Wave 5 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("EnemyBlob", 3, 100)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent<PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } /* else if (roundIndex == 3) { // Wave 1 wave = new SpawnWave(); wave.spawnTime = 2.0f; wave.enemySets.Add (new EnemySet("Enemy", 20, 1)); wave.enemySets.Add (new EnemySet("Enemy", 5, 2)); wave.enemySets.Add (new EnemySet("SplitEnemy", 3, 1)); round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 20.0f; wave.enemySets.Add (new EnemySet("Enemy", 30, 1)); wave.enemySets.Add (new EnemySet("Enemy", 10, 2)); wave.enemySets.Add (new EnemySet("Enemy", 5, 3)); wave.enemySets.Add (new EnemySet("SplitEnemy", 6, 1)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 40, 1)); wave.enemySets.Add (new EnemySet("Enemy", 20, 2)); wave.enemySets.Add (new EnemySet("Enemy", 10, 3)); wave.enemySets.Add (new EnemySet("Enemy", 5, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 8, 1)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 50, 1)); wave.enemySets.Add (new EnemySet("Enemy", 30, 2)); wave.enemySets.Add (new EnemySet("Enemy", 20, 3)); wave.enemySets.Add (new EnemySet("Enemy", 15, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 10, 1)); round.waves.Add(wave); // Wave 5 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("EnemyBlob", 4, 100)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent<PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } */ else// (roundIndex == 3) { int extra = (roundIndex-1) * 5; // Wave 1 wave = new SpawnWave(); wave.spawnTime = 2.0f; wave.enemySets.Add (new EnemySet("Enemy", 20 + extra, 1)); wave.enemySets.Add (new EnemySet("Enemy", 5 + extra, 2)); wave.enemySets.Add (new EnemySet("SplitEnemy", 3 + extra, 1)); round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 20.0f; wave.enemySets.Add (new EnemySet("Enemy", 30 + extra, 1)); wave.enemySets.Add (new EnemySet("Enemy", 10 + extra, 2)); wave.enemySets.Add (new EnemySet("Enemy", 5 + extra, 3)); wave.enemySets.Add (new EnemySet("SplitEnemy", 6 + extra, 1)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 40 + extra, 1)); wave.enemySets.Add (new EnemySet("Enemy", 20 + extra, 2)); wave.enemySets.Add (new EnemySet("Enemy", 10 + extra, 3)); wave.enemySets.Add (new EnemySet("Enemy", 5 + extra, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 8 + extra, 1)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 50 + extra, 1)); wave.enemySets.Add (new EnemySet("Enemy", 30 + extra, 2)); wave.enemySets.Add (new EnemySet("Enemy", 20 + extra, 3)); wave.enemySets.Add (new EnemySet("Enemy", 15 + extra, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 10 + extra, 1)); round.waves.Add(wave); // Wave 5 /* wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("Enemy", 50 + extra, 1)); wave.enemySets.Add (new EnemySet("Enemy", 40 + extra, 2)); wave.enemySets.Add (new EnemySet("Enemy", 30 + extra, 3)); wave.enemySets.Add (new EnemySet("Enemy", 25 + extra, 4)); wave.enemySets.Add (new EnemySet("SplitEnemy", 12 + extra, 1)); round.waves.Add(wave); */ // Wave 5 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add (new EnemySet("EnemyBlob", extra, 50)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent<PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } }
void GetSpawnRound(int roundIndex) { SpawnWave wave; round = new SpawnRound(); if (roundIndex == 0) { // Wave 1 wave = new SpawnWave(); wave.spawnTime = 2.0f; wave.enemySets.Add(new EnemySet("Enemy", 3, 1)); if (spawnRoundNumber == 0) { wave.startFunction = () => { Camera.main.GetComponent <PrintMessage>().printMessage("Left Stick: Move\n\nRight Stick: Shoot", 15.0f); }; } round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 5.0f; wave.enemySets.Add(new EnemySet("Enemy", 8, 1)); wave.enemySets.Add(new EnemySet("Enemy", 3, 2)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 8.0f; wave.enemySets.Add(new EnemySet("Enemy", 12, 2)); wave.enemySets.Add(new EnemySet("Enemy", 8, 3)); wave.enemySets.Add(new EnemySet("Enemy", 2, 4)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 10.0f; wave.enemySets.Add(new EnemySet("SplitEnemy", 2, 1)); if (spawnRoundNumber == 0) { Player.canSplit = true; } round.waves.Add(wave); // Wave 5 wave = new SpawnWave(); wave.spawnTime = 10.0f; wave.enemySets.Add(new EnemySet("SplitEnemy", 2, 1)); if (spawnRoundNumber == 0) { wave.startFunction = () => { Camera.main.GetComponent <PrintMessage>().printMessage("XBox Bumpers:\nSplit your ship appart!\n\nCut large enemies in half", 20.0f); }; } round.waves.Add(wave); // Wave 6 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("EnemyBlob", 1, 100)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent <PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } else if (roundIndex == 1) { // Wave 1 wave = new SpawnWave(); wave.spawnTime = 5.0f; wave.enemySets.Add(new EnemySet("Enemy", 8, 1)); wave.enemySets.Add(new EnemySet("Enemy", 3, 2)); round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 8.0f; wave.enemySets.Add(new EnemySet("Enemy", 12, 2)); wave.enemySets.Add(new EnemySet("Enemy", 8, 3)); wave.enemySets.Add(new EnemySet("Enemy", 2, 4)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("Enemy", 8, 1)); wave.enemySets.Add(new EnemySet("Enemy", 5, 2)); wave.enemySets.Add(new EnemySet("Enemy", 3, 3)); wave.enemySets.Add(new EnemySet("Enemy", 2, 4)); wave.enemySets.Add(new EnemySet("SplitEnemy", 2, 1)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("Enemy", 8, 1)); wave.enemySets.Add(new EnemySet("Enemy", 5, 2)); wave.enemySets.Add(new EnemySet("Enemy", 3, 3)); wave.enemySets.Add(new EnemySet("Enemy", 2, 4)); wave.enemySets.Add(new EnemySet("SplitEnemy", 8, 2)); round.waves.Add(wave); // Wave 5 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("EnemyBlob", 2, 100)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent <PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } else if (roundIndex == 2) { // Wave 1 wave = new SpawnWave(); wave.spawnTime = 8.0f; wave.enemySets.Add(new EnemySet("Enemy", 12, 2)); wave.enemySets.Add(new EnemySet("Enemy", 8, 3)); wave.enemySets.Add(new EnemySet("Enemy", 2, 4)); round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("Enemy", 8, 1)); wave.enemySets.Add(new EnemySet("Enemy", 5, 2)); wave.enemySets.Add(new EnemySet("Enemy", 3, 3)); wave.enemySets.Add(new EnemySet("Enemy", 2, 4)); wave.enemySets.Add(new EnemySet("SplitEnemy", 2, 1)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("Enemy", 20, 1)); wave.enemySets.Add(new EnemySet("Enemy", 10, 2)); wave.enemySets.Add(new EnemySet("Enemy", 8, 3)); wave.enemySets.Add(new EnemySet("Enemy", 5, 4)); wave.enemySets.Add(new EnemySet("SplitEnemy", 8, 3)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("Enemy", 20, 1)); wave.enemySets.Add(new EnemySet("Enemy", 10, 2)); wave.enemySets.Add(new EnemySet("Enemy", 8, 3)); wave.enemySets.Add(new EnemySet("Enemy", 5, 4)); wave.enemySets.Add(new EnemySet("SplitEnemy", 8, 1)); wave.enemySets.Add(new EnemySet("SplitEnemy", 6, 2)); wave.enemySets.Add(new EnemySet("SplitEnemy", 4, 3)); wave.enemySets.Add(new EnemySet("SplitEnemy", 2, 4)); round.waves.Add(wave); // Wave 5 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("EnemyBlob", 3, 100)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent <PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } /* * else if (roundIndex == 3) { * // Wave 1 * wave = new SpawnWave(); * wave.spawnTime = 2.0f; * wave.enemySets.Add (new EnemySet("Enemy", 20, 1)); * wave.enemySets.Add (new EnemySet("Enemy", 5, 2)); * wave.enemySets.Add (new EnemySet("SplitEnemy", 3, 1)); * round.waves.Add(wave); * * // Wave 2 * wave = new SpawnWave(); * wave.spawnTime = 20.0f; * wave.enemySets.Add (new EnemySet("Enemy", 30, 1)); * wave.enemySets.Add (new EnemySet("Enemy", 10, 2)); * wave.enemySets.Add (new EnemySet("Enemy", 5, 3)); * wave.enemySets.Add (new EnemySet("SplitEnemy", 6, 1)); * round.waves.Add(wave); * * // Wave 3 * wave = new SpawnWave(); * wave.spawnTime = 30.0f; * wave.enemySets.Add (new EnemySet("Enemy", 40, 1)); * wave.enemySets.Add (new EnemySet("Enemy", 20, 2)); * wave.enemySets.Add (new EnemySet("Enemy", 10, 3)); * wave.enemySets.Add (new EnemySet("Enemy", 5, 4)); * wave.enemySets.Add (new EnemySet("SplitEnemy", 8, 1)); * round.waves.Add(wave); * * // Wave 4 * wave = new SpawnWave(); * wave.spawnTime = 30.0f; * wave.enemySets.Add (new EnemySet("Enemy", 50, 1)); * wave.enemySets.Add (new EnemySet("Enemy", 30, 2)); * wave.enemySets.Add (new EnemySet("Enemy", 20, 3)); * wave.enemySets.Add (new EnemySet("Enemy", 15, 4)); * wave.enemySets.Add (new EnemySet("SplitEnemy", 10, 1)); * round.waves.Add(wave); * * // Wave 5 * wave = new SpawnWave(); * wave.spawnTime = 30.0f; * wave.enemySets.Add (new EnemySet("EnemyBlob", 4, 100)); * wave.waitForEnemies = true; * wave.startFunction = () => { * Camera.main.GetComponent<PrintMessage>().printMessage("Boss Wave", 5.0f); * }; * round.waves.Add(wave); * } */ else // (roundIndex == 3) { int extra = (roundIndex - 1) * 5; // Wave 1 wave = new SpawnWave(); wave.spawnTime = 2.0f; wave.enemySets.Add(new EnemySet("Enemy", 20 + extra, 1)); wave.enemySets.Add(new EnemySet("Enemy", 5 + extra, 2)); wave.enemySets.Add(new EnemySet("SplitEnemy", 3 + extra, 1)); round.waves.Add(wave); // Wave 2 wave = new SpawnWave(); wave.spawnTime = 20.0f; wave.enemySets.Add(new EnemySet("Enemy", 30 + extra, 1)); wave.enemySets.Add(new EnemySet("Enemy", 10 + extra, 2)); wave.enemySets.Add(new EnemySet("Enemy", 5 + extra, 3)); wave.enemySets.Add(new EnemySet("SplitEnemy", 6 + extra, 1)); round.waves.Add(wave); // Wave 3 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("Enemy", 40 + extra, 1)); wave.enemySets.Add(new EnemySet("Enemy", 20 + extra, 2)); wave.enemySets.Add(new EnemySet("Enemy", 10 + extra, 3)); wave.enemySets.Add(new EnemySet("Enemy", 5 + extra, 4)); wave.enemySets.Add(new EnemySet("SplitEnemy", 8 + extra, 1)); round.waves.Add(wave); // Wave 4 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("Enemy", 50 + extra, 1)); wave.enemySets.Add(new EnemySet("Enemy", 30 + extra, 2)); wave.enemySets.Add(new EnemySet("Enemy", 20 + extra, 3)); wave.enemySets.Add(new EnemySet("Enemy", 15 + extra, 4)); wave.enemySets.Add(new EnemySet("SplitEnemy", 10 + extra, 1)); round.waves.Add(wave); // Wave 5 /* * wave = new SpawnWave(); * wave.spawnTime = 30.0f; * wave.enemySets.Add (new EnemySet("Enemy", 50 + extra, 1)); * wave.enemySets.Add (new EnemySet("Enemy", 40 + extra, 2)); * wave.enemySets.Add (new EnemySet("Enemy", 30 + extra, 3)); * wave.enemySets.Add (new EnemySet("Enemy", 25 + extra, 4)); * wave.enemySets.Add (new EnemySet("SplitEnemy", 12 + extra, 1)); * round.waves.Add(wave); */ // Wave 5 wave = new SpawnWave(); wave.spawnTime = 30.0f; wave.enemySets.Add(new EnemySet("EnemyBlob", extra, 50)); wave.waitForEnemies = true; wave.startFunction = () => { Camera.main.GetComponent <PrintMessage>().printMessage("Boss Wave", 5.0f); }; round.waves.Add(wave); } }
private void OnWizardCreate() { SpawnRound round = ScriptableObject.CreateInstance <SpawnRound>(); }