Exemplo n.º 1
0
        private void SetupEndGame()
        {
            endGameOverlay.AdditionMoney = Level;
            endGameOverlay.Score         = Level;
            endGameOverlay.HighScore     = GameSettingHelper.GetHighScore();
            tempMoney = GameSettingHelper.GetMoney();
            endGameOverlay.TotalMoney = tempMoney;
            GameSettingHelper.SetMoney(tempMoney + Level);

            endGameOverlay.Show();
        }
Exemplo n.º 2
0
        public void NextLevel()
        {
            Level++;
            if (Level > GameSettingHelper.GetHighScore())
            {
                GameSettingHelper.SetHighScore(Level);
            }

            var blocks = GenerateNewBlocks();

            ListBrick.Instance.NextLevel(blocks.Where(x => x.Type == BlockType.Brick).ToList());
            ListItemAddBall.Instance.AddItems(blocks.Where(x => x.Type == BlockType.ItemAddBall).Select(x => x.Column));
            ListItemAddBall.Instance.MoveDown();
            ListItemAddCoin.Instance.AddItems(blocks.Where(x => x.Type == BlockType.ItemAddCoin).Select(x => x.Column));
            ListItemAddCoin.Instance.MoveDown();
            ListItemClearColumn.Instance.AddItems(blocks.Where(x => x.Type == BlockType.ItemClearColumn).Select(x => x.Column));
            ListItemClearColumn.Instance.MoveDown();
            ListItemClearRow.Instance.AddItems(blocks.Where(x => x.Type == BlockType.ItemClearRow).Select(x => x.Column));
            ListItemClearRow.Instance.MoveDown();
            ListItemSpreadBall.Instance.AddItems(blocks.Where(x => x.Type == BlockType.ItemSpreadBall).Select(x => x.Column));
            ListItemSpreadBall.Instance.MoveDown();
        }
Exemplo n.º 3
0
        public override void Update(GameTime gameTime)
        {
            if (endGameOverlay.Visible)
            {
                endGameOverlay.Update(gameTime);
                return;
            }

            if (continueOverlay.Visible)
            {
                return;
            }

            if (pauseOverlay.Visible)
            {
                return;
            }

            playScore.Text     = Level.ToString("N0");
            playHighScore.Text = "TOP " + GameSettingHelper.GetHighScore().ToString("N0");
            playMoney.Text     = GameSettingHelper.GetMoney().ToString("N0");
            base.Update(gameTime);
        }