mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (705b7a0)
This commit is contained in:
@@ -185,7 +185,7 @@ Constructor Descriptions
|
||||
|
||||
.. rst-class:: classref-constructor
|
||||
|
||||
:ref:`Callable<class_Callable>` **Callable**\ (\ )
|
||||
:ref:`Callable<class_Callable>` **Callable**\ (\ ) :ref:`🔗<class_Callable_constructor_Callable>`
|
||||
|
||||
Constructs an empty **Callable**, with no object nor method bound.
|
||||
|
||||
@@ -224,7 +224,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Callable<class_Callable>` **bind**\ (\ ...\ ) |vararg| |const|
|
||||
:ref:`Callable<class_Callable>` **bind**\ (\ ...\ ) |vararg| |const| :ref:`🔗<class_Callable_method_bind>`
|
||||
|
||||
Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call<class_Callable_method_call>`. See also :ref:`unbind<class_Callable_method_unbind>`.
|
||||
|
||||
@@ -238,7 +238,7 @@ Returns a copy of this **Callable** with one or more arguments bound. When calle
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Callable<class_Callable>` **bindv**\ (\ arguments\: :ref:`Array<class_Array>`\ )
|
||||
:ref:`Callable<class_Callable>` **bindv**\ (\ arguments\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_Callable_method_bindv>`
|
||||
|
||||
Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call<class_Callable_method_call>`. See also :ref:`unbind<class_Callable_method_unbind>`.
|
||||
|
||||
@@ -252,7 +252,7 @@ Returns a copy of this **Callable** with one or more arguments bound, reading th
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **call**\ (\ ...\ ) |vararg| |const|
|
||||
:ref:`Variant<class_Variant>` **call**\ (\ ...\ ) |vararg| |const| :ref:`🔗<class_Callable_method_call>`
|
||||
|
||||
Calls the method represented by this **Callable**. Arguments can be passed and should match the method's signature.
|
||||
|
||||
@@ -264,7 +264,7 @@ Calls the method represented by this **Callable**. Arguments can be passed and s
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **call_deferred**\ (\ ...\ ) |vararg| |const|
|
||||
|void| **call_deferred**\ (\ ...\ ) |vararg| |const| :ref:`🔗<class_Callable_method_call_deferred>`
|
||||
|
||||
Calls the method represented by this **Callable** in deferred mode, i.e. at the end of the current frame. Arguments can be passed and should match the method's signature.
|
||||
|
||||
@@ -297,7 +297,7 @@ See also :ref:`Object.call_deferred<class_Object_method_call_deferred>`.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **callv**\ (\ arguments\: :ref:`Array<class_Array>`\ ) |const|
|
||||
:ref:`Variant<class_Variant>` **callv**\ (\ arguments\: :ref:`Array<class_Array>`\ ) |const| :ref:`🔗<class_Callable_method_callv>`
|
||||
|
||||
Calls the method represented by this **Callable**. Unlike :ref:`call<class_Callable_method_call>`, this method expects all arguments to be contained inside the ``arguments`` :ref:`Array<class_Array>`.
|
||||
|
||||
@@ -309,7 +309,7 @@ Calls the method represented by this **Callable**. Unlike :ref:`call<class_Calla
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Callable<class_Callable>` **create**\ (\ variant\: :ref:`Variant<class_Variant>`, method\: :ref:`StringName<class_StringName>`\ ) |static|
|
||||
:ref:`Callable<class_Callable>` **create**\ (\ variant\: :ref:`Variant<class_Variant>`, method\: :ref:`StringName<class_StringName>`\ ) |static| :ref:`🔗<class_Callable_method_create>`
|
||||
|
||||
Creates a new **Callable** for the method named ``method`` in the specified ``variant``. To represent a method of a built-in :ref:`Variant<class_Variant>` type, a custom callable is used (see :ref:`is_custom<class_Callable_method_is_custom>`). If ``variant`` is :ref:`Object<class_Object>`, then a standard callable will be created instead.
|
||||
|
||||
@@ -323,7 +323,7 @@ Creates a new **Callable** for the method named ``method`` in the specified ``va
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **get_argument_count**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **get_argument_count**\ (\ ) |const| :ref:`🔗<class_Callable_method_get_argument_count>`
|
||||
|
||||
Returns the total number of arguments this **Callable** should take, including optional arguments. This means that any arguments bound with :ref:`bind<class_Callable_method_bind>` are *subtracted* from the result, and any arguments unbound with :ref:`unbind<class_Callable_method_unbind>` are *added* to the result.
|
||||
|
||||
@@ -335,7 +335,7 @@ Returns the total number of arguments this **Callable** should take, including o
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **get_bound_arguments**\ (\ ) |const|
|
||||
:ref:`Array<class_Array>` **get_bound_arguments**\ (\ ) |const| :ref:`🔗<class_Callable_method_get_bound_arguments>`
|
||||
|
||||
Return the bound arguments (as long as :ref:`get_bound_arguments_count<class_Callable_method_get_bound_arguments_count>` is greater than zero), or empty (if :ref:`get_bound_arguments_count<class_Callable_method_get_bound_arguments_count>` is less than or equal to zero).
|
||||
|
||||
@@ -347,7 +347,7 @@ Return the bound arguments (as long as :ref:`get_bound_arguments_count<class_Cal
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **get_bound_arguments_count**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **get_bound_arguments_count**\ (\ ) |const| :ref:`🔗<class_Callable_method_get_bound_arguments_count>`
|
||||
|
||||
Returns the total amount of arguments bound (or unbound) via successive :ref:`bind<class_Callable_method_bind>` or :ref:`unbind<class_Callable_method_unbind>` calls. If the amount of arguments unbound is greater than the ones bound, this function returns a value less than zero.
|
||||
|
||||
@@ -359,7 +359,7 @@ Returns the total amount of arguments bound (or unbound) via successive :ref:`bi
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName<class_StringName>` **get_method**\ (\ ) |const|
|
||||
:ref:`StringName<class_StringName>` **get_method**\ (\ ) |const| :ref:`🔗<class_Callable_method_get_method>`
|
||||
|
||||
Returns the name of the method represented by this **Callable**. If the callable is a GDScript lambda function, returns the function's name or ``"<anonymous lambda>"``.
|
||||
|
||||
@@ -371,7 +371,7 @@ Returns the name of the method represented by this **Callable**. If the callable
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Object<class_Object>` **get_object**\ (\ ) |const|
|
||||
:ref:`Object<class_Object>` **get_object**\ (\ ) |const| :ref:`🔗<class_Callable_method_get_object>`
|
||||
|
||||
Returns the object on which this **Callable** is called.
|
||||
|
||||
@@ -383,7 +383,7 @@ Returns the object on which this **Callable** is called.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **get_object_id**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **get_object_id**\ (\ ) |const| :ref:`🔗<class_Callable_method_get_object_id>`
|
||||
|
||||
Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`).
|
||||
|
||||
@@ -395,7 +395,7 @@ Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id<c
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **hash**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **hash**\ (\ ) |const| :ref:`🔗<class_Callable_method_hash>`
|
||||
|
||||
Returns the 32-bit hash value of this **Callable**'s object.
|
||||
|
||||
@@ -409,7 +409,7 @@ Returns the 32-bit hash value of this **Callable**'s object.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_custom**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_custom**\ (\ ) |const| :ref:`🔗<class_Callable_method_is_custom>`
|
||||
|
||||
Returns ``true`` if this **Callable** is a custom callable. Custom callables are used:
|
||||
|
||||
@@ -429,7 +429,7 @@ Returns ``true`` if this **Callable** is a custom callable. Custom callables are
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_null**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_null**\ (\ ) |const| :ref:`🔗<class_Callable_method_is_null>`
|
||||
|
||||
Returns ``true`` if this **Callable** has no target to call the method on.
|
||||
|
||||
@@ -441,7 +441,7 @@ Returns ``true`` if this **Callable** has no target to call the method on.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_standard**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_standard**\ (\ ) |const| :ref:`🔗<class_Callable_method_is_standard>`
|
||||
|
||||
Returns ``true`` if this **Callable** is a standard callable. This method is the opposite of :ref:`is_custom<class_Callable_method_is_custom>`. Returns ``false`` if this callable is a lambda function.
|
||||
|
||||
@@ -453,7 +453,7 @@ Returns ``true`` if this **Callable** is a standard callable. This method is the
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid**\ (\ ) |const| :ref:`🔗<class_Callable_method_is_valid>`
|
||||
|
||||
Returns ``true`` if the callable's object exists and has a valid method name assigned, or is a custom callable.
|
||||
|
||||
@@ -465,7 +465,7 @@ Returns ``true`` if the callable's object exists and has a valid method name ass
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **rpc**\ (\ ...\ ) |vararg| |const|
|
||||
|void| **rpc**\ (\ ...\ ) |vararg| |const| :ref:`🔗<class_Callable_method_rpc>`
|
||||
|
||||
Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>` or :ref:`Node.rpc_config<class_Node_method_rpc_config>`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc<class_Node_method_rpc>`.
|
||||
|
||||
@@ -477,7 +477,7 @@ Perform an RPC (Remote Procedure Call) on all connected peers. This is used for
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **rpc_id**\ (\ peer_id\: :ref:`int<class_int>`, ...\ ) |vararg| |const|
|
||||
|void| **rpc_id**\ (\ peer_id\: :ref:`int<class_int>`, ...\ ) |vararg| |const| :ref:`🔗<class_Callable_method_rpc_id>`
|
||||
|
||||
Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>` or :ref:`Node.rpc_config<class_Node_method_rpc_config>`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc_id<class_Node_method_rpc_id>`.
|
||||
|
||||
@@ -489,7 +489,7 @@ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer do
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Callable<class_Callable>` **unbind**\ (\ argcount\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`Callable<class_Callable>` **unbind**\ (\ argcount\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Callable_method_unbind>`
|
||||
|
||||
Returns a copy of this **Callable** with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to ``argcount``. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also :ref:`bind<class_Callable_method_bind>`.
|
||||
|
||||
@@ -514,7 +514,7 @@ Operator Descriptions
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Callable<class_Callable>`\ )
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_Callable_operator_neq_Callable>`
|
||||
|
||||
Returns ``true`` if both **Callable**\ s invoke different targets.
|
||||
|
||||
@@ -526,7 +526,7 @@ Returns ``true`` if both **Callable**\ s invoke different targets.
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Callable<class_Callable>`\ )
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_Callable_operator_eq_Callable>`
|
||||
|
||||
Returns ``true`` if both **Callable**\ s invoke the same custom target.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user