From 4d8da3bb201dbc05f8b3b4c1300f31cc946cd35b Mon Sep 17 00:00:00 2001 From: "s3607057 (Angus Niven)" Date: Sat, 2 Nov 2019 20:12:41 +1100 Subject: [PATCH] Restored debug statements to MapManager.cs. --- Assets/Scripts/Map Generation/MapManager.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Assets/Scripts/Map Generation/MapManager.cs b/Assets/Scripts/Map Generation/MapManager.cs index 03c8144..3f18609 100644 --- a/Assets/Scripts/Map Generation/MapManager.cs +++ b/Assets/Scripts/Map Generation/MapManager.cs @@ -131,6 +131,7 @@ public class MapManager : ScriptableObject void chooseNextSection() { + Debug.Log("Choosing next section "); //First, we determine which sections are valid List validSections = new List(); @@ -146,6 +147,8 @@ public class MapManager : ScriptableObject continue; } + Debug.Log("Checking section " + section.name + ", weight = " + section.weight); + if (section.weight > 0 && checkSegments(section)) { //If a segment is a valid continuation of the current most-recent segment, add it to the list @@ -189,6 +192,7 @@ public class MapManager : ScriptableObject bool checkSegments(MapSection first, MapSection second) { + Debug.Log("Checking " + first.name + " & " + second.name); int connections = 0; //No more than one link section in a row if (first.length == 1 && second.length == 1) @@ -216,6 +220,9 @@ public class MapManager : ScriptableObject } } } + + Debug.Log("Check result: " + (connections >= minConns)); + return (connections >= minConns); } @@ -361,6 +368,8 @@ public class MapManager : ScriptableObject { widthMax = widthMaxMin; } + + Debug.Log("Difficulty = " + difficulty + ", widthMin = " + widthMin + ", widthMax = " + widthMax); } // Update is called once per frame