Skip to content

GamepadStickBinding(GamepadStick, GamepadStickAxis, int) Constructor

Definition

Namespace: Brine2D.Input

Binds a gamepad stick (left or right) and returns one axis of the radial-deadzone result. Use Brine2D.Input.GamepadStick.Left or Brine2D.Input.GamepadStick.Right to select the stick, and GamepadStickAxis to select X or Y. This applies the same radial deadzone as GetGamepadLeftStick(int) / GetGamepadRightStick(int), giving consistent 2D behavior through the binding system. Edge detection (Brine2D.Input.GamepadStickBinding.IsPressed(Brine2D.Input.IInputContext) / Brine2D.Input.GamepadStickBinding.IsReleased(Brine2D.Input.IInputContext)) delegates to the underlying per-axis methods but cross-checks the radial deadzone result so that Brine2D.Input.GamepadStickBinding.IsPressed(Brine2D.Input.IInputContext) cannot fire when the radial magnitude is below threshold.

public GamepadStickBinding(Brine2D.Input.GamepadStick Stick, Brine2D.Input.GamepadStickAxis Axis, int GamepadIndex=0);

Parameters

Stick GamepadStick

Axis GamepadStickAxis

GamepadIndex System.Int32