classref: Sync with current master branch (89cc635)

This commit is contained in:
Godot Organization
2024-01-06 03:19:33 +00:00
parent 43f0195ba1
commit de1b79e21f
48 changed files with 1056 additions and 621 deletions

View File

@@ -68,19 +68,6 @@ In GDScript, it's possible to create lambda functions within a method. Lambda fu
# Prints "Attack!", when the button_pressed signal is emitted.
button_pressed.connect(func(): print("Attack!"))
\ **Note:** Methods of native types such as :ref:`Signal<class_Signal>`, :ref:`Array<class_Array>`, or :ref:`Dictionary<class_Dictionary>` are not of type **Callable** in order to avoid unnecessary overhead. If you need to pass those methods as **Callable**, use a lambda function as a wrapper.
::
func _init():
var my_dictionary = { "hello": "world" }
# This will not work, `clear` is not a callable.
create_tween().tween_callback(my_dictionary.clear)
# This will work, as lambdas are custom callables.
create_tween().tween_callback(func(): my_dictionary.clear())
.. note::
There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.