update method

void update(
  1. Map<String, dynamic> map
)

Implementation

void update(Map<String, dynamic> map) {
  leftThumbX = map['thumbs'][0];
  leftThumbY = map['thumbs'][1];
  rightThumbX = map['thumbs'][2];
  rightThumbY = map['thumbs'][3];

  leftTrigger = map['triggers'][0];
  rightTrigger = map['triggers'][1];

  buttons = List.generate((map['buttons'] as List).length,
      (index) => GamepadButton.values[map['buttons'][index] as int]);
}