Skip to content

Commit

Permalink
Update C# example of tween_method in Tween class with a parameter to …
Browse files Browse the repository at this point in the history
…the lambda method
  • Loading branch information
viksl committed Jul 28, 2023
1 parent da81ca6 commit 45b757e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/classes/Tween.xml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
[/gdscript]
[csharp]
Tween tween = CreateTween();
tween.TweenMethod(Callable.From(() => LookAt(Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // The LookAt() method takes up vector as second argument.
tween.TweenMethod(Callable.From((Vector3 target) => LookAt(target, Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // Use lambdas to bind additional arguments for the call.
[/csharp]
[/codeblocks]
[b]Example:[/b] Setting the text of a [Label], using an intermediate method and after a delay:
Expand Down

0 comments on commit 45b757e

Please sign in to comment.