Skip to content

Commit

Permalink
Update documentation for NextState (HaxeFlixel#3160)
Browse files Browse the repository at this point in the history
* Update documentation for `NextState`

I noticed that the NextState.hx file had some tiny errors in it's documentation so i went ahead and fixed them.

* doc touch-up

---------

Co-authored-by: George Kurelic <[email protected]>
  • Loading branch information
Blue2359 and Geokureli authored Jun 2, 2024
1 parent 073b4c4 commit 34c6942
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flixel/util/typeLimit/NextState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package flixel.util.typeLimit;
import flixel.FlxState;

/**
* A utility type that allows methods to accept multiple types, when dealing with "future" F`lxStates`.
* 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
* 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 that 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 state instance. This
* allows the state's instantiation to happen after the previous state is destroyed.
*
* ## examples:
Expand Down

0 comments on commit 34c6942

Please sign in to comment.