This commit is contained in:
PC-20230316NUNE\Administrator
2024-02-02 15:38:13 +08:00
parent 877dca3b43
commit 00f56e11c7
228 changed files with 36944 additions and 20084 deletions

View File

@@ -1,4 +1,5 @@
using Game.Plugins.App.Util;
using UnityEngine;
using Pathfinding.Serialization;
@@ -189,7 +190,7 @@ namespace Pathfinding {
var graphSpacePosition = gg.transform.InverseTransform((Vector3)position);
return gg.transform.Transform(graphSpacePosition + new Vector3(Random.value - 0.5f, 0, Random.value - 0.5f));
return gg.transform.Transform(graphSpacePosition + new Vector3(JNRandom.value - 0.5f, 0, JNRandom.value - 0.5f));
}
/// <summary>

View File

@@ -1,3 +1,4 @@
using Game.Plugins.App.Util;
using UnityEngine;
using Pathfinding.Serialization;
@@ -451,8 +452,8 @@ namespace Pathfinding {
float r2;
do {
r1 = Random.value;
r2 = Random.value;
r1 = JNRandom.value;
r2 = JNRandom.value;
} while (r1+r2 > 1);
var holder = GetNavmeshHolder(GraphIndex);

View File

@@ -1,5 +1,7 @@
using UnityEngine;
using System.Collections.Generic;
using Game.Plugins.App.Sync;
using Plugins.JNGame.Sync.Frame.Entity;
namespace Pathfinding {
/// <summary>
@@ -24,7 +26,7 @@ namespace Pathfinding {
/// </summary>
[AddComponentMenu("Pathfinding/Navmesh/RecastMeshObj")]
[HelpURL("https://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_recast_mesh_obj.php")]
public class RecastMeshObj : VersionedMonoBehaviour {
public class RecastMeshObj : JNGSyncFrameDefault {
/// <summary>Static objects are stored in a tree for fast bounds lookups</summary>
protected static RecastBBTree tree = new RecastBBTree();
@@ -42,7 +44,7 @@ namespace Pathfinding {
}
}
return;
} else if (Time.timeSinceLevelLoad == 0) {
} else if (JNTime.Time.timeSinceLevelLoad == 0) {
// Is is not guaranteed that all RecastMeshObj OnEnable functions have been called, so if it is the first frame since loading a new level
// try to initialize all RecastMeshObj objects.
var objs = FindObjectsOfType(typeof(RecastMeshObj)) as RecastMeshObj[];

View File

@@ -721,7 +721,7 @@ namespace Pathfinding.Voxels {
}
#if ASTARDEBUG
Color col = new Color(Random.value, Random.value, Random.value);
Color col = new Color(JNRandom.value, JNRandom.value, JNRandom.value);
for (int q = 0, j = (verts.Count/4)-1; q < (verts.Count/4); j = q, q++) {
int i4 = q*4;