From f825ec9c278af326bde56524a08888d067b2a68f Mon Sep 17 00:00:00 2001 From: Simon O'Shea Date: Tue, 8 Aug 2023 13:10:51 -0400 Subject: slop of code intermediate push so logan can have access to reset function --- Pathfinding Visualizer/Assets/Scripts/LogicGrid.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Pathfinding Visualizer/Assets/Scripts/LogicGrid.cs') diff --git a/Pathfinding Visualizer/Assets/Scripts/LogicGrid.cs b/Pathfinding Visualizer/Assets/Scripts/LogicGrid.cs index 2428594..212eb91 100644 --- a/Pathfinding Visualizer/Assets/Scripts/LogicGrid.cs +++ b/Pathfinding Visualizer/Assets/Scripts/LogicGrid.cs @@ -97,7 +97,6 @@ public class LogicGrid x = x, y = y }); - ; } } @@ -133,4 +132,16 @@ public class LogicGrid { return this.cellSize; } + + public void reset() + { + gridArray = new int[width, height]; + + if (OnGridValueChanged != null) + OnGridValueChanged(this, new OnGridValueChangedEventArgs + { + x = -1, + y = -1 + }); + } } -- cgit v1.3.1-4-g156e