flixel.util.typeLimit

..
InitialState

A utility type that allows methods to accept multiple types, when dealing with "future" FlxStates. Prior to haxeFlixel 6, the FlxGame constructor took a FlxState class which meant initial FlxStatescould not have constructor args. In version 6.0.0 and higher, it now takes a function that returns a newly created instance.

NextState

A utility type that allows methods to accept multiple types, when dealing with "future" FlxStates. Prior to haxeFlixel 6, FlxG.switchState and other similar methods took a FlxState instance which meant FlxStates were instantiated before the previous state was destroyed, potentially causing errors. It also meant states with args couldn't be reset via FlxG.resetState. In version 5.6.0 and higher, these methods now take a function that returns a newly created instance. This allows the state's instantiation to happen after the previous state is destroyed.

OneOfFour

Useful to limit a Dynamic function argument's type to the specified type parameters. This does NOT make the use of Dynamic type-safe in any way (the underlying type is still Dynamic and Std.is() checks + casts are necessary).

OneOfThree

Useful to limit a Dynamic function argument's type to the specified type parameters. This does NOT make the use of Dynamic type-safe in any way (the underlying type is still Dynamic and Std.is() checks + casts are necessary).

OneOfTwo

Useful to limit a Dynamic function argument's type to the specified type parameters. This does NOT make the use of Dynamic type-safe in any way (the underlying type is still Dynamic and Std.is() checks + casts are necessary).