2022-11-01 20:31:22 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name= "LimboState" inherits= "Node" version= "3.5" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../../../doc/class.xsd" >
<brief_description >
2022-11-04 12:27:09 +00:00
A State node for Hierarchical State Machine (HSM).
2022-11-01 20:31:22 +00:00
</brief_description>
<description >
</description>
<tutorials >
</tutorials>
<methods >
<method name= "_enter" qualifiers= "virtual" >
<return type= "void" />
<description >
2022-11-04 12:27:09 +00:00
Called when state is entered.
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "_exit" qualifiers= "virtual" >
<return type= "void" />
<description >
2022-11-04 12:27:09 +00:00
Called when state is exited.
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "_setup" qualifiers= "virtual" >
<return type= "void" />
<description >
2022-11-04 12:27:09 +00:00
Called once during intialization.
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "_update" qualifiers= "virtual" >
<return type= "void" />
<argument index= "0" name= "p_delta" type= "float" />
<description >
2022-11-04 12:27:09 +00:00
Called during update.
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "add_event_handler" >
<return type= "void" />
<argument index= "0" name= "p_event" type= "String" />
<argument index= "1" name= "p_method" type= "String" />
<description >
2022-11-04 12:27:09 +00:00
Register [code]p_method[/code] that will be called when [code]p_event[/code] happens. Method must belong to the state.
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "call_on_enter" >
<return type= "LimboState" />
<argument index= "0" name= "p_object" type= "Object" />
<argument index= "1" name= "p_method" type= "String" />
<description >
2022-11-04 12:27:09 +00:00
A chained method that connects [signal entered] signal to a [code]p_method[/code] on a [p_object].
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "call_on_exit" >
<return type= "LimboState" />
<argument index= "0" name= "p_object" type= "Object" />
<argument index= "1" name= "p_method" type= "String" />
<description >
2022-11-04 12:27:09 +00:00
A chained method that connects [signal exited] signal to a [code]p_method[/code] on a [p_object].
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "call_on_update" >
<return type= "LimboState" />
<argument index= "0" name= "p_object" type= "Object" />
<argument index= "1" name= "p_method" type= "String" />
<description >
2022-11-04 12:27:09 +00:00
A chained method that connects [signal updated] signal to a [code]p_method[/code] on a [p_object].
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "clear_guard_func" >
<return type= "void" />
<description >
2022-11-04 12:27:09 +00:00
Removes the guard function that was set by [method set_guard_func].
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "dispatch" >
<return type= "bool" />
<argument index= "0" name= "p_event" type= "String" />
<argument index= "1" name= "p_cargo" type= "Variant" default= "null" />
<description >
2022-11-04 12:27:09 +00:00
Dispatches recursively a state machine event named [code]p_event[/code] with an optional argument [code]p_cargo[/code]. Returns [code]true[/code] if event was consumed.
Events propagate from the leaf state to the root. Propagation stops as soon as some state consumes the event.
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "get_root" qualifiers= "const" >
<return type= "LimboState" />
<description >
2022-11-04 12:27:09 +00:00
Returns the root [LimboState].
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "is_active" qualifiers= "const" >
<return type= "bool" />
<description >
2022-11-04 12:27:09 +00:00
Returns [code]true[/code] if it is currently active, i.e. it is the active substate of the parent [LimboHSM].
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "named" >
<return type= "LimboState" />
<argument index= "0" name= "p_name" type= "String" />
<description >
2022-11-04 12:27:09 +00:00
A chained method that sets the name of this state.
2022-11-01 20:31:22 +00:00
</description>
</method>
<method name= "set_guard_func" >
<return type= "void" />
<argument index= "0" name= "p_object" type= "Object" />
<argument index= "1" name= "p_func" type= "String" />
<argument index= "2" name= "p_binds" type= "Array" default= "[ ]" />
<description >
2022-11-04 12:27:09 +00:00
Sets the guard function. It is a function that will be called each time a transition to this state should happen. If that function returns [code]false[/code], that transition will not be allowed.
2022-11-01 20:31:22 +00:00
</description>
</method>
</methods>
<members >
<member name= "EVENT_FINISHED" type= "String" setter= "" getter= "event_finished" >
2022-11-04 12:27:09 +00:00
A commonly used event that signifies that the state has finished work.
2022-11-01 20:31:22 +00:00
</member>
<member name= "agent" type= "Object" setter= "set_agent" getter= "get_agent" >
2022-11-04 12:27:09 +00:00
An agent that is associated with the state. Assinged by initialization.
2022-11-01 20:31:22 +00:00
</member>
<member name= "blackboard" type= "Blackboard" setter= "" getter= "get_blackboard" >
2022-11-04 12:27:09 +00:00
A key/value data store shared by states of the state machine this state belongs to.
2022-11-01 20:31:22 +00:00
</member>
</members>
<signals >
<signal name= "entered" >
<description >
2022-11-04 12:27:09 +00:00
Emitted when the state is entered.
2022-11-01 20:31:22 +00:00
</description>
</signal>
<signal name= "exited" >
<description >
2022-11-04 12:27:09 +00:00
Emitted when the state is exited.
2022-11-01 20:31:22 +00:00
</description>
</signal>
<signal name= "setup" >
<description >
2022-11-04 12:27:09 +00:00
Emitted when the state is initialized.
2022-11-01 20:31:22 +00:00
</description>
</signal>
<signal name= "updated" >
<argument index= "0" name= "p_delta" type= "float" />
<description >
2022-11-04 12:27:09 +00:00
Emitted when the state is updated.
2022-11-01 20:31:22 +00:00
</description>
</signal>
</signals>
<constants >
</constants>
</class>