From eb2fe7ef6614b0eeeb0653b582dd8326f2a0c4ad Mon Sep 17 00:00:00 2001 From: in0finite Date: Tue, 7 Sep 2021 02:13:54 +0200 Subject: [PATCH] rename class --- Assets/Scripts/Behaviours/NPCPedSpawner.cs | 2 +- Assets/Scripts/Behaviours/Ped/PedAI.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Behaviours/NPCPedSpawner.cs b/Assets/Scripts/Behaviours/NPCPedSpawner.cs index c02f2ec3..fc79282f 100644 --- a/Assets/Scripts/Behaviours/NPCPedSpawner.cs +++ b/Assets/Scripts/Behaviours/NPCPedSpawner.cs @@ -9,7 +9,7 @@ using UnityEngine; namespace SanAndreasUnity.Behaviours { - public class PathsManager : StartupSingleton + public class NPCPedSpawner : StartupSingleton { 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 diff --git a/Assets/Scripts/Behaviours/Ped/PedAI.cs b/Assets/Scripts/Behaviours/Ped/PedAI.cs index 7c5a84ec..4c461d3c 100644 --- a/Assets/Scripts/Behaviours/Ped/PedAI.cs +++ b/Assets/Scripts/Behaviours/Ped/PedAI.cs @@ -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;