Пример #1
0
        private static void Main(string[] args)
        {
            #region Build World, Player
            WorldListBuilder.Generate();
            #region Music - Used for testing will me moved to another location
            //SoundPlayer music = new SoundPlayer();
            //music.SoundLocation = (@"../../.../Engine/Docs/Music/GodMode.wav");
            //music.Play();
            #endregion
            GameTitle.Title();
            Console.WriteLine("");
            LocationCurrent.CurrentLocation();
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("Type help to see list of commands");
            Console.Write("> ");
            #endregion

            while (true)
            {
                Console.ForegroundColor = ConsoleColor.White;
                Console.WriteLine("< " + Player._player.NamePlayer + "-" + Player._player.ClassPlayer + " > <" + Player._player.HpCurrent + "/" + Player._player.HpMax + " HP" + " >");
                Console.Write("> ");
                string inputUser = Console.ReadLine();

                if (string.IsNullOrWhiteSpace(inputUser))
                {
                    continue;
                }

                string lowerInput = inputUser.ToLower();
                Console.WriteLine(" ");

                if (lowerInput == "exit") //upon exit save player data
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("Saving character");
                    SavePlayerData.SaveGameData(Player._player);
                    break;
                }

                ParseInput(lowerInput);
            }
        }