Exemplo n.º 1
0
        private void tick_Tick(object sender, EventArgs e)
        {
            if (gameRunning)
            {
                if (!String.Equals(gameOverLbl.Text, "Y O U   W I N !"))
                {
                    drawingPanel.Invalidate();
                    lblScore1.Text = manager.score.ToString();
                }

                if (manager.Count())
                {
                    GameWon();
                }
                else if (manager.GetPlayerLives() < playersLivesLeft)
                {
                    DeductPlayerLife();
                }
                else if (manager.AlienHitBottom() || manager.PlayerDead())
                {
                    GameLost();
                }
            }
        }