summaryrefslogtreecommitdiff
path: root/doc/classes/AStar3D.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/AStar3D.xml')
-rw-r--r--doc/classes/AStar3D.xml11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml
index 4e8394195d..f0481c1745 100644
--- a/doc/classes/AStar3D.xml
+++ b/doc/classes/AStar3D.xml
@@ -19,15 +19,16 @@
return min(0, abs(u - v) - 1)
[/gdscript]
[csharp]
- public class MyAStar : AStar3D
+ public partial class MyAStar : AStar3D
{
- public override float _ComputeCost(int u, int v)
+ public override float _ComputeCost(long fromId, long toId)
{
- return Mathf.Abs(u - v);
+ return Mathf.Abs((int)(fromId - toId));
}
- public override float _EstimateCost(int u, int v)
+
+ public override float _EstimateCost(long fromId, long toId)
{
- return Mathf.Min(0, Mathf.Abs(u - v) - 1);
+ return Mathf.Min(0, Mathf.Abs((int)(fromId - toId)) - 1);
}
}
[/csharp]