コード例 #1
0
 private void SetupButtons(string button_a, string button_b, string button_x, string button_y)
 {
     buttonA = new JoystickButton(this, button_a, ButtonCode.A);
     buttonB = new JoystickButton(this, button_b, ButtonCode.B);
     buttonX = new JoystickButton(this, button_x, ButtonCode.X);
     buttonY = new JoystickButton(this, button_y, ButtonCode.Y);
 }
コード例 #2
0
 private void ButtonUpdate(JoystickButton button)
 {
     if (button.GetButton())
     {
         if (!button.IsHeld)
         {
             buttonInput.OnButtonPressed(button.Code);
             button.IsHeld = true;
         }
         buttonInput.OnButtonHeld(button.Code);
     }
     else
     {
         if (button.IsHeld)
         {
             buttonInput.OnButtonReleased(button.Code);
         }
         button.IsHeld = false;
     }
 }
コード例 #3
0
 private void SetupBumpers(string left_bumper, string right_bumper)
 {
     buttonLeftBumper  = new JoystickButton(this, left_bumper, ButtonCode.LeftBumper);
     buttonRightBumper = new JoystickButton(this, right_bumper, ButtonCode.RightBumper);
 }
コード例 #4
0
 private void SetupMenusButtons(string button_start, string button_back)
 {
     buttonStart = new JoystickButton(this, button_start, ButtonCode.Start);
     buttonBack  = new JoystickButton(this, button_back, ButtonCode.Back);
 }
コード例 #5
0
 private void SetupStickButtons(string button_left_stick, string button_right_stick)
 {
     buttonLeftStick  = new JoystickButton(this, button_left_stick, ButtonCode.LeftStick);
     buttonRightStick = new JoystickButton(this, button_right_stick, ButtonCode.RightStick);
 }