From c8dccbeee5624f73f2e2102c405ffceba16f9329 Mon Sep 17 00:00:00 2001 From: 31 <331300+31@users.noreply.github.com> Date: Tue, 23 Mar 2021 13:20:43 -0500 Subject: [PATCH] Update C# Connect method: `binds` is a Godot array (#4777) (cherry picked from commit 6e96d8d2629a4938ee391a325606a1d0eb51dbb9) --- getting_started/scripting/c_sharp/c_sharp_features.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/getting_started/scripting/c_sharp/c_sharp_features.rst b/getting_started/scripting/c_sharp/c_sharp_features.rst index a2ae94c98..65a574f5a 100644 --- a/getting_started/scripting/c_sharp/c_sharp_features.rst +++ b/getting_started/scripting/c_sharp/c_sharp_features.rst @@ -128,7 +128,7 @@ Emitting signals is done with the ``EmitSignal`` method. Notice that you can always reference a signal name with the ``nameof`` keyword (applied on the delegate itself). -It is possible to bind values when establishing a connection by passing an object array. +It is possible to bind values when establishing a connection by passing a Godot array. .. code-block:: csharp @@ -144,8 +144,8 @@ It is possible to bind values when establishing a connection by passing an objec var plusButton = (Button)GetNode("PlusButton"); var minusButton = (Button)GetNode("MinusButton"); - plusButton.Connect("pressed", this, "ModifyValue", new object[] { 1 }); - minusButton.Connect("pressed", this, "ModifyValue", new object[] { -1 }); + plusButton.Connect("pressed", this, "ModifyValue", new Godot.Collections.Array { 1 }); + minusButton.Connect("pressed", this, "ModifyValue", new Godot.Collections.Array { -1 }); } Signals support parameters and bound values of all the `built-in types `_ and Classes derived from :ref:`Godot.Object `.