/// <summary> /// Sets up a new level to play, Constructor /// </summary> /// <param name="isInsane">if true the difficulty will be "insane", if false the normal difficulty will be used</param> public Level(bool isDifficultLevel) { time = 120; //2 minutes switch (isDifficultLevel) { case false: scoreMultiply = 1; bulletSpeed = 200; background = new AnimatedBackground(30); //background moving at 10 player = new Player(10, 100, bulletSpeed); //new player with 10 lives, speed of 100, bullet speed of 120 gunCooldown = new GunCooldown(); //for player shooting and gun heating up enemyList = new List <GameEntity>(); //list of enemies coming playerBullet = new List <Bullet>(); //list of bullets player shot enemyBullet = new List <Bullet>(); //list of bullets enemy shot baseShip = shipCount = baseNumber = numberOfEnemies = 20; //initial enemy count for first wave cometCount = baseComet = 0; //initially no comets in waves spawnSpeed = 1.6f; //initial speed of spawn rate waveSpeed = 80; //initial speed of enemy movement wave = 1; //wave counter starts at wave 1 break; case true: scoreMultiply = 3; bulletSpeed = 240; background = new AnimatedBackground(50); //background moving at 10 player = new Player(20, 150, bulletSpeed); //new player with 20 lives, speed of 150, bullet speed 180 gunCooldown = new GunCooldown(); //for player shooting and gun heating up enemyList = new List <GameEntity>(); //list of enemies coming playerBullet = new List <Bullet>(); //list of bullets player shot enemyBullet = new List <Bullet>(); //list of bullets enemy shot baseShip = shipCount = baseNumber = numberOfEnemies = 40; //initial enemy count for first wave cometCount = baseComet = 10; //initially no comets in waves spawnSpeed = 1.0f; //initial speed of spawn rate waveSpeed = 170; //initial speed of enemy movement wave = 1; //wave counter starts at wave 1 break; } }
float waveSpeed; //speed at which enemies move at, changes each wave #endregion Fields #region Constructors /// <summary> /// Sets up a new level to play, Constructor /// </summary> /// <param name="isInsane">if true the difficulty will be "insane", if false the normal difficulty will be used</param> public Level(bool isDifficultLevel) { time = 120; //2 minutes switch (isDifficultLevel) { case false: scoreMultiply = 1; bulletSpeed = 200; background = new AnimatedBackground(30); //background moving at 10 player = new Player(10, 100, bulletSpeed); //new player with 10 lives, speed of 100, bullet speed of 120 gunCooldown = new GunCooldown(); //for player shooting and gun heating up enemyList = new List<GameEntity>(); //list of enemies coming playerBullet = new List<Bullet>(); //list of bullets player shot enemyBullet = new List<Bullet>(); //list of bullets enemy shot baseShip = shipCount = baseNumber = numberOfEnemies = 20; //initial enemy count for first wave cometCount = baseComet = 0; //initially no comets in waves spawnSpeed = 1.6f; //initial speed of spawn rate waveSpeed = 80; //initial speed of enemy movement wave = 1; //wave counter starts at wave 1 break; case true: scoreMultiply = 3; bulletSpeed = 240; background = new AnimatedBackground(50); //background moving at 10 player = new Player(20, 150, bulletSpeed); //new player with 20 lives, speed of 150, bullet speed 180 gunCooldown = new GunCooldown(); //for player shooting and gun heating up enemyList = new List<GameEntity>(); //list of enemies coming playerBullet = new List<Bullet>(); //list of bullets player shot enemyBullet = new List<Bullet>(); //list of bullets enemy shot baseShip = shipCount = baseNumber = numberOfEnemies = 40; //initial enemy count for first wave cometCount = baseComet = 10; //initially comets in waves spawnSpeed = 1.0f; //initial speed of spawn rate waveSpeed = 170; //initial speed of enemy movement wave = 1; //wave counter starts at wave 1 break; } }