Example #1
0
        /// <summary>
        /// Constructor that Takes in an int.
        /// </summary>
        /// <param name="previousHp">The Hp from the previous level</param>
        public Level1(int previousHp, Game game)
        {
            System.Random rand = new Random();

            health             = new HealthSprite(previousHp);
            hp                 = previousHp;
            player             = new PlayerSprite();
            player.WorldLength = 900;

            enemiesH = new EnemySprite[]
            {
                new EnemySprite(new Vector2((float)rand.Next(300, 600), (float)rand.Next(50, 450)), true),
                new EnemySprite(new Vector2((float)rand.Next(300, 600), (float)rand.Next(50, 450)), true),
                new EnemySprite(new Vector2((float)rand.Next(300, 600), (float)rand.Next(50, 450)), false),
                new EnemySprite(new Vector2((float)rand.Next(300, 600), (float)rand.Next(50, 450)), false)
            };
            enemiesV = new EnemySprite2[]
            {
                new EnemySprite2(new Vector2((float)rand.Next(50, 750), (float)rand.Next(200, 300)), true),
                new EnemySprite2(new Vector2((float)rand.Next(50, 750), (float)rand.Next(200, 300)), true),
                new EnemySprite2(new Vector2((float)rand.Next(50, 750), (float)rand.Next(200, 300)), false),
                new EnemySprite2(new Vector2((float)rand.Next(50, 750), (float)rand.Next(200, 300)), false)
            };

            lightBlood = new LightBloodParticleSystem(game, 30);
            game.Components.Add(lightBlood);

            //_explosion = new ExplosionParticleSystem(game, 10);
            //game.Components.Add(_explosion);
        }
Example #2
0
        /// <summary>
        /// Constructor that Takes in an int.
        /// </summary>
        /// <param name="previousHp">The Hp from the previous level</param>
        public Level2()
        {
            System.Random rand = new Random();

            health             = new HealthSprite();
            hp                 = health.Lives;
            player             = new PlayerSprite();
            player.WorldLength = 2300;

            enemiesH = new EnemySprite[]
            {
                new EnemySprite(new Vector2((float)rand.Next(200, 1800), (float)rand.Next(50, 450)), true),
                new EnemySprite(new Vector2((float)rand.Next(200, 1800), (float)rand.Next(50, 450)), true),
                new EnemySprite(new Vector2((float)rand.Next(200, 1800), (float)rand.Next(50, 450)), false),
                new EnemySprite(new Vector2((float)rand.Next(200, 1800), (float)rand.Next(50, 450)), false),
                new EnemySprite(new Vector2((float)rand.Next(200, 1800), (float)rand.Next(50, 450)), false)
            };
            enemiesV = new EnemySprite2[]
            {
                new EnemySprite2(new Vector2((float)rand.Next(50, 1950), (float)rand.Next(200, 300)), true),
                new EnemySprite2(new Vector2((float)rand.Next(50, 1950), (float)rand.Next(200, 300)), true),
                new EnemySprite2(new Vector2((float)rand.Next(50, 1950), (float)rand.Next(200, 300)), false),
                new EnemySprite2(new Vector2((float)rand.Next(50, 1950), (float)rand.Next(200, 300)), false),
                new EnemySprite2(new Vector2((float)rand.Next(50, 1950), (float)rand.Next(200, 300)), true)
            };
            enemiesO = new EnemySprite3[]
            {
                new EnemySprite3(new Vector2((float)rand.Next(100, 1900), (float)rand.Next(50, 450))),
                new EnemySprite3(new Vector2((float)rand.Next(100, 1900), (float)rand.Next(50, 450))),
                new EnemySprite3(new Vector2((float)rand.Next(100, 1900), (float)rand.Next(50, 450))),
                new EnemySprite3(new Vector2((float)rand.Next(100, 1900), (float)rand.Next(50, 450)))
            };
        }
Example #3
0
        /// <summary>
        /// Constructor that Takes in an int.
        /// </summary>
        /// <param name="previousHp">The Hp from the previous level</param>
        public Level2(int previousHp, Game game)
        {
            System.Random rand = new Random();

            health             = new HealthSprite(previousHp);
            hp                 = previousHp;
            player             = new PlayerSprite();
            player.WorldLength = 2073;

            enemiesH = new EnemySprite[]
            {
                new EnemySprite(new Vector2((float)rand.Next(300, 1800), (float)rand.Next(50, 450)), true),
                new EnemySprite(new Vector2((float)rand.Next(300, 1800), (float)rand.Next(50, 450)), true),
                new EnemySprite(new Vector2((float)rand.Next(300, 1800), (float)rand.Next(50, 450)), false),
                new EnemySprite(new Vector2((float)rand.Next(300, 1800), (float)rand.Next(50, 450)), false),
                new EnemySprite(new Vector2((float)rand.Next(300, 1800), (float)rand.Next(50, 450)), false)
            };
            enemiesV = new EnemySprite2[]
            {
                new EnemySprite2(new Vector2((float)rand.Next(100, 1950), (float)rand.Next(200, 300)), true),
                new EnemySprite2(new Vector2((float)rand.Next(100, 1950), (float)rand.Next(200, 300)), true),
                new EnemySprite2(new Vector2((float)rand.Next(100, 1950), (float)rand.Next(200, 300)), false),
                new EnemySprite2(new Vector2((float)rand.Next(100, 1950), (float)rand.Next(200, 300)), false),
                new EnemySprite2(new Vector2((float)rand.Next(100, 1950), (float)rand.Next(200, 300)), true)
            };
            enemiesO = new EnemySprite3[]
            {
                new EnemySprite3(new Vector2((float)rand.Next(350, 1900), (float)rand.Next(50, 450))),
                new EnemySprite3(new Vector2((float)rand.Next(350, 1900), (float)rand.Next(50, 450))),
                new EnemySprite3(new Vector2((float)rand.Next(350, 1900), (float)rand.Next(50, 450))),
                new EnemySprite3(new Vector2((float)rand.Next(350, 1900), (float)rand.Next(50, 450)))
            };

            _lightBlood = new LightBloodParticleSystem(game, 30);
            game.Components.Add(_lightBlood);

            //_explosion = new ExplosionParticleSystem(game, 10);
            //game.Components.Add(_explosion);

            _rain = new RainParticleSystem(game, new Rectangle(0, -20, 3000, 10));
            game.Components.Add(_rain);
        }
Example #4
0
        //private ExplosionParticleSystem _explosion;

        /// <summary>
        /// Constructor for the level.
        /// </summary>
        public Level0(Game game)
        {
            health             = new HealthSprite();
            hp                 = health.Lives;
            player             = new PlayerSprite();
            player.WorldLength = 900;

            enemiesH = new EnemySprite[]
            {
                new EnemySprite(new Vector2(400, 200), true),
                new EnemySprite(new Vector2(320, 300), false)
            };
            enemiesV = new EnemySprite2[]
            {
                new EnemySprite2(new Vector2(650, 250), true),
                new EnemySprite2(new Vector2(250, 200), false)
            };

            lightBlood = new LightBloodParticleSystem(game, 30);
            game.Components.Add(lightBlood);

            //_explosion = new ExplosionParticleSystem(game, 10);
            //game.Components.Add(_explosion);
        }
Example #5
0
        /// <summary>
        /// Constructor for the level.
        /// </summary>
        public Level1()
        {
            System.Random rand = new Random();

            health             = new HealthSprite();
            hp                 = health.Lives;
            player             = new PlayerSprite();
            player.WorldLength = 900;

            enemiesH = new EnemySprite[]
            {
                new EnemySprite(new Vector2((float)rand.Next(420, 700), (float)rand.Next(20, 475)), true),
                new EnemySprite(new Vector2((float)rand.Next(420, 700), (float)rand.Next(20, 475)), true),
                new EnemySprite(new Vector2((float)rand.Next(420, 700), (float)rand.Next(20, 475)), false),
                new EnemySprite(new Vector2((float)rand.Next(420, 700), (float)rand.Next(20, 475)), false)
            };
            enemiesV = new EnemySprite2[]
            {
                new EnemySprite2(new Vector2((float)rand.Next(320, 700), (float)rand.Next(20, 475)), true),
                new EnemySprite2(new Vector2((float)rand.Next(320, 700), (float)rand.Next(20, 475)), true),
                new EnemySprite2(new Vector2((float)rand.Next(320, 700), (float)rand.Next(20, 475)), false),
                new EnemySprite2(new Vector2((float)rand.Next(320, 700), (float)rand.Next(20, 475)), false)
            };
        }