Doc: Clarify `LimboState.add_event_handler()`
This commit is contained in:
parent
63de416066
commit
a56272a248
|
@ -270,7 +270,12 @@ Called during the update. Implement your state's behavior with this method.
|
|||
|
||||
|void| **add_event_handler**\ (\ event\: ``StringName``, handler\: ``Callable``\ ) :ref:`🔗<class_LimboState_method_add_event_handler>`
|
||||
|
||||
Registers a ``handler`` to be called when ``event`` is dispatched.
|
||||
Registers a ``handler`` to be called when ``event`` is dispatched. The handler function should have the following signature:
|
||||
|
||||
::
|
||||
func my_event_handler(cargo=null) -> void:
|
||||
|
||||
Cargo is an optional parameter that can be passed to the handler. See also :ref:`dispatch<class_LimboState_method_dispatch>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
|
@ -41,7 +41,9 @@
|
|||
<param index="0" name="event" type="StringName" />
|
||||
<param index="1" name="handler" type="Callable" />
|
||||
<description>
|
||||
Registers a [param handler] to be called when [param event] is dispatched.
|
||||
Registers a [param handler] to be called when [param event] is dispatched. The handler function should have the following signature:
|
||||
[codeblock]func my_event_handler(cargo=null) -> void:[/codeblock]
|
||||
Cargo is an optional parameter that can be passed to the handler. See also [method dispatch].
|
||||
</description>
|
||||
</method>
|
||||
<method name="call_on_enter">
|
||||
|
|
Loading…
Reference in New Issue