Example #1
0
        private void EvaluateButton()
        {
            switch (inputState)
            {
            case InputState.Pressed:
                if (InputManager.GetButtonDown(buttonName, playerID))
                {
                    onAction.Invoke();
                }
                break;

            case InputState.Released:
                if (InputManager.GetButtonUp(buttonName, playerID))
                {
                    onAction.Invoke();
                }
                break;

            case InputState.Held:
                if (InputManager.GetButton(buttonName, playerID))
                {
                    onAction.Invoke();
                }
                break;
            }
        }
Example #2
0
 public static bool GetButtonUp(string buttonName)
 {
     return(InputManager.GetButtonUp(buttonName));
 }