:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the Signal.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_Signal: Signal ====== Class representing a signal defined in an object. Methods ------- +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Signal` | :ref:`Signal` **(** :ref:`Object` object, :ref:`StringName` signal_name **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`connect` **(** :ref:`Callable` callable, :ref:`Array` binds=[ ], :ref:`int` flags=0 **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`disconnect` **(** :ref:`Callable` callable **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`emit` **(** ... **)** vararg | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_connections` **(** **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_name` **(** **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_object` **(** **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_object_id` **(** **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_connected` **(** :ref:`Callable` callable **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_null` **(** **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- .. _class_Signal_method_Signal: - :ref:`Signal` **Signal** **(** :ref:`Object` object, :ref:`StringName` signal_name **)** Creates a new signal named ``signal_name`` in the given object. ---- .. _class_Signal_method_connect: - :ref:`int` **connect** **(** :ref:`Callable` callable, :ref:`Array` binds=[ ], :ref:`int` flags=0 **)** Connects this signal to the specified :ref:`Callable`, optionally providing binds and connection flags. ---- .. _class_Signal_method_disconnect: - :ref:`Variant` **disconnect** **(** :ref:`Callable` callable **)** Disconnects this signal from the specified :ref:`Callable`. ---- .. _class_Signal_method_emit: - void **emit** **(** ... **)** vararg Emits this signal to all connected objects. ---- .. _class_Signal_method_get_connections: - :ref:`Array` **get_connections** **(** **)** Returns the list of :ref:`Callable`\ s connected to this signal. ---- .. _class_Signal_method_get_name: - :ref:`StringName` **get_name** **(** **)** Returns the name of this signal. ---- .. _class_Signal_method_get_object: - :ref:`Object` **get_object** **(** **)** Returns the object emitting this signal. ---- .. _class_Signal_method_get_object_id: - :ref:`int` **get_object_id** **(** **)** Returns the ID of the object emitting this signal (see :ref:`Object.get_instance_id`). ---- .. _class_Signal_method_is_connected: - :ref:`bool` **is_connected** **(** :ref:`Callable` callable **)** Returns ``true`` if the specified :ref:`Callable` is connected to this signal. ---- .. _class_Signal_method_is_null: - :ref:`bool` **is_null** **(** **)**