Esempio n. 1
0
 public void ViewEvent()
 {
     if (Event.x == -1 || Event.y == -1)
     {
         Debug.LogError("Should not be able to center camera on this event");
     }
     Camera.MoveCameraTo(Event.x, Event.y);
     CityMenu.CloseMenu();
     NotificationMenu.CloseMenu();
 }
Esempio n. 2
0
        public async Task ShowAsync()
        {
            do
            {
                ConsoleHelper.ShowHeading("Cities");
                ConsoleHelper.ShowEnumValuesAsMenu <CityMenu>();

                CityMenu choice = ConsoleHelper.GetEnum <CityMenu>("Choose option: ", false);
                Console.Clear();

                switch (choice)
                {
                case CityMenu.ReturnToMainMenu:
                    return;

                case CityMenu.Add:
                    await AddAsync();

                    break;

                case CityMenu.Update:
                    await UpdateAsync();

                    break;

                case CityMenu.Delete:
                    await DeleteAsync();

                    break;

                case CityMenu.FindById:
                    await FindByIDAsync();

                    break;

                case CityMenu.ShowAll:
                    await ShowAllAsync();

                    break;

                case CityMenu.AdvancedSearch:
                    await AdvancedSearchAsync();

                    break;

                case CityMenu.ShowTotalCount:
                    await ShowTotalCountAsync();

                    break;
                }

                ConsoleHelper.ShowPressAnyKeyToContinue();
            } while (true);
        }
Esempio n. 3
0
        static public void GameMenu(CharacterClass character, Vendor vendor)
        {
            string inputAnswer = "";

            do
            {
                Console.Clear();
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine(AsciiArt.MainHeading());
                Console.ForegroundColor = ConsoleColor.DarkGreen;
                Console.WriteLine("-------------------------------------".PadLeft(58));
                Console.WriteLine("|     Main Menu                     |".PadLeft(58));
                Console.WriteLine("-------------------------------------".PadLeft(58));
                Console.WriteLine("|     Where to next:                |".PadLeft(58));
                Console.WriteLine("|     1. City                       |".PadLeft(58));
                Console.WriteLine("|     2. Adventure Menu             |".PadLeft(58));
                Console.WriteLine("|     3. Character Information      |".PadLeft(58));
                Console.WriteLine("|                                   |".PadLeft(58));
                Console.WriteLine("|     9. Try and leave island       |".PadLeft(58));
                Console.WriteLine("|     0. Quit Game                  |".PadLeft(58));
                Console.WriteLine("|                                   |".PadLeft(58));
                Console.WriteLine("-------------------------------------".PadLeft(58));

                Console.SetCursorPosition(27, 18);
                inputAnswer = Console.ReadLine();
                switch (inputAnswer)
                {
                case "1":

                    CityMenu.InCityMenu(character, vendor);
                    break;

                case "2":

                    Adventure.AdventureMenu(character);

                    break;

                case "3":
                    Console.Clear();
                    Console.WriteLine(character.ClassPrintInformation());
                    Console.ReadKey();
                    break;

                case "9":
                    Console.Clear();
                    inputAnswer = GameStory.Ending(character);


                    break;

                case "0":
                    Console.Clear();
                    Console.WriteLine("Maybe be able to save.. then we have to have a menu in the biggining start game and load");
                    Console.ReadKey();
                    break;

                default:
                    break;
                }
            } while (inputAnswer != "0");
        }