mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
提取RVO 寻路
This commit is contained in:
@@ -201,7 +201,9 @@ namespace Pathfinding.RVO {
|
||||
}
|
||||
|
||||
/// <summary>Creates obstacles</summary>
|
||||
public void Start () {
|
||||
public override void OnSyncStart()
|
||||
{
|
||||
base.OnSyncStart();
|
||||
addedObstacles = new List<ObstacleVertex>();
|
||||
sourceObstacles = new List<Vector3[]>();
|
||||
prevUpdateMatrix = GetMatrix();
|
||||
@@ -212,7 +214,9 @@ namespace Pathfinding.RVO {
|
||||
/// Updates obstacle if required.
|
||||
/// Checks for if the obstacle should be updated (e.g if it has moved)
|
||||
/// </summary>
|
||||
public void Update () {
|
||||
public override void OnSyncUpdate(int dt, JNFrameInfo frame, Object input)
|
||||
{
|
||||
base.OnSyncUpdate(dt, frame, input);
|
||||
Matrix4x4 m = GetMatrix();
|
||||
|
||||
if (m != prevUpdateMatrix) {
|
||||
@@ -223,7 +227,6 @@ namespace Pathfinding.RVO {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Finds a simulator in the scene.
|
||||
///
|
||||
|
Reference in New Issue
Block a user