This commit is contained in:
2025-06-16 00:15:41 +08:00
parent bcfa5ce1ec
commit 6d79a5baa1
16 changed files with 246 additions and 3838 deletions

View File

@@ -557,7 +557,7 @@ public partial class MapManager : MonoBehaviour
if (cellType < EditCellType.AudioTrigger)
obj = _cellAsset;
obj = null;
else if (cellType == EditCellType.AudioTrigger)
obj = Resources.Load("Prefabs/audioTriggerCenterPoint");
else if (cellType == EditCellType.TriggerCell)
@@ -714,26 +714,6 @@ public partial class MapManager : MonoBehaviour
SetGameObjectActiveWithAllChild(cellsTrans, true);
return;
}
for (int y = 0; y < _cellRows; y++)
{
for (int x = 0; x < _cellCols; x++)
{
CellNode cell = GetCell(x, y);
GameObject go = Instantiate(_cellAsset) as GameObject;
go.name = $"{x}_{y}"; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD><5F>
go.transform.SetParent(cellsTrans, false);
go.transform.localScale = new Vector3(((float)_cellWidth / CELLSCALE) - 0.1f, ((float)_cellHeight / CELLSCALE) - 0.1f, 1);
//2d <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Vector3 pos = cell.GetPos((float)_cellWidth / CELLSCALE, (float)_cellHeight / CELLSCALE);
go.transform.localPosition = new Vector3(pos.x, pos.z, pos.y);
go.layer = LayerMask.NameToLayer("MapCell");
ShowCellType(go, cell.cellType);
AddLayerCell(go, (CellLayer)cell.cellType);
}
}
}
public void HideCells()