Exemplo n.º 1
0
        public void resetPosition(Constants.LEVELS level)
        {
            if (level != Constants.LEVELS.ISPIT)
            {
                this.PositionX = 540;
                this.PositionY = 1300;
            }
            else
            {
                this.PositionX = 1170;
                this.PositionY = 600;
            }

            this.Width  = 100;
            this.Height = 100;
        }
Exemplo n.º 2
0
        private void lblTimer_Tick(object sender, EventArgs e)
        {
            Constants.LEVELS currentLevel = gameView.gameScene.currentLevel;
            lblPointsHealth.Text = "Поени: " + gameView.gameScene.player.Score.ToString() + " | Здравје: " + gameView.gameScene.player.Health + "%";
            lblLevel.Text        = "Ниво: ";

            if (currentLevel == Constants.LEVELS.KAMPUS_DVOR)
            {
                lblLevel.Text += "Кампус двор";
            }
            else if (currentLevel == Constants.LEVELS.BARAKI_VLEZ)
            {
                lblLevel.Text += "Бараки";
            }
            else if (currentLevel == Constants.LEVELS.ISPIT)
            {
                lblLevel.Text += "Б2.2";
            }
        }
Exemplo n.º 3
0
        public void changeLevel(Constants.LEVELS level)
        {
            enemies.Clear();
            activeBullets.Clear();

            if (level == Constants.LEVELS.KAMPUS_DVOR)
            {
                GameSettings.mapHasWalls    = false;
                GameSettings.wallBounds     = 0;
                Map.Location                = new Point(0, -780);
                GameSettings.mapLowerBoundY = 1500;
                GameSettings.mapUpperBoundY = 780;
                this.Map.BackgroundImage    = Properties.Resources.kampus_dvor;
                this.currentLevel           = Constants.LEVELS.KAMPUS_DVOR;
            }
            else if (level == Constants.LEVELS.BARAKI_VLEZ)
            {
                GameSettings.mapHasWalls    = true;
                GameSettings.wallBounds     = 150;
                Map.Location                = new Point(0, -780);
                GameSettings.mapLowerBoundY = 1500;
                GameSettings.mapUpperBoundY = 780;
                this.Map.BackgroundImage    = Properties.Resources.baraki_vlez;
                this.currentLevel           = Constants.LEVELS.BARAKI_VLEZ;
            }
            else if (level == Constants.LEVELS.ISPIT)
            {
                GameSettings.mapHasWalls    = true;
                GameSettings.wallBounds     = 150;
                Map.Location                = new Point(0, 0);
                GameSettings.mapLowerBoundY = 720;
                GameSettings.mapUpperBoundY = 0;
                this.Map.BackgroundImage    = Properties.Resources.B22;
                this.currentLevel           = Constants.LEVELS.ISPIT;

                gameBoss = new Boss(Constants.BossTargetLocations[0].X, Constants.BossTargetLocations[0].Y);
                gameBoss.targetLocation = Constants.BossTargetLocations[0];
                this.enemies.Add(gameBoss);
            }

            player.resetPosition(currentLevel);
        }