完成阻隔点

This commit is contained in:
2025-06-19 01:31:00 +08:00
parent a5da5b6d9d
commit c9984c9055
11 changed files with 2122 additions and 1368 deletions

View File

@@ -80,7 +80,7 @@ public partial class MapManager : MonoBehaviour
public CellNode[] cellsNode;
private Dictionary<CellLayer, List<GameObject>> _layCellsMap = new Dictionary<CellLayer, List<GameObject>>();
private Dictionary<CellType, List<GameObject>> _layCellsMap = new Dictionary<CellType, List<GameObject>>();
public void SetEditCellType(EditCellType type)
{
@@ -688,7 +688,7 @@ public partial class MapManager : MonoBehaviour
}
public int GetLayCellCount(CellLayer lay)
public int GetLayCellCount(CellType lay)
{
if(!_layCellsMap.ContainsKey(lay))
return 0;
@@ -898,55 +898,55 @@ public partial class MapManager : MonoBehaviour
}
//<2F><><EFBFBD><EFBFBD>layer<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public void AddLayerCell(GameObject go, CellLayer layer)
public void AddLayerCell(GameObject go, CellType layer)
{
List<GameObject> cells = null;
if (((CellLayer)layer & CellLayer.Move) == CellLayer.Move)
if (((CellType)layer & CellType.Move) == CellType.Move)
{
cells = _layCellsMap[CellLayer.Move];
cells = _layCellsMap[CellType.Move];
cells.Add(go);
}
if (((CellLayer)layer & CellLayer.Obstacle) == CellLayer.Obstacle)
if (((CellType)layer & CellType.Obstacle) == CellType.Obstacle)
{
cells = _layCellsMap[CellLayer.Obstacle];
cells = _layCellsMap[CellType.Obstacle];
cells.Add(go);
}
if (((CellLayer)layer & CellLayer.Hide) == CellLayer.Hide)
if (((CellType)layer & CellType.Hide) == CellType.Hide)
{
cells = _layCellsMap[CellLayer.Hide];
cells = _layCellsMap[CellType.Hide];
cells.Add(go);
}
if (((CellLayer)layer & CellLayer.Safe) == CellLayer.Safe)
if (((CellType)layer & CellType.Safe) == CellType.Safe)
{
cells = _layCellsMap[CellLayer.Safe];
cells = _layCellsMap[CellType.Safe];
cells.Add(go);
}
if (((CellLayer)layer & CellLayer.Stall) == CellLayer.Stall)
if (((CellType)layer & CellType.Stall) == CellType.Stall)
{
cells = _layCellsMap[CellLayer.Stall];
cells = _layCellsMap[CellType.Stall];
cells.Add(go);
}
if (((CellLayer)layer & CellLayer.Audio) == CellLayer.Audio)
if (((CellType)layer & CellType.Audio) == CellType.Audio)
{
cells = _layCellsMap[CellLayer.Audio];
cells = _layCellsMap[CellType.Audio];
cells.Add(go);
}
if (((CellLayer)layer & CellLayer.Trigger) == CellLayer.Trigger)
if (((CellType)layer & CellType.Trigger) == CellType.Trigger)
{
cells = _layCellsMap[CellLayer.Trigger];
cells = _layCellsMap[CellType.Trigger];
cells.Add(go);
}
if (((CellLayer)layer & CellLayer.Monster) == CellLayer.Monster)
if (((CellType)layer & CellType.Monster) == CellType.Monster)
{
cells = _layCellsMap[CellLayer.Monster];
cells = _layCellsMap[CellType.Monster];
cells.Add(go);
}
}
@@ -956,13 +956,13 @@ public partial class MapManager : MonoBehaviour
if (layers == 0)
return;
if(layers < (int)CellLayer.Stall)
if(layers < (int)CellType.Stall)
{
bool safeNoHide = ((CellLayer)layers & CellLayer.Safe) == CellLayer.Safe;
bool safeNoHide = ((CellType)layers & CellType.Safe) == CellType.Safe;
foreach (var layerCells in _layCellsMap)
{
safeNoHide = (layerCells.Key & CellLayer.Safe) == CellLayer.Safe;
safeNoHide = (layerCells.Key & CellType.Safe) == CellType.Safe;
if (((int)layerCells.Key & layers) != (int)layerCells.Key)
{
HideCellsWithLayer(layerCells.Key, layers, safeNoHide);
@@ -982,22 +982,22 @@ public partial class MapManager : MonoBehaviour
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><D0B8><EFBFBD>
HideCells();
if(((CellLayer)layers & CellLayer.Stall) == CellLayer.Stall)
if(((CellType)layers & CellType.Stall) == CellType.Stall)
{
ShowSpecialPoint(EditCellType.SellArea);
}
if (((CellLayer)layers & CellLayer.Audio) == CellLayer.Audio)
if (((CellType)layers & CellType.Audio) == CellType.Audio)
{
ShowSpecialPoint(EditCellType.AudioTrigger);
}
if (((CellLayer)layers & CellLayer.Trigger) == CellLayer.Trigger)
if (((CellType)layers & CellType.Trigger) == CellType.Trigger)
{
ShowSpecialPoint(EditCellType.TriggerCell);
}
if (((CellLayer)layers & CellLayer.Monster) == CellLayer.Monster)
if (((CellType)layers & CellType.Monster) == CellType.Monster)
{
ShowSpecialPoint(EditCellType.MonsterArea);
}
@@ -1005,7 +1005,7 @@ public partial class MapManager : MonoBehaviour
}
public void HideCellsWithLayer(CellLayer hideLayer, int showLayers, bool safeNoHide)
public void HideCellsWithLayer(CellType hideLayer, int showLayers, bool safeNoHide)
{
var cells = _layCellsMap[hideLayer];
foreach(var cell in cells)
@@ -1052,7 +1052,7 @@ public partial class MapManager : MonoBehaviour
public void CleanSafe()
{
var cells = _layCellsMap[CellLayer.Safe];
var cells = _layCellsMap[CellType.Safe];
if (cells == null)
return;