/// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            // Backgrounds
              FileName = @"Assets\LevelOne.png";

              // Enemies
              for (int i = 0; i < 5; i++)
              {
            var ship = new Ship(this);
            int positionY = ship.Height + 10;
            int positionX = 150 + i * (ship.Width + 50);

            ship.Position = new Point(positionX, positionY);

            Actors.Add(ship);
              }

              for (int i = 0; i < 3; i++)
              {
              var ship2 = new Ship2(this);
              int positionY = ship2.Height + 50;
              int positionX = 230 + i * (ship2.Width + 50);

              ship2.Position = new Point(positionX, positionY);

              Actors.Add(ship2);
              }

              // Player
              Player = new PlayerShip(this);
              int playerPositionX = Size.Width / 2 - Player.Width / 2;
              int playerPositionY = Size.Height - Player.Height - 50;
              Player.Position = new Point(playerPositionX, playerPositionY);
              Actors.Add(Player);
        }
Beispiel #2
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            FileName = @"Assets\LevelOne.png";

            int positionX, positionY;

            for (int i = 0; i < 5; i++)
            {
                var ship = new Ship(this); 
                positionY = ship.Height + 10; 
                positionX = 150 + i * (ship.Width + 50);
                ship.Position = new Point(positionX, positionY);

                var redship = new RedShip(this); 
                positionY = redship.Height + 50; 
                positionX = 100 + i * (redship.Width + 50); 
                redship.Position = new Point(positionX, positionY);

                Actors.Add(ship);
                Actors.Add(redship);
            }

            Player = new PlayerShip(this);
            int playerPositionX = Size.Width / 2 - Player.Width / 2;
            int playerPositionY = Size.Height - Player.Height - 50;
            Player.Position = new Point(playerPositionX, playerPositionY);
            Actors.Add(Player);

            var lighting = new Lighting(this);
            int PositionX = Size.Width / 4 - lighting.Width / 2;
            int PositionY = Size.Height / 2 - lighting.Height / 2;
            lighting.Position = new Point(PositionX, PositionY);
            Actors.Add(lighting);
        }
Beispiel #3
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            // Backgrounds
              FileName = @"Assets\LevelOne.png";

              // Enemies
              for (int i = 0; i < 5; i++)
              {
            var ship = new Ship(this);
            int positionY = ship.Height + 100;
            int positionX = 150 + i * (ship.Width + 70);

            ship.Position = new Point(positionX, positionY);

              if (i%2 == 0)
              {
              ship.m_styleoffly = StyleOfFly.Sin;
              }
              else
              {
              ship.m_styleoffly = StyleOfFly.Cos;
              }

            Actors.Add(ship);
              }
              //for (int i = 0; i < 7; i++)
              //{
              //    var spaceship = new Spaceship(this);
              //    int positionY = spaceship.Height + 50;
              //    int positionX = 110 + i * (spaceship.Width + 55);

              //    spaceship.Position = new Point(positionX, positionY);

              //    spaceship.m_styleoffly = StyleOfFly.Vector;

              //    Actors.Add(spaceship);
              //}

              //SuperEnemy
              var lightning = new Lightning(this);
              int posY = lightning.Height + 10;
              int posX = lightning.Width + 50;

              lightning.Position = new Point(posX, posY);

              Actors.Add(lightning);

              // Player
              Player = new PlayerShip(this);
              int playerPositionX = Size.Width / 2 - Player.Width / 2;
              int playerPositionY = Size.Height - Player.Height - 50;
              Player.Position = new Point(playerPositionX, playerPositionY);
              Actors.Add(Player);
        }
Beispiel #4
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            // Backgrounds
            FileName = @"Assets\LevelOne.png";

            // Enemies
            for (int i = 0; i < 7; i++)
            {
                var ship = new Ship(this);
                int positionY = ship.Height + 10;
                int positionX = 150 + i*(ship.Width + 50);
                ship.Position = new Point(positionX, positionY);

                Actors.Add(ship);
            }
            // Enemies2
            for (int i = 0; i < 5; i++)
            {
                var ship2 = new Ship2(this);
                int positionY1 = ship2.Height + 30;
                int positionX1 = 180 + i * (ship2.Width + 50);

                ship2.Position = new Point(positionX1, positionY1);

                Actors.Add(ship2);
            }
            for (int i = 0; i < 4; i++)
            {
                var ship3 = new Ship3(this);
                int positionY = ship3.Height + 70;
                int positionX = 180 + i*(ship3.Width + 50);
                ship3.Position = new Point(positionX, positionY);

                //присваиваем значение Ship куда он должен лететь true false

                ship3.Movement = i < 2;
                Actors.Add(ship3);
            }

               // Player
            Player = new PlayerShip(this);
            int playerPositionX = Size.Width/2 - Player.Width/2;
            int playerPositionY = Size.Height - Player.Height - 50;
            Player.Position = new Point(playerPositionX, playerPositionY);
            Actors.Add(Player);

            var superm = new Superman(this);
            int positionYS = superm.Height + 10;
            int positionXS = superm.Width + 10;
            superm.Position = new Point(positionXS, positionYS);
            Actors.Add(superm);
        }
Beispiel #5
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            // Backgrounds
            FileName = @"Assets\LevelOne.png";

            // Enemies
            for (int i = 0; i < 5; i++)
            {
                var ship = new Ship(this);
                int positionY = ship.Height + 50;
                int positionX = 150 + i * (ship.Width + 50);
                ship.Position = new Point(positionX, positionY);

                var ship1 = new Ship1(this);
                int positionY1 = ship.Height + 10;
                int positionX1 = 150 + i * (ship1.Width + 50);
                ship1.Position = new Point(positionX1, positionY1);

                var ship3 = new Ship(this);
                int positionY2 = ship3.Height + 90;
                int positionX2 = 150 + i * (ship3.Width + 50);
                ship3.Position = new Point(positionX2, positionY2);

                var prepyt2 = new Prepyt2(this);
                int positionY4 = prepyt2.Height + 170;
                int positionX4 = i * (prepyt2.Width + 93);
                prepyt2.Position = new Point(positionX4, positionY4);

                Actors.Add(ship);
                Actors.Add(ship1);
                Actors.Add(ship3);
                Actors.Add(prepyt2);
            }
            // Blocks
            for (int i = 0; i < 11; i++)
            {
                var prepyt = new Prepyt(this);
                int positionY3 = prepyt.Height + 130;
                int positionX3 = 50 + i * (prepyt.Width);
                prepyt.Position = new Point(positionX3, positionY3);

                Actors.Add(prepyt);
            }

            // Player
            Player = new PlayerShip(this);
            int playerPositionX = Size.Width / 2 - Player.Width / 2;
            int playerPositionY = Size.Height - Player.Height - 50;
            Player.Position = new Point(playerPositionX, playerPositionY);
            Actors.Add(Player);
        }
Beispiel #6
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            // Backgrounds
            FileName = @"Assets\LevelOne.png";

            //// Enemies

            for (int i = 0; i < 5; i++)
            {
                var ship = new Ship(this);
                int positionY = ship.Height + 10;
                int positionX = 150 + i*(ship.Width + 50);
                ship.Position = new Point(positionX, positionY);
                Actors.Add(ship);
            }

            for (int i = 0; i < 1; i++)
            {
                var Thunderbolt = new Thunderbolt(this);
                int positionY = Thunderbolt.Height + 200;
                int positionX = 170 + i * (Thunderbolt.Width + 100);
                Thunderbolt.Position = new Point(positionX, positionY);
                Actors.Add(Thunderbolt);
            }
            for (int i = 0; i < 4; i++)
            {
                var ship2 = new Ship2(this);
                int positionY = ship2.Height + 50;
                int positionX = 170 + i * (ship2.Width + 100);
                ship2.Position = new Point(positionX, positionY);
                Actors.Add(ship2);
            }

            for (int i = 0; i < 3; i++)
            {
                var starOfDeathShip = new StarOfDeathShip(this);
                int positionY = starOfDeathShip.Height + 90;
                int positionX = 160 + i*(starOfDeathShip.Width + 120);
                starOfDeathShip.Position = new Point(positionX, positionY);
                Actors.Add(starOfDeathShip);
            }

            // Player
            Player = new PlayerShip(this);
            int playerPositionX = Size.Width/2 - Player.Width/2;
            int playerPositionY = Size.Height - Player.Height - 50;
            Player.Position = new Point(playerPositionX, playerPositionY);
            Actors.Add(Player);
        }
Beispiel #7
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            //stopwatch
            m_stopwatch = new Stopwatch();
            m_stopwatch.Start();
              // Backgrounds
              FileName = @"Assets\LevelOne.png";

              // Enemies
              for (int i = 0; i < 5; i++)
              {
            var ship = new Ship(this);
            int positionY = ship.Height + 50;
            int positionX = 150 + i * (ship.Width + 50);

            ship.Position = new Point(positionX, positionY);

            ship.Check = i%2 == 0;

            Actors.Add(ship);
              }

            //=======
            //>>>>>>> parent of f10ca14... Revert "Создание нового класса врагов "Ultron" и добавление его на уровень"

              //Ultron
            var ultron = new Ultron(this);
            int ultronpositionY = ultron.Height + 90;
            int ultronpositionX = ultron.Width + 270;
            ultron.Position = new Point(ultronpositionX, ultronpositionY);
            Actors.Add(ultron);

              //Saboteur
              var thunderbolt = new Thunderbolt(this);
              int saboteurpositionY = Size.Height + 20;
              int saboteurpositionX = Size.Width;
              thunderbolt.Position = new Point(saboteurpositionX, saboteurpositionY);
              Actors.Add(thunderbolt);

            //<<<<<<< HEAD

              // Player
              Player = new PlayerShip(this);
              int playerPositionX = Size.Width / 2 - Player.Width / 2;
              int playerPositionY = Size.Height - Player.Height - 50;
              Player.Position = new Point(playerPositionX, playerPositionY);
              Actors.Add(Player);
        }
Beispiel #8
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            // Backgrounds
              FileName = @"Assets\LevelOne.png";

              // Enemies
              for (int i = 0; i < 5; i++)
              {
                var ship = new Ship(this);
                int positionY = ship.Height + 10;
                int positionX = 150 + i * (ship.Width + 50);

                ship.Position = new Point(positionX, positionY);

                Actors.Add(ship);
              }
                InitTimer();

              //myship
              for (int i = 0; i < 4; i++)
              {
                  var myship = new MyShip(this);
                  int positionY = myship.Height + 50;
                  int positionX = 150 + i * (myship.Width + 50);

                  myship.Direction = i < 2;

                  myship.Position = new Point(positionX, positionY);

                  Actors.Add(myship);
              }

              //Lightning
              var Lightning = new Lightning(this);
              int lightningPositionX = Size.Width / 2 - Lightning.Width / 2;
              int lightningPositionY = Size.Height/2 - Lightning.Height/2;

              Lightning.Position = new Point(lightningPositionX, lightningPositionY);
              Actors.Add(Lightning);

              // Player
              Player = new PlayerShip(this);
              int playerPositionX = Size.Width / 2 - Player.Width / 2;
              int playerPositionY = Size.Height - Player.Height - 50;

              Player.Position = new Point(playerPositionX, playerPositionY);
              Actors.Add(Player);
        }
Beispiel #9
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="LevelOne" /> class.
        /// </summary>
        public LevelOne()
        {
            // Backgrounds
              FileName = @"Assets\LevelOne.png";

              // Enemies
            for (int i = 0; i < 5; i++)
            {
            Ship = new Ship(this);
            Ship.Load();
            int positionY = Ship.Height + 10;
            int positionX = 150 + i*(Ship.Width + 50);

            Ship.Position = new Point(positionX, positionY + 40);

            Actors.Add(Ship);
            }

            for (int i = 0; i < 5; i++)
            {
            var ship = new Ships111(this);
            int positionY = ship.Height + 10;
            int positionX = 150 + i*(ship.Width + 50);

            ship.Position = new Point(positionX, positionY);

            Actors.Add(ship);
            }

            var BallLightning = new CLightning(this);
            int positionbullY = BallLightning.Height + 10;
            int positionbullX = BallLightning.Width + 20;

            BallLightning.Position = new Point(positionbullX, positionbullY);

            Actors.Add(BallLightning);

              // Player
              Player = new PlayerShip(this);
              int playerPositionX = Size.Width / 2 - Player.Width / 2;
              int playerPositionY = Size.Height - Player.Height - 50;
              Player.Position = new Point(playerPositionX, playerPositionY);
              Actors.Add(Player);

              BullShotTime.Start();
        }