完善坐标系

This commit is contained in:
2025-06-27 01:08:56 +08:00
parent 7d724f9857
commit afc3a96bdf
15 changed files with 240 additions and 183 deletions

View File

@@ -216,7 +216,36 @@ public class UICellEditor : MonoBehaviour
{
MapManager.Instance.HideCells();
}
public void EditorAreaToggleChange(Toggle t)
{
if (t.isOn)
{
switch (t.name)
{
case "MoveToggle":
editorGrid = CellType.Move;
break;
case "BlockToggle":
editorGrid = CellType.Obstacle;
break;
case "HideToggle":
editorGrid = CellType.Hide;
break;
case "SafeToggle":
editorGrid = CellType.Safe;
break;
case "StallToggle":
editorGrid = CellType.Stall;
break;
}
MapManager.Instance.map?.selector.RefreshPlaneRender();
}
if (editorAreaToggle.ActiveToggles().Count() == 0)
{
Debug.Log(<><C3BB>ѡ<EFBFBD>б<D0B1><E0BCAD><EFBFBD><EFBFBD>");
editorGrid = CellType.None;
}
}
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
/// </summary>

View File

@@ -63,8 +63,8 @@ public class UICellInfo : MonoBehaviour
if (MapManager.Instance.map == null || MapManager.Instance.map.selector == null)
return;
if(MapManager.Instance._curMapRegions == null) return;
txtMapWidth.text = MapManager.Instance._curMapRegions.regionColNum.ToString();
txtMapHeight.text = MapManager.Instance._curMapRegions.regionRowNum.ToString();
txtMapWidth.text = MapManager.Instance._curMapRegions.regionRowNum.ToString();
txtMapHeight.text = MapManager.Instance._curMapRegions.regionColNum.ToString();
txtCellRows.text = MapManager.Instance.map.selector.horizontalNumber.ToString();
txtCellCols.text = MapManager.Instance.map.selector.verticalNumber.ToString();
txtTotalCells.text = MapManager.Instance.map.selector.totalNumber.ToString();

View File

@@ -69,8 +69,8 @@ public class UIMapPanel : MonoBehaviour
if (maxRow > 0 && maxCol > 0)
{
MapManager.Instance.allMaps[mapId] = (maxRow, maxCol);
Debug.Log($"Map {mapId} loaded with max dimensions: {maxRow}x{maxCol}");
MapManager.Instance.allMaps[mapId] = (maxCol, maxRow);
Debug.Log($"Map {mapId} loaded with max dimensions: {maxCol}x{maxRow}");
}
else
{