Пример #1
0
        private void ready()
        {
            Debug.Assert(state == GameState.Ready);

            // Reset score
            scoreCounter.Reset();

            // Play reset noise
            whooshSound.Play();

            // Flash screen to hide the UI/backdrop element transitions
            screenFlash.Flash(0.0, 700.0);

            // Reset state of game elements
            bird.Reset();
            obstacles.Reset();

            // Restart the backdrop elements
            groundBackdrop.Start();
            skyBackdrop.Start();

            // Reset the UI elements
            gameOverSprite.Hide();
            logoSprite.Show();
        }