完善坐标系
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user