JoinHelper class final Players and devices

Creates a player for each gamepad that presses a join button while unpaired, the local multiplayer join screen.

The first pad to join takes the default player when useDefaultPlayer is true; later pads get new players.

Constructors

JoinHelper(InputSystem system, {required void onJoin(PlayerInput player, InputDevice device), Set<Control> joinControls = const {GamepadControl.south, GamepadControl.start}, bool useDefaultPlayer = true, int? maxPlayers})
Starts watching system for join presses.

Properties

hashCode → int
The hash code for this object.
no setterinherited
joinControls → Set<Control>
The controls that join.
final
joined → List<PlayerInput>
The players that joined, in join order.
no setter
maxPlayers → int?
The most players that may join, or null for no limit.
final
onJoin → void Function(PlayerInput player, InputDevice device)
Called with the player a pad joined as.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
system → InputSystem
The system watched.
final
useDefaultPlayer → bool
Whether the first join takes the default player.
final

Methods

dispose() → void
Stops watching.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited