updateState method

  1. @override
void updateState(
  1. GamepadState state
)
override

Any logic to run before checking parseInputs.

Implementation

@override
void updateState(GamepadState state) {
  if (bumperFlag != 0) bumperFlag = 0;
  if (state.leftShoulder && !leftBumper) bumperFlag = -1;
  if (state.rightShoulder && !rightBumper) bumperFlag = 1;
  leftBumper = state.leftShoulder;
  rightBumper = state.rightShoulder;
}