public void AssignActionToMainControllerPrompt(string action, string commandText) { if (mainPrompt != null) { DisableMainControllerPrompt(); } mainPrompt = UserInterface.Instance.InstantiatePrefab(controllerPromptPrefab, overlay: true).GetComponent <ControllerPrompt>(); mainPrompt.AtomicActions = PlayerActionsMap.GetAtomicActions(action); mainPrompt.CompositeActionText = commandText; PositionMainControllerPrompt(); }
public IEnumerator DelayDisableMainControlPrompt(float delay, ControllerPrompt main, bool destroySelf) { yield return(new WaitForSecondsRealtime(delay)); if (main == ControllerPromptManager.Instance.MainPrompt) { ControllerPromptManager.Instance.DisableMainControllerPrompt(); } if (destroySelf) { Destroy(gameObject); } }