Пример #1
0
        /// <summary>
        /// Handles the drawing part of the scene
        /// </summary>
        /// <param name="game">Game manager</param>
        public void Draw(Game game)
        {
            // Game is a generic class, so make sure to convert it to ConsoleGame
            ConsoleGame consoleGame = (ConsoleGame)game;
            // ConsoleGame has a screen to draw whereas Game doesn't
            ConsoleScreen consoleScreen = consoleGame.Screen;

            // Clears the whole screen
            consoleScreen.Clear();
            // Draw the gameover text
            consoleScreen.DrawText(3, 7, "    Your pet left you!\nTake better care next time!");
            // When we're done drawing everything we needed, updates the screen
            consoleScreen.Show();
        }