public void UpdateFromSource(IGamepadInputSource source) { this.IsAvailable = source != null ? source.IsAvailable : false; if (source == null) return; for (int i = 0; i < this.ButtonPressed.Length; i++) { this.ButtonPressed[i] = source[(GamepadButton)i]; } for (int i = 0; i < this.AxisValue.Length; i++) { this.AxisValue[i] = source[(GamepadAxis)i]; } }
public void UpdateFromSource(IGamepadInputSource source) { this.IsAvailable = source != null ? source.IsAvailable : false; if (source == null) { return; } for (int i = 0; i < this.ButtonPressed.Length; i++) { this.ButtonPressed[i] = source[(GamepadButton)i]; } for (int i = 0; i < this.AxisValue.Length; i++) { this.AxisValue[i] = source[(GamepadAxis)i]; } }