updateState method
- @override
- GamepadState state
override
Any logic to run before checking parseInputs.
Implementation
@override
void updateState(GamepadState state) {
if (!leftShoulderFlag && state.leftShoulder) throttle -= 0.1;
leftShoulderFlag = state.leftShoulder;
if (!rightShoulderFlag && state.rightShoulder) throttle += 0.1;
rightShoulderFlag = state.rightShoulder;
throttle = throttle.clamp(0, 1);
}