Ejemplo n.º 1
0
    private void UpdateUI()
    {
        scoreText.text = pacMan.GetScore() + "";
        if (pacManLife == 3)
        {
            pacmanLife2.enabled = true;
            pacmanLife3.enabled = true;
        }
        if (pacManLife == 2)
        {
            pacmanLife2.enabled = true;
            pacmanLife3.enabled = false;
        }
        if (pacManLife == 1)
        {
            pacmanLife2.enabled = false;
            pacmanLife3.enabled = false;
        }

        roundText.text = round.ToString();
    }
Ejemplo n.º 2
0
        static void LoadGUI()
        {
            Console.ForegroundColor = ConsoleColor.Green;
            Console.SetCursorPosition(40, 2);
            Console.Write("Level: {0}", pacman.GetLevel());
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.SetCursorPosition(40, 4);
            Console.Write("Score: {0}", pacman.GetScore());
            Console.ForegroundColor = ConsoleColor.Red;
            Console.SetCursorPosition(40, 6);
            Console.Write("Lives: {0}", pacman.Lives());
            Console.ForegroundColor = ConsoleColor.Yellow;

            Console.SetCursorPosition(40, GameHeight - 8);
            Console.Write("{0}", new string('-', 29));
            Console.SetCursorPosition(40, GameHeight - 7);
            Console.Write("|  WCIŚNIJ P ABY ZAPUZOWAĆ  |");
            Console.SetCursorPosition(40, GameHeight - 6);
            Console.Write("| WCIŚNIJ ESC ABY ZAKOŃCZYĆ |");
            Console.SetCursorPosition(40, GameHeight - 5);
            Console.Write("{0}", new string('-', 29));
        }