This commit is contained in:
tangbin
2025-06-19 13:32:33 +08:00
parent c9984c9055
commit 0f78ad7a32
5 changed files with 20 additions and 46 deletions

View File

@@ -108,28 +108,7 @@ public partial class MapManager : MonoBehaviour
UIWindow.Instance.ShowMessage($"û<><C3BB>ɨ<EFBFBD><EFBFBD><E8B5BD>ǰ<EFBFBD><C7B0>ͼ [{_curOpenMapId}]");
return;
}
_curMapRegions?.SaveXML(mapId);
//MapRegions mapRegions = new MapRegions();
//mapRegions.regionRowNum = curMap.maxRow;
//mapRegions.regionColNum = curMap.maxCol;
//mapRegions.regionWidth = PicMapPixel;
//mapRegions.regionHeight = PicMapPixel;
//mapRegions.cellWidthPixel = widthPixel;
//mapRegions.cellHeightPixel = heightPixel;
//mapRegions.regions = new Region[mapRegions.regionRowNum, mapRegions.regionColNum];
//for (int row = 0; row < mapRegions.regionRowNum; row++)
//{
// for (int col = 0; col < mapRegions.regionColNum; col++)
// {
// mapRegions.regions[row, col] = new Region();
// mapRegions.regions[row, col].indexX = row;
// mapRegions.regions[row, col].indexY = col;
// int ldx = mapRegions.regionRowNum - row;
// int ldy = col + 1;
// mapRegions.regions[row, col].regionName = $"v{mapId}_r{ldx}_c{ldy}"; // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>v1000_r1_c1.jpg
// }
//}
//mapRegions.SaveXML(mapId);
_curMapRegions?.SaveXML(mapId);
}
public void LoadMapRegionSprites(int mapId)
@@ -150,7 +129,7 @@ public partial class MapManager : MonoBehaviour
_curMapRegions.cellWidthPixel = widthPixel;
_curMapRegions.cellHeightPixel = heightPixel;
_curMapRegions.regions = new Region[mapRownum, mapColumn];
float jpgscenew = PicMapPixel / 100;
float jpgscenew = PicMapPixel / 100.0f;
for (int row = 0; row < mapRownum; row++)
{
for (int col = 0; col < mapColumn; col++)
@@ -173,8 +152,6 @@ public partial class MapManager : MonoBehaviour
}
}
MapManager.Instance.ReseCamera(jpgscenew * mapColumn, jpgscenew * mapRownum);
UICellInfo.Instance.ShowMapCellInfo();
}
public void ClearMapRegions()
{