142 lines
4.9 KiB
XML
142 lines
4.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="LimboState" inherits="Node" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
|
<brief_description>
|
|
A State node for Hierarchical State Machine (HSM).
|
|
</brief_description>
|
|
<description>
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="_enter" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when state is entered.
|
|
</description>
|
|
</method>
|
|
<method name="_exit" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when state is exited.
|
|
</description>
|
|
</method>
|
|
<method name="_setup" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called once during intialization.
|
|
</description>
|
|
</method>
|
|
<method name="_update" qualifiers="virtual">
|
|
<return type="void" />
|
|
<param index="0" name="p_delta" type="float" />
|
|
<description>
|
|
Called during update.
|
|
</description>
|
|
</method>
|
|
<method name="add_event_handler">
|
|
<return type="void" />
|
|
<param index="0" name="p_event" type="String" />
|
|
<param index="1" name="p_handler" type="Callable" />
|
|
<description>
|
|
Register [code]p_method[/code] that will be called when [code]p_event[/code] happens. Method must belong to the state.
|
|
</description>
|
|
</method>
|
|
<method name="call_on_enter">
|
|
<return type="LimboState" />
|
|
<param index="0" name="p_callable" type="Callable" />
|
|
<description>
|
|
A chained method that connects [signal entered] signal to a [code]p_method[/code] on a [p_object].
|
|
</description>
|
|
</method>
|
|
<method name="call_on_exit">
|
|
<return type="LimboState" />
|
|
<param index="0" name="p_callable" type="Callable" />
|
|
<description>
|
|
A chained method that connects [signal exited] signal to a [code]p_method[/code] on a [p_object].
|
|
</description>
|
|
</method>
|
|
<method name="call_on_update">
|
|
<return type="LimboState" />
|
|
<param index="0" name="p_callable" type="Callable" />
|
|
<description>
|
|
A chained method that connects [signal updated] signal to a [code]p_method[/code] on a [p_object].
|
|
</description>
|
|
</method>
|
|
<method name="clear_guard">
|
|
<return type="void" />
|
|
<description>
|
|
Removes state's guard function that was set by [method set_guard].
|
|
</description>
|
|
</method>
|
|
<method name="dispatch">
|
|
<return type="bool" />
|
|
<param index="0" name="p_event" type="String" />
|
|
<param index="1" name="p_cargo" type="Variant" default="null" />
|
|
<description>
|
|
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. States will consume event if they have a transition associated with it, or an event handler. See also [method add_event_handler].
|
|
</description>
|
|
</method>
|
|
<method name="get_root" qualifiers="const">
|
|
<return type="LimboState" />
|
|
<description>
|
|
Returns the root [LimboState].
|
|
</description>
|
|
</method>
|
|
<method name="is_active" qualifiers="const">
|
|
<return type="bool" />
|
|
<description>
|
|
Returns [code]true[/code] if it is currently active, i.e. it is the active substate of the parent [LimboHSM].
|
|
</description>
|
|
</method>
|
|
<method name="named">
|
|
<return type="LimboState" />
|
|
<param index="0" name="p_name" type="String" />
|
|
<description>
|
|
A chained method that sets the name of this state.
|
|
</description>
|
|
</method>
|
|
<method name="set_guard">
|
|
<return type="void" />
|
|
<param index="0" name="p_guard_callable" type="Callable" />
|
|
<description>
|
|
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], the transition will not be allowed.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="EVENT_FINISHED" type="String" setter="" getter="event_finished">
|
|
A commonly used event that signifies that the state has finished work.
|
|
</member>
|
|
<member name="agent" type="Node" setter="set_agent" getter="get_agent">
|
|
An agent that is associated with the state. Assinged by initialization.
|
|
</member>
|
|
<member name="blackboard" type="Blackboard" setter="" getter="get_blackboard">
|
|
A key/value data store shared by states of the state machine this state belongs to.
|
|
</member>
|
|
</members>
|
|
<signals>
|
|
<signal name="entered">
|
|
<description>
|
|
Emitted when the state is entered.
|
|
</description>
|
|
</signal>
|
|
<signal name="exited">
|
|
<description>
|
|
Emitted when the state is exited.
|
|
</description>
|
|
</signal>
|
|
<signal name="setup">
|
|
<description>
|
|
Emitted when the state is initialized.
|
|
</description>
|
|
</signal>
|
|
<signal name="updated">
|
|
<param index="0" name="p_delta" type="float" />
|
|
<description>
|
|
Emitted when the state is updated.
|
|
</description>
|
|
</signal>
|
|
</signals>
|
|
</class>
|