格子划分正常

This commit is contained in:
2025-06-15 20:14:45 +08:00
parent c7700419cb
commit bc58a9d0d5
29 changed files with 1546 additions and 107 deletions

View File

@@ -194,7 +194,7 @@ public class UICellEditor : MonoBehaviour
//ͼ<><CDBC><EFBFBD>
public void OnShowLayerToggleChange()
{
MapManager.CellLayer[] layers = (MapManager.CellLayer[])Enum.GetValues(typeof(MapManager.CellLayer));
CellLayer[] layers = (CellLayer[])Enum.GetValues(typeof(CellLayer));
_layers = 0;
for (int i= showgLayers.Length - 1; i>=0; i--)
{
@@ -223,7 +223,7 @@ public class UICellEditor : MonoBehaviour
}
float brushRadius = Convert.ToSingle(txtBrushRadius.text);
MapManager.CellType type = (MapManager.CellType)(1 << dropCellType.value);
CellType type = (CellType)(1 << dropCellType.value);
MapManager.Instance.SetBrush(brushRadius, type);
MapManager.Instance.StartEditor();
}

View File

@@ -97,7 +97,7 @@ public class UICellInfo : MonoBehaviour
UIWindow.Instance.uiCreateMap.MapBG.GetComponent<CanvasGroup>().blocksRaycasts = false;
MapManager.Instance.CreateCells();
txtMoveCells.text = MapManager.Instance.GetLayCellCount(MapManager.CellLayer.Move).ToString();
txtMoveCells.text = MapManager.Instance.GetLayCellCount(CellLayer.Move).ToString();
}
public void HideCells()

View File

@@ -53,17 +53,17 @@ public class UICreateMap : MonoBehaviour
return false;
}
if (string.IsNullOrEmpty(txtMapWidth.text))
{
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>");
return false;
}
//if (string.IsNullOrEmpty(txtMapWidth.text))
//{
// UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>");
// return false;
//}
if (string.IsNullOrEmpty(txtMapHeight.text))
{
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ͼ<EFBFBD>߶<EFBFBD>");
return false;
}
//if (string.IsNullOrEmpty(txtMapHeight.text))
//{
// UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>д<EFBFBD><D0B4>ͼ<EFBFBD>߶<EFBFBD>");
// return false;
//}
if (string.IsNullOrEmpty(txtRegionWidth.text))
{
@@ -78,12 +78,12 @@ public class UICreateMap : MonoBehaviour
}
int mapId = Convert.ToInt32(txtMapID.text);
int mapWidth = Convert.ToInt32(txtMapWidth.text);
int mapHeight = Convert.ToInt32(txtMapHeight.text);
//int mapWidth = Convert.ToInt32(txtMapWidth.text);
//int mapHeight = Convert.ToInt32(txtMapHeight.text);
int regionWidth = Convert.ToInt32(txtRegionWidth.text);
int regionHeight = Convert.ToInt32(txtRegionHeight.text);
if (mapWidth <= 0 || mapHeight <= 0 || regionWidth <= 0 || regionHeight <= 0)
if (regionWidth <= 0 || regionHeight <= 0)
{
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ֵ");
return false;

View File

@@ -93,6 +93,7 @@ public class UIMapPanel : MonoBehaviour
UIWindow.Instance.uiJuBaosPanel.LoadJuBaoConfig(mapId);
_curOpenMapId = mapId;
//MapManager.Instance.LoadMapSprite();
}
public void CloseMap()