private void OnCellClick(CubeGridCell cell) { switch (action) { case TestAction.DestroyOnClick: DestroyClickedCell(cell); break; case TestAction.SetPositionOnClick: movementTest.Cubxel = cell.Cubxel; break; } }
private void DestroyClickedCell(CubeGridCell cell) { CubeTile tile = Cube.Current.GetTile(cell.Cubxel); if (tile) { Destroy(tile.gameObject); } else { Debug.Log("Tile not found:" + cell.Cubxel.ToString()); } }