Add AI and Patrol components, update related resources and presenters

This commit is contained in:
2025-10-30 21:53:31 +01:00
parent 90d3abd83f
commit 5ea02e7bf9
18 changed files with 361 additions and 22 deletions

View File

@@ -0,0 +1 @@
uid://brwkqiox7aijm

View File

@@ -0,0 +1 @@
uid://dyyu7jl3gfjpg

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using CryptonymThunder.Code.Autoloads;
using CryptonymThunder.Code.Extensions;
using CryptonymThunder.Code.Presenters;
@@ -101,4 +102,12 @@ public class GodotWorldQuery(GamePresenter ownerNode) : IWorldQuery
}
}
}
public List<Vector3> GetPath(Vector3 start, Vector3 end)
{
var map = _godotWorld.NavigationMap;
var pathPoints = NavigationServer3D.MapGetPath(map, start.ToGodot(), end.ToGodot(), true);
return pathPoints.Select(p => p.ToGameCore()).ToList();
}
}