mirror of
https://gitee.com/jisol/jisol-game/
synced 2026-01-01 11:38:10 +00:00
提交
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Pathfinding.Util;
|
||||
using System.Collections.Generic;
|
||||
using Game.Plugins.App.Util;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Pathfinding {
|
||||
@@ -434,7 +435,7 @@ namespace Pathfinding {
|
||||
// the chances next time
|
||||
clearanceRadius *= 0.9f;
|
||||
// This will pick points in 2D closer to the edge of the circle with a higher probability
|
||||
dir = Random.onUnitSphere * Mathf.Lerp(newMagn, radius, tests / 5);
|
||||
dir = JNRandom.onUnitSphere * Mathf.Lerp(newMagn, radius, tests / 5);
|
||||
dir.y = 0;
|
||||
tests++;
|
||||
}
|
||||
@@ -500,7 +501,7 @@ namespace Pathfinding {
|
||||
}
|
||||
|
||||
// Pick a random node among the ones in the list weighted by their area
|
||||
float tg = Random.value*tot;
|
||||
float tg = JNRandom.value*tot;
|
||||
int v = accs.BinarySearch(tg);
|
||||
if (v < 0) v = ~v;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user