예제 #1
0
        /// <summary>
        /// Adds the game over screen sprites.
        /// </summary>
        private void AddGameOver()
        {
            // TODO should be a sprite scene builder
            IDrawable      drawable = Game.Theme.DrawableFactory.Create("game-over");
            DrawableSprite ds       = new DrawableSprite(drawable);

            ds.X      = ds.Y = 0;
            ds.Width  = viewport.Width;
            ds.Height = viewport.Height;
            sprites.Add(ds);

            // Queue the redraw
            QueueDraw();

            // Do the high score processing
            HighScoreTable hst = Game.HighScores.GetTable(Game.Config);

            if (hst.IsHighScore(Game.Score))
            {
                // We need to get the username
                UserNameDialog dialog = new UserNameDialog();
                dialog.Run();
                dialog.Destroy();

                // Register it
                hst.RegisterScores(Game.Config.UserName, Game.Score);
            }

            // Show the high score
            HighScoreWindow hsw = new HighScoreWindow();

            hsw.ShowAll();
        }
예제 #2
0
        /// <summary>
        /// Triggered when the high scores are requested.
        /// </summary>
        private void OnHighScoresAction(
            object sender,
            EventArgs args)
        {
            HighScoreWindow window = new HighScoreWindow();

            window.ShowAll();
        }
예제 #3
0
        /// <summary>
        /// Adds the game over screen sprites.
        /// </summary>
        private void AddGameOver()
        {
            // TODO should be a sprite scene builder
            IDrawable drawable = Game.Theme.DrawableFactory.Create("game-over");
            DrawableSprite ds = new DrawableSprite(drawable);
            ds.X = ds.Y = 0;
            ds.Width = viewport.Width;
            ds.Height = viewport.Height;
            sprites.Add(ds);

            // Queue the redraw
            QueueDraw();

            // Do the high score processing
            HighScoreTable hst = Game.HighScores.GetTable(Game.Config);

            if (hst.IsHighScore(Game.Score))
            {
                // We need to get the username
                UserNameDialog dialog = new UserNameDialog();
                dialog.Run();
                dialog.Destroy();

                // Register it
                hst.RegisterScores(Game.Config.UserName, Game.Score);
            }

            // Show the high score
            HighScoreWindow hsw = new HighScoreWindow();
            hsw.ShowAll();
        }
예제 #4
0
        /// <summary>
        /// Triggered when the high scores are requested.
        /// </summary>
        private void OnHighScoresAction(
			object sender,
			EventArgs args)
        {
            HighScoreWindow window = new HighScoreWindow();
            window.ShowAll();
        }