public static void Update(int Stage) { switch (Stage) { case 1: if (!PlayerShip.Instance.IsDead && EntityManager.enemies.Count < 20) { if (inverseSpawnChance > 15) { inverseSpawnChance -= 0.005f; } if (rand.Next((int)inverseSpawnChance) == 0) { EntityManager.Add(Enemy.CreateBasic(GetSpawnPosition(), Stage)); } if (rand.Next((int)inverseSpawnChance) == 0) { EntityManager.Add(Enemy.CreateAsteroid(GetSpawnPosition(), Stage)); } if (rand.Next((int)inverseSpawnChance) == 0) { EntityManager.Add(Enemy.CreateTwinShotEnemy(GetSpawnPosition(), Stage)); } } break; case 2: if (inverseSpawnChance > 10) { inverseSpawnChance -= 0.05f; } if (!PlayerShip.Instance.IsDead && EntityManager.enemies.Count < 20) { if (inverseSpawnChance > 20) { inverseSpawnChance -= 0.005f; } if (rand.Next((int)inverseSpawnChance) == 0) { EntityManager.Add(Enemy.CreateBasic(GetSpawnPosition(), Stage)); } if (rand.Next((int)inverseSpawnChance) == 0) { EntityManager.Add(Enemy.CreateAsteroid(GetSpawnPosition(), Stage)); } if (rand.Next((int)inverseSpawnChance) == 0) { EntityManager.Add(Enemy.CreateTwinShotEnemy(GetSpawnPosition(), Stage)); } if (rand.Next((int)inverseSpawnChance) == 0) { EntityManager.Add(Enemy.CreateMissleEnemy(GetSpawnPosition(), Stage)); } } break; case 3: if (!PlayerShip.Instance.IsDead) { if (BossSpawned == false) { EntityManager.Add(Boss.CreateBoss(new Vector2(GameRoot.ScreenSize.X / 2, GameRoot.ScreenSize.Y / 2))); BossSpawned = true; } } break; } }