diff --git a/doc/source/classes/class_limbostate.rst b/doc/source/classes/class_limbostate.rst index ad1aef1..49d9522 100644 --- a/doc/source/classes/class_limbostate.rst +++ b/doc/source/classes/class_limbostate.rst @@ -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:`🔗` -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`. .. rst-class:: classref-item-separator diff --git a/doc_classes/LimboState.xml b/doc_classes/LimboState.xml index 80cfa4c..4fc520f 100644 --- a/doc_classes/LimboState.xml +++ b/doc_classes/LimboState.xml @@ -41,7 +41,9 @@ - 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].