Ejemplo n.º 1
0
    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();
    }
Ejemplo n.º 2
0
    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);
        }
    }