A constructor defined in BBMOD_StateMachine.gml
new BBMOD_StateMachine()
A state machine.
Name | Description |
---|---|
Finished | If true then the state machine has reached its final state. |
OnEnter | A function executed on the start of the state of the state machine. It should take the state machine as the first argument. Default value is undefined . |
OnExit | A function executed on the end of the state machine. It should take the state machine as the first argument. Default value is undefined . |
OnPostUpdate | A function executed in the update method after the current state is updated. It should take the state machine as the first argument and delta time as the second argument. Default value is undefined . |
OnPreUpdate | A function executed in the update method before the current state is updated. It should take the state machine as the first argument and delta time as the second argument. Default value is undefined . |
OnStateChange | A function executed when the state changes. It should take the state machine as the first argument and its previous state as the second argument. Default value is undefined . |
Started | If false then the state machine has not yet entered its initial state. |
State | The current state or undefined . |
Name | Description |
---|---|
add_state | Adds a state to the state machine. |
change_state | Changes the state of the state machine and executes BBMOD_StateMachine.OnStateChange. |
finish | Enters the exit state of the state machine. |
start | Enters the initial state of the state machine. |
update | Executes function for the current state of the state machine (if defined). |
Copyright © 2024, BlueBurn. Built on September 07, 2024 using GMDoc.