rename class

This commit is contained in:
in0finite 2021-09-07 02:13:54 +02:00
parent d397ae1d2f
commit eb2fe7ef66
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ using UnityEngine;
namespace SanAndreasUnity.Behaviours
{
public class PathsManager : StartupSingleton<PathsManager>
public class NPCPedSpawner : StartupSingleton<NPCPedSpawner>
{
public const float MaxNPCDistance = 100.0f; // Max distance from each players before delete
public const float MinNPCCreateDistance = 50.0f; // Min distance from each players to spawn ped

View file

@ -99,7 +99,7 @@ namespace SanAndreasUnity.Behaviours
{
PathNode previousNode = CurrentNode;
CurrentNode = TargetNode;
TargetNode = PathsManager.GetNextPathNode(previousNode, CurrentNode);
TargetNode = NPCPedSpawner.GetNextPathNode(previousNode, CurrentNode);
targetNodeOffset = new Vector2(UnityEngine.Random.Range(-2, 2), UnityEngine.Random.Range(-2, 2));
}
this.MyPed.IsWalkOn = true;
@ -135,7 +135,7 @@ namespace SanAndreasUnity.Behaviours
{
PathNode previousNode = CurrentNode;
CurrentNode = TargetNode;
TargetNode = PathsManager.GetNextPathNode(CurrentNode, previousNode);
TargetNode = NPCPedSpawner.GetNextPathNode(CurrentNode, previousNode);
}
this.MyPed.IsSprintOn = true;
this.MyPed.Movement = (TargetNode.Position - this.MyPed.transform.position).normalized;