|
|
@@ -134,6 +134,8 @@ public class GameMapEditor : EditorWindow
|
|
|
private static readonly GUIContent GC_EditAuto = new GUIContent("Setup Auto-tile");
|
|
|
private static readonly GUIContent GC_Viz = new GUIContent("*", "Toggle layer visblity in editor");
|
|
|
|
|
|
+ private static string enemyExcelPath = "Luban/Config/Datas/出怪表.xlsx";
|
|
|
+
|
|
|
private GenericMenu addTileMenu = null;
|
|
|
|
|
|
private static readonly Dictionary<int, int> map64 = new Dictionary<int, int>()
|
|
|
@@ -620,11 +622,16 @@ public class GameMapEditor : EditorWindow
|
|
|
r.x = r.xMax - 200f; r.width = 100f; r.height = 15f;
|
|
|
if (GUI.Button(r, GC_ExcelReload))
|
|
|
{
|
|
|
- List<string> excelWorksheets = ExcelEditor.ReadExcelSheetsInfo("Luban/Config/Datas/出怪表.xlsx");
|
|
|
+ List<string> excelWorksheets = ExcelEditor.ReadExcelSheetsInfo(enemyExcelPath);
|
|
|
for (int i = 0; i < excelWorksheets.Count; i++)
|
|
|
{
|
|
|
asset.maps[i].ident = excelWorksheets[i];
|
|
|
+ int.TryParse(ExcelEditor.GetCellData(enemyExcelPath, excelWorksheets[i], "C6"), out int width);
|
|
|
+ int.TryParse(ExcelEditor.GetCellData(enemyExcelPath, excelWorksheets[i], "D6"), out int height);
|
|
|
+ asset.maps[i].Resize(width, height);
|
|
|
}
|
|
|
+ mapSize_w = asset.maps[mapIdx].width;
|
|
|
+ mapSize_h = asset.maps[mapIdx].height;
|
|
|
}
|
|
|
r.x = r.xMax; r.width = 100f; r.height = 15f;
|
|
|
if (GUI.Button(r, GC_MapSelect))
|
|
|
@@ -662,10 +669,11 @@ public class GameMapEditor : EditorWindow
|
|
|
mapSize_h = EditorGUILayout.IntField(mapSize_h, GUILayout.Width(35));
|
|
|
if (GUILayout.Button(GC_apply, EditorStyles.miniButtonRight))
|
|
|
{
|
|
|
- Undo.RecordObject(asset, "Resize map");
|
|
|
asset.maps[mapIdx].Resize(mapSize_w, mapSize_h);
|
|
|
mapSize_w = asset.maps[mapIdx].width;
|
|
|
mapSize_h = asset.maps[mapIdx].height;
|
|
|
+ ExcelEditor.ModifyExcel(enemyExcelPath, asset.maps[mapIdx].ident, "C6", mapSize_w);
|
|
|
+ ExcelEditor.ModifyExcel(enemyExcelPath, asset.maps[mapIdx].ident, "D6", mapSize_h);
|
|
|
}
|
|
|
GUILayout.FlexibleSpace();
|
|
|
}
|