Exemplo n.º 1
0
 // Use this for initialization
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemplo n.º 2
0
        public static void BattleshipEndingTitle()
        {
            Console.ForegroundColor = ConsoleColor.Red;

            Console.Title = "Battleship Console Game";
            Console.WriteLine(); // breakline
            string battleShipGameOverGraphic =
                @"
                       
                          _______      ___      .___  ___.  _______   ______   ____    ____  _______ .______      
                         /  _____|    /   \     |   \/   | |   ____| /  __  \  \   \  /   / |   ____||   _  \     
                        |  |  __     /  ^  \    |  \  /  | |  |__   |  |  |  |  \   \/   /  |  |__   |  |_)  |    
                        |  | |_ |   /  /_\  \   |  |\/|  | |   __|  |  |  |  |   \      /   |   __|  |      /     
                        |  |__| |  /  _____  \  |  |  |  | |  |____ |  `--'  |    \    /    |  |____ |  |\  \----.
                         \______| /__/     \__\ |__|  |__| |_______| \______/      \__/     |_______|| _| `._____|
                                                                                          
   
                ";

            typeWritter(battleShipGameOverGraphic);
            Console.WriteLine(); // breakline
            Console.ForegroundColor = ConsoleColor.Yellow;
            CenterText.centerText("Press enter to continue...");
            Console.ReadKey();
            Console.Clear();
        }
Exemplo n.º 3
0
        public static void PrintInventory(Player player)
        {
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("");
            var handText = File.ReadAllText(@"GameEntities/Player/Backpack/handText.txt");

            Console.WriteLine(handText);
            Console.WriteLine($"\n\n");
            Console.ResetColor();
            if (player.LeftHandItems.Count > 0)
            {
                Console.Write($"                 Left|hand:[{player.LeftHandItems[0].Name}]");
            }
            else
            {
                Console.Write("                      Left|hand: Is empty");
            }
            if (player.RightHandItems.Count > 0)
            {
                Console.WriteLine($"         Right|hand:[{player.RightHandItems[0].Name}]");
            }
            else
            {
                Console.Write("             Righ|hand: Is empty");
            }
            Console.WriteLine($"\n\n\n");
            CenterText.WriteCenterLine("Press any key to return...");
        }
        void ReleaseDesignerOutlets()
        {
            if (CenterText != null)
            {
                CenterText.Dispose();
                CenterText = null;
            }

            if (RightArrowImage != null)
            {
                RightArrowImage.Dispose();
                RightArrowImage = null;
            }

            if (LeftArrowImage != null)
            {
                LeftArrowImage.Dispose();
                LeftArrowImage = null;
            }

            if (UpArrowImage != null)
            {
                UpArrowImage.Dispose();
                UpArrowImage = null;
            }

            if (NavigateText != null)
            {
                NavigateText.Dispose();
                NavigateText = null;
            }

            if (NavigateButton != null)
            {
                NavigateButton.Dispose();
                NavigateButton = null;
            }
        }
Exemplo n.º 5
0
        public static void BattleshipOpeningTitle()
        {
            Console.ForegroundColor = ConsoleColor.Blue;

            Console.Title = "Battleship Console Game";
            Console.WriteLine(); // breakline
            string battleShipStartGraphic =
                @"
                        ########     ###    ######## ######## ##       ########  ######  ##     ## #### ########  
                        ##     ##   ## ##      ##       ##    ##       ##       ##    ## ##     ##  ##  ##     ## 
                        ##     ##  ##   ##     ##       ##    ##       ##       ##       ##     ##  ##  ##     ## 
                        ########  ##     ##    ##       ##    ##       ######    ######  #########  ##  ########  
                        ##     ## #########    ##       ##    ##       ##             ## ##     ##  ##  ##        
                        ##     ## ##     ##    ##       ##    ##       ##       ##    ## ##     ##  ##  ##        
                        ########  ##     ##    ##       ##    ######## ########  ######  ##     ## #### ##        
                ";

            Console.WriteLine(battleShipStartGraphic);
            Console.WriteLine(); // breakline
            Console.ForegroundColor = ConsoleColor.Yellow;
            CenterText.centerText("Press enter to continue...");
            Console.ReadKey();
            Console.Clear();
        }