void Update() { if (Input.GetMouseButtonDown(0)) { var gridPos = GridHelper.GetGridPosFromScreenPoint(Input.mousePosition); if (_terrainInfo.IsValidGrisPosition(gridPos)) { if (_terrainInfo.IsWall(gridPos)) { _terrainInfo.RemoveWall(gridPos); } else { _terrainInfo.SetWall(gridPos); } } } }