A core class which represents the current player(s) and their controls and other configuration.

Static variables

@:value(0)staticread onlynumAvatars:Int = 0

@:value(0)staticread onlynumPlayers:Int = 0

@:value(new FlxTypedSignal<PlayerSettings>())staticread onlyonAvatarAdd:FlxTypedSignal<PlayerSettings ‑> Void> = new FlxTypedSignal<PlayerSettings>()

@:value(new FlxTypedSignal<PlayerSettings>())staticread onlyonAvatarRemove:FlxTypedSignal<PlayerSettings ‑> Void> = new FlxTypedSignal<PlayerSettings>()

@:nullSafety(Off)staticread onlyplayer1:PlayerSettings

@:nullSafety(Off)staticread onlyplayer2:PlayerSettings

Static methods

staticget(id:Int):Null<PlayerSettings>

Return the PlayerSettings for the given player number, or null if that player isn't active.

Parameters:

id

The player number this represents.

Returns:

The PlayerSettings for the given player number, or null if that player isn't active.

staticinit():Void

Initialize the PlayerSettings singletons for each player.

@:nullSafety(Off)staticreset():Void

Forcibly destroy the PlayerSettings singletons for each player.

Variables

read onlycontrols:Controls

The controls handler for this player.

read onlyid:Int

The player number associated with this settings object.

Methods

saveControls():Void

Save this player's controls to the game's persistent save.