Exemplo n.º 1
0
        private void update()
        {
            if (!gameOver)
            {
                this.Text = $"Score: {score}";
                bird.fall(gravityValue);
                pipe1.Move();
                pipe2.Move();
                CreateWall();

                if (CheckGameOver(pipe1) || CheckGameOver(pipe2) || CheckGameOver())
                {
                    gameOver = true;
                }

                updateScore();
                Invalidate();
            }
            else
            {
                timer1.Stop();
            }
        }