public void Triangulate() { terrain.Clear(); rivers.Clear(); for (int i = 0; i < cells.Length; i++) { if (cells[i]) { Triangulate(cells[i]); } } rivers.Apply(); terrain.Apply(); }
public void LateUpdate() { if (!requested && cleared) { terrainSelectionViewer.Clear(); terrainSelectionViewer.Apply(); cleared = false; return; } TriCell tCell = GetRay(); if (tCell) { if (tCell != selectedCell) { selectedCell = tCell; StartCalculateTerrain(); } } if (Input.GetMouseButtonDown(0)) { sendOrder(); } }