mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提取RVO 寻路
This commit is contained in:
@@ -69,7 +69,9 @@ namespace Pathfinding {
|
||||
[HideInInspector]
|
||||
public int graphIndex;
|
||||
|
||||
void Start () {
|
||||
public override void OnSyncStart()
|
||||
{
|
||||
base.OnSyncStart();
|
||||
if (AstarPath.active == null) throw new System.Exception("There is no AstarPath object in the scene");
|
||||
|
||||
// If one creates this component via a script then they may have already set the graph field.
|
||||
@@ -84,9 +86,11 @@ namespace Pathfinding {
|
||||
|
||||
UpdateGraph();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>Update is called once per frame</summary>
|
||||
void Update () {
|
||||
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
|
||||
{
|
||||
base.OnSyncUpdate(dt, frame, input);
|
||||
if (graph == null) return;
|
||||
|
||||
// Calculate where the graph center and the target position is in graph space
|
||||
|
Reference in New Issue
Block a user