From 16993b077d9a842d471cb67222c7e06786fab496 Mon Sep 17 00:00:00 2001 From: juliuse98 Date: Fri, 1 Oct 2021 23:47:54 +0200 Subject: [PATCH] Minor Cleanup --- Assets/Scripts/NPC/NPCController.cs | 8 +++----- Assets/Scripts/NPC/PathMap.cs | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/NPC/NPCController.cs b/Assets/Scripts/NPC/NPCController.cs index c043e79..705eaa6 100644 --- a/Assets/Scripts/NPC/NPCController.cs +++ b/Assets/Scripts/NPC/NPCController.cs @@ -18,12 +18,10 @@ public class NPCController : MonoBehaviour void Start() { startPoint = new Vector3(0, 0, 0); - endPoint = new Vector3(200, 0, 900); + endPoint = new Vector3(100, 0, 40); rows = 30; Map = new PathMap(new Vector3(0, 0, 0), rows, rows, 900); Map.setupMapWithNextLayer(); - - List parentPath; //Looking through the low res search } @@ -40,10 +38,10 @@ public class NPCController : MonoBehaviour } - else if(!second && first){ + else if(!second && first && true){ second = true; Debug.Log(Time.time * 1000); - if (path != null && true) + if (path != null && false) { for (int i = 0; i < path.Count - 1; i++) { diff --git a/Assets/Scripts/NPC/PathMap.cs b/Assets/Scripts/NPC/PathMap.cs index 082a35f..95bbd4b 100644 --- a/Assets/Scripts/NPC/PathMap.cs +++ b/Assets/Scripts/NPC/PathMap.cs @@ -17,7 +17,6 @@ public class PathMap private float height = 0; public Terrain t; private float w, h; - private bool divided = false; private List openList; private List closedList; @@ -388,8 +387,6 @@ public class PathMap } } - - divided = true; } private float heuristic(PathNode p1, PathNode p2) {