public void AddHerd(ShooterHerd h) { _herdList.Add(h); }
public void StartGame(int level) { #region generate sample levels #region 1st level ShooterHerd enemies1 = new ShooterHerd((float)0.5, 0, 0, _width, _height); ShooterLevel level1 = new ShooterLevel(); enemies1.AddEnemy(new ShooterEnemyAdvanced(3, 1)); enemies1.AddEnemy(new ShooterEnemyAdvanced(8, 1)); enemies1.AddEnemy(new ShooterEnemyBasic(1, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(2, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(3, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(4, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(5, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(6, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(7, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(8, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(9, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(10, 2)); enemies1.AddEnemy(new ShooterEnemyBasic(1, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(2, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(3, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(4, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(5, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(6, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(7, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(8, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(9, 3)); enemies1.AddEnemy(new ShooterEnemyBasic(10, 3)); level1.AddHerd(enemies1); _levels.Add(level1); #endregion #region 2nd level ShooterHerd enemies2 = new ShooterHerd((float)0.5, 0, 0, _width, _height); ShooterLevel level2 = new ShooterLevel(); enemies2.AddEnemy(new ShooterEnemyAdvanced(1, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(2, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(3, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(4, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(5, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(6, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(7, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(8, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(9, 1)); enemies2.AddEnemy(new ShooterEnemyAdvanced(10, 1)); enemies2.AddEnemy(new ShooterEnemyBasic(1, 2)); enemies2.AddEnemy(new ShooterEnemyAdvanced(2, 2)); enemies2.AddEnemy(new ShooterEnemyBasic(3, 2)); enemies2.AddEnemy(new ShooterEnemyBasic(4, 2)); enemies2.AddEnemy(new ShooterEnemyAdvanced(5, 2)); enemies2.AddEnemy(new ShooterEnemyAdvanced(6, 2)); enemies2.AddEnemy(new ShooterEnemyBasic(7, 2)); enemies2.AddEnemy(new ShooterEnemyBasic(8, 2)); enemies2.AddEnemy(new ShooterEnemyAdvanced(9, 2)); enemies2.AddEnemy(new ShooterEnemyBasic(10, 2)); enemies2.AddEnemy(new ShooterEnemyBasic(1, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(2, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(3, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(4, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(5, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(6, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(7, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(8, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(9, 3)); enemies2.AddEnemy(new ShooterEnemyBasic(10, 3)); level2.AddHerd(enemies2); _levels.Add(level2); #endregion #region 3rd level ShooterHerd enemies3 = new ShooterHerd((float)1, 0, 0, _width, _height); ShooterHerd boss3 = new ShooterHerd((float)1.5, 0, 0, _width, _height); ShooterLevel level3 = new ShooterLevel(); enemies3.AddEnemy(new ShooterEnemyBasic(1, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(2, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(3, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(4, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(5, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(6, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(7, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(8, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(9, 1)); enemies3.AddEnemy(new ShooterEnemyBasic(10, 1)); boss3.AddEnemy(new ShooterBossObject(2, 0)); level3.AddHerd(enemies3); level3.AddHerd(boss3); _levels.Add(level3); #endregion #region 4th level ShooterHerd enemies4 = new ShooterHerd((float)1, 0, 0, _width, _height); ShooterLevel level4 = new ShooterLevel(); enemies4.AddEnemy(new ShooterEnemyAdvanced(1, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(2, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(3, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(4, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(5, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(6, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(7, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(8, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(9, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(10, 1)); enemies4.AddEnemy(new ShooterEnemyAdvanced(1, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(2, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(3, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(4, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(5, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(6, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(7, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(8, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(9, 2)); enemies4.AddEnemy(new ShooterEnemyAdvanced(10, 2)); enemies4.AddEnemy(new ShooterEnemyBasic(1, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(2, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(3, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(4, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(5, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(6, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(7, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(8, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(9, 3)); enemies4.AddEnemy(new ShooterEnemyBasic(10, 3)); level4.AddHerd(enemies4); _levels.Add(level4); #endregion #region 5th level ShooterHerd enemies5 = new ShooterHerd((float)1.5, 0, 0, _width, _height); ShooterLevel level5 = new ShooterLevel(); enemies5.AddEnemy(new ShooterEnemyBasic(1, 1)); enemies5.AddEnemy(new ShooterEnemyAdvanced(2, 1)); enemies5.AddEnemy(new ShooterEnemyBasic(3, 1)); enemies5.AddEnemy(new ShooterEnemyAdvanced(4, 1)); enemies5.AddEnemy(new ShooterEnemyBasic(5, 1)); enemies5.AddEnemy(new ShooterEnemyAdvanced(6, 1)); enemies5.AddEnemy(new ShooterEnemyBasic(7, 1)); enemies5.AddEnemy(new ShooterEnemyAdvanced(8, 1)); enemies5.AddEnemy(new ShooterEnemyBasic(9, 1)); enemies5.AddEnemy(new ShooterEnemyAdvanced(10, 1)); enemies5.AddEnemy(new ShooterEnemyAdvanced(1, 2)); enemies5.AddEnemy(new ShooterEnemyBasic(2, 2)); enemies5.AddEnemy(new ShooterEnemyAdvanced(3, 2)); enemies5.AddEnemy(new ShooterEnemyBasic(4, 2)); enemies5.AddEnemy(new ShooterEnemyAdvanced(5, 2)); enemies5.AddEnemy(new ShooterEnemyBasic(6, 2)); enemies5.AddEnemy(new ShooterEnemyAdvanced(7, 2)); enemies5.AddEnemy(new ShooterEnemyBasic(8, 2)); enemies5.AddEnemy(new ShooterEnemyAdvanced(9, 2)); enemies5.AddEnemy(new ShooterEnemyBasic(10, 2)); enemies5.AddEnemy(new ShooterEnemyBasic(1, 3)); enemies5.AddEnemy(new ShooterEnemyAdvanced(2, 3)); enemies5.AddEnemy(new ShooterEnemyBasic(3, 3)); enemies5.AddEnemy(new ShooterEnemyAdvanced(4, 3)); enemies5.AddEnemy(new ShooterEnemyBasic(5, 3)); enemies5.AddEnemy(new ShooterEnemyAdvanced(6, 3)); enemies5.AddEnemy(new ShooterEnemyBasic(7, 3)); enemies5.AddEnemy(new ShooterEnemyAdvanced(8, 3)); enemies5.AddEnemy(new ShooterEnemyBasic(9, 3)); enemies5.AddEnemy(new ShooterEnemyAdvanced(10, 3)); enemies5.AddEnemy(new ShooterEnemyAdvanced(1, 4)); enemies5.AddEnemy(new ShooterEnemyBasic(2, 4)); enemies5.AddEnemy(new ShooterEnemyAdvanced(3, 4)); enemies5.AddEnemy(new ShooterEnemyBasic(4, 4)); enemies5.AddEnemy(new ShooterEnemyAdvanced(5, 4)); enemies5.AddEnemy(new ShooterEnemyBasic(6, 4)); enemies5.AddEnemy(new ShooterEnemyAdvanced(7, 4)); enemies5.AddEnemy(new ShooterEnemyBasic(8, 4)); enemies5.AddEnemy(new ShooterEnemyAdvanced(9, 4)); enemies5.AddEnemy(new ShooterEnemyBasic(10, 4)); level5.AddHerd(enemies5); _levels.Add(level5); #endregion #region 6th level ShooterHerd enemies6 = new ShooterHerd((float)1, 0, 0, _width, _height); ShooterHerd enemies6ai = new ShooterHerd((float)2.5, 0, 0, _width / 2, _height); ShooterHerd enemies6aii = new ShooterHerd((float)2.5, _width / 2, 0, _width, _height); ShooterHerd boss6 = new ShooterHerd((float)2, 0, 0, _width, _height); ShooterLevel level6 = new ShooterLevel(); enemies6.AddEnemy(new ShooterEnemyAdvanced(1, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(2, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(3, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(4, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(5, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(6, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(7, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(8, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(9, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(10, 1)); enemies6.AddEnemy(new ShooterEnemyAdvanced(1, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(2, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(3, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(4, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(5, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(6, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(7, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(8, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(9, 2)); enemies6.AddEnemy(new ShooterEnemyAdvanced(10, 2)); enemies6ai.AddEnemy(new ShooterEnemyAdvanced(3, 4)); enemies6ai.AddEnemy(new ShooterEnemyBasic(3, 3)); enemies6ai.AddEnemy(new ShooterEnemyBasic(2, 4)); enemies6ai.AddEnemy(new ShooterEnemyBasic(4, 4)); enemies6ai.AddEnemy(new ShooterEnemyBasic(3, 5)); enemies6aii.AddEnemy(new ShooterEnemyAdvanced(8, 4)); enemies6aii.AddEnemy(new ShooterEnemyBasic(8, 3)); enemies6aii.AddEnemy(new ShooterEnemyBasic(7, 4)); enemies6aii.AddEnemy(new ShooterEnemyBasic(9, 4)); enemies6aii.AddEnemy(new ShooterEnemyBasic(8, 5)); boss6.AddEnemy(new ShooterBossObject(2, 0)); level6.AddHerd(enemies6); level6.AddHerd(enemies6ai); level6.AddHerd(enemies6aii); level6.AddHerd(boss6); _levels.Add(level6); #endregion #region 7th level ShooterHerd enemies7 = new ShooterHerd((float)1.5, 0, 0, _width, _height); ShooterHerd enemies7a = new ShooterHerd((float)3, 0, 0, _width, _height); ShooterLevel level7 = new ShooterLevel(); enemies7.AddEnemy(new ShooterEnemyBasic(1, 1)); enemies7.AddEnemy(new ShooterEnemyAdvanced(2, 1)); enemies7.AddEnemy(new ShooterEnemyBasic(3, 1)); enemies7.AddEnemy(new ShooterEnemyAdvanced(4, 1)); enemies7.AddEnemy(new ShooterEnemyBasic(5, 1)); enemies7.AddEnemy(new ShooterEnemyAdvanced(6, 1)); enemies7.AddEnemy(new ShooterEnemyBasic(7, 1)); enemies7.AddEnemy(new ShooterEnemyAdvanced(8, 1)); enemies7.AddEnemy(new ShooterEnemyBasic(9, 1)); enemies7.AddEnemy(new ShooterEnemyAdvanced(10, 1)); enemies7.AddEnemy(new ShooterEnemyAdvanced(1, 2)); enemies7.AddEnemy(new ShooterEnemyBasic(2, 2)); enemies7.AddEnemy(new ShooterEnemyAdvanced(3, 2)); enemies7.AddEnemy(new ShooterEnemyBasic(4, 2)); enemies7.AddEnemy(new ShooterEnemyAdvanced(5, 2)); enemies7.AddEnemy(new ShooterEnemyBasic(6, 2)); enemies7.AddEnemy(new ShooterEnemyAdvanced(7, 2)); enemies7.AddEnemy(new ShooterEnemyBasic(8, 2)); enemies7.AddEnemy(new ShooterEnemyAdvanced(9, 2)); enemies7.AddEnemy(new ShooterEnemyBasic(10, 2)); enemies7a.AddEnemy(new ShooterEnemySuper(3, -10)); enemies7a.AddEnemy(new ShooterEnemyBasic(2, -10)); enemies7a.AddEnemy(new ShooterEnemyBasic(4, -10)); enemies7a.AddEnemy(new ShooterEnemyBasic(3, -9)); enemies7a.AddEnemy(new ShooterEnemySuper(8, -10)); enemies7a.AddEnemy(new ShooterEnemyBasic(7, -10)); enemies7a.AddEnemy(new ShooterEnemyBasic(9, -10)); enemies7a.AddEnemy(new ShooterEnemyBasic(8, -9)); level7.AddHerd(enemies7); level7.AddHerd(enemies7a); _levels.Add(level7); #endregion _herdList = _levels[0].GetHerdList(); #endregion _herdList = _levels[level].GetHerdList(); }