Exemple #1
0
    void LateUpdate()
    {
        if (inputButton == InputManager.Button.UNASSIGNED)
        {
            return;
        }
        bool value = false;

        if (inputEdge == InputEdge.OnPress)
        {
            value = InputManager.GetButtonDown(inputButton, player);
        }
        else if (inputEdge == InputEdge.OnRelease)
        {
            value = InputManager.GetButtonUp(inputButton, player);
        }

        if (value && output != null)
        {
            output.Trigger();
        }
    }
    void LateUpdate()
    {
        if (input == "")
        {
            return;
        }
        bool value = false;

        if (inputEdge == InputEdge.OnPress)
        {
            value = Input.GetButtonDown(input);
        }
        else if (inputEdge == InputEdge.OnRelease)
        {
            value = Input.GetButtonUp(input);
        }

        if (value && output != null)
        {
            output.Trigger();
        }
    }