diff options
| author | Simon O'Shea <osheas1@wit.edu> | 2023-08-08 13:10:51 -0400 |
|---|---|---|
| committer | Simon O'Shea <osheas1@wit.edu> | 2023-08-08 13:10:51 -0400 |
| commit | f825ec9c278af326bde56524a08888d067b2a68f (patch) | |
| tree | cbd098364eacb500a22168268a4d87c17ddb57a2 /Pathfinding Visualizer/Assets/Scripts/CellMesh.cs | |
| parent | 219d21173eca4d9ddb033d12555a160a6021d89c (diff) | |
slop of code
intermediate push so logan can have access to reset function
Diffstat (limited to 'Pathfinding Visualizer/Assets/Scripts/CellMesh.cs')
| -rw-r--r-- | Pathfinding Visualizer/Assets/Scripts/CellMesh.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Pathfinding Visualizer/Assets/Scripts/CellMesh.cs b/Pathfinding Visualizer/Assets/Scripts/CellMesh.cs index 2b30d2f..c4c6a42 100644 --- a/Pathfinding Visualizer/Assets/Scripts/CellMesh.cs +++ b/Pathfinding Visualizer/Assets/Scripts/CellMesh.cs @@ -28,12 +28,14 @@ public class CellMesh : MonoBehaviour private void GridValueChanged(object sender, LogicGrid.OnGridValueChangedEventArgs e) { + // if(e.x == -1 && e.y == -1), grid is being reset + Debug.Log(e.x + " " + e.y); UpdateCellVisual(); } // TODO: implement this so we can update a single cell, given an x, y coordinate - private void UpdateCellVisual(int x, int y) +/* private void UpdateCellVisual(int x, int y) { //Debug.Log("Updated in Isolation 8)"); Vector3 quadSize = new Vector3(1, 1) * grid.GetCellSize(); @@ -45,13 +47,11 @@ public class CellMesh : MonoBehaviour MeshUtils.AddToMeshArrays(m_vertices, m_uv, m_triangles, index, grid.GetWorldPosition(x, y) + (quadSize * .5f), 0f, quadSize, gridValueUV, gridValueUV); - } + }*/ // Update all cells at once private void UpdateCellVisual() { - Debug.Log("Updated as a group"); - MeshUtils.CreateEmptyMeshArrays(grid.GetWidth() * grid.GetHeight(), out Vector3[] vertices, out Vector2[] uv, out int[] triangles); for(int x = 0; x < grid.GetWidth(); x++) |
