Releases: sohomsahaun/SnowState
Releases · sohomsahaun/SnowState
3.1.4
3.1.2
3.1.1
3.1.0
Change(s)
- Added new method:
.on()
. .change()
and.trigger()
has an extra argument - which can be used for passing data with the trigger/state change.- Removed the internal struct
__this
, which gives a mentionable performance boost. - Arguments in events now work in HTML5. The number of arguments has been limited to 16.
- Fixed bugs.
Issue(s) addressed
#22, #23, #24
Note
Please refer to the Documentation for updated API.
3.0.2
Change(s)
- Added new method:
.state_exists()
. - Small performance improvement.
Issue(s) addressed
#21
Note
Please refer to the Documentation for updated API.
3.0.1
Change(s)
.get_time()
and.set_time()
works in microseconds or steps now, instead of seconds or steps. This change is to keep the timer in parallel withget_timer()
in GML.
3.0.0
New Additions
- Triggered transitions!
- Added new methods:
.add_transition()
,.add_wildcard_transition()
,.add_reflexive_transition()
,.transition_exists()
,.trigger()
. - Added new macros:
SNOWSTATE_WILDCARD_TRANSITION_NAME
,SNOWSTATE_REFLEXIVE_TRANSITION_NAME
.
Important Change(s)
.get_time()
and.set_time()
has the optional argumentseconds
set totrue
by default. This is parallel to GML'sget_timer()
.- Deprecated history methods have been removed.
Improvement(s)
- Events now accept arguments! Which means we can do:
fsm.event("This", "is", "cool!");
- Fixed an issue with
.inherit()
. - Added JSDoc to all the methods.
Note
Please refer to the Documentation for updated API.
2.4.0
Change(s)
.get_time()
returns fractional steps now. (Previously it was rounded down)- Added new method(s):
.set_time()
and.event_get_current_function()
. - Renamed method(s):
.set_history_max_size()
to.history_set_max_size()
;.get_history_max_size()
to.history_get_max_size()
;.get_history()
to.history_get()
.
The previous names are deprecated and shouldn't be used anymore.
Note
Please refer to the Documentation for updated API.
2.3.0
Change(s)
- Added new method:
get_states
; which returns an array containing the states defined in the state machine. - Fixed an issue with
get_time
to give more accurate results when working with seconds. - Fixed a bug with history which caused an unexpected crash.
- Added optional arguments to methods:
state_is
,add
,add_child
.
Note
Please refer to the Documentation for updated API.
2.2.1
Change(s)
- Added new method:
event_exists
; which gives the ability to check if an event exists for the current state. Additionally, it also gives information about how the event is defined.
Issue(s) addressed
#10
Note
Please refer to the Documentation for updated API.