void Update() { UpdateWeaponsDemo(); UpdateShooting(); UpdateInteractableHint(); UpdateScope(); UpdateAwarenessUI(); if (ActionsInterface.GetActionDown(mainMenuAction, false, -1, true)) { // if (UIManager.instance.mainMenu.isOpen) { // UIManager.instance.mainMenu.CloseMenu(); // } // else { // UIManager.instance.mainMenu.OpenMenu(null); // } ManualMenu.mainMenu.ToggleMenu(null); } if (ActionsInterface.GetActionDown(quickInventoryAction, false, -1, true)) { ManualMenu.ToggleMenu(quickInventoryMenuName, new Actor[] { GameManager.playerActor }); } }
private static void Main(string[] args) { CreateConditionsForUnderline(); MainMenu menu = new MainMenu(); GetTempScale getTempScale = new GetTempScale(); string userChoice = menu.Run(); while (true) { if (userChoice == "1") { string tempScale = getTempScale.Run(); GettingWeatherAnimation(true); var location = GetCurrentCoordinates(); var lat = location.Item1; var lng = location.Item2; GetCurrentForecast(lat, lng, tempScale); FiveDayPrompt(lat, lng, tempScale); } if (userChoice == "2") { ManualMenu manualMenu = new ManualMenu(); var location = manualMenu.Run(); var stateOrRegion = location.Item1; var city = location.Item2; string tempScale = getTempScale.Run(); MapPoint point = GetGeocoordinatesFromGoogle(city, stateOrRegion); float lat = (float)point.Latitude; float lng = (float)point.Longitude; GettingWeatherAnimation(false); GetCurrentForecast(lat, lng, tempScale); FiveDayPrompt(lat, lng, tempScale); } else { break; } } }
// ActionHintsPanel _interactablePrompt; // ActionHintsPanel interactablePrompt { get { return UIManager.GetUIComponentByName<ActionHintsPanel>("InteractionHint", ref _interactablePrompt); } } void UpdateInteractableHint() { if (GameManager.isPaused) { return; } RaycastHit hit; if (Physics.Raycast(GameManager.playerCamera.transform.position, GameManager.playerCamera.transform.forward, out hit, 3)) { if (hit.transform.name == interactableName) { if (!lookingAtInteractable) { UIManager.ShowInteractionPrompt(0, "INTERACTABLE", new List <int> { 0, 3, 4 }, new List <string> { "USE", "TAKE", "EAT" }); // interactablePrompt.textUI.SetText("INTERACTABLE"); // interactablePrompt.FadeIn(.1f, 0, 0); // interactablePrompt.AddHintElements(new List<int> { 0, 3, 4 }, new List<string> { "USE", "TAKE", "EAT" }); // UIManager.ShowInteractablePrompt(0, .1f, new int[] { 0, 3, 4 }, new string[] { "USE", "TAKE", "EAT" }); lookingAtInteractable = true; } } else { if (lookingAtInteractable) { UIManager.HideInteractionPrompt(0); // interactablePrompt.FadeOut(.1f); // UIManager.HideInteractionHint(0, .1f); lookingAtInteractable = false; } } if (hit.transform.name == lootBoxName) { if (!lookingAtLootBox) { ManualMenu.OpenMenu("QuickTradeMenu", null); lookingAtLootBox = true; } } else { if (lookingAtLootBox) { ManualMenu.CloseMenu("QuickTradeMenu"); lookingAtLootBox = false; } } } else { if (lookingAtInteractable) { UIManager.HideInteractionPrompt(0); // interactablePrompt.FadeOut(.1f); // UIManager.HideInteractionHint(0, .1f); lookingAtInteractable = false; } if (lookingAtLootBox) { ManualMenu.CloseMenu("QuickTradeMenu"); lookingAtLootBox = false; } } }