Afterglow.Input.InputDeviceBase.CheckDownButton C# (CSharp) Method

CheckDownButton() protected method

Checks whether the button which is down was registered for an action and executes the action.
protected CheckDownButton ( Button button ) : void
button Button The button.
return void
        protected void CheckDownButton(Button button)
        {
            if (RegisteredButtons.ContainsKey(button))
            {
                var buttonAction = RegisteredButtons[button];
                buttonAction.WasDown = true;
                if (buttonAction.State == ButtonState.IsDown)
                {
                    buttonAction.ExecuteAction();
                }
            }
        }