浏览代码

Merge pull request #7505 from raulsntos/dotnet/remove-funcref

Max Hilbrunner 2 年之前
父节点
当前提交
c924ee8527
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tutorials/best_practices/scene_organization.rst

+ 2 - 2
tutorials/best_practices/scene_organization.rst

@@ -104,10 +104,10 @@ initialize it:
      .. code-tab:: csharp
 
        // Parent
-       GetNode("Child").Set("FuncProperty", GD.FuncRef(ObjectWithMethod, "MethodOnTheObject"));
+       GetNode("Child").Set("FuncProperty", Callable.From(ObjectWithMethod.MethodOnTheObject));
 
        // Child
-       FuncProperty.CallFunc(); // Call parent-defined method (can come from anywhere).
+       FuncProperty.Call(); // Call parent-defined method (can come from anywhere).
 
 4. Initialize a Node or other Object reference.