예제 #1
0
파일: InputEvent.cs 프로젝트: lfdelta/Nid3D
        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;
            }
        }
예제 #2
0
 public static bool GetButtonUp(string buttonName)
 {
     return(InputManager.GetButtonUp(buttonName));
 }