|
|
@@ -968,7 +968,7 @@ public class GameMapEditor : EditorWindow
|
|
|
duration = EditorGUILayout.IntField("下一波时间", layer.duration);
|
|
|
}
|
|
|
|
|
|
- List<SpawnTime> newSpawnTimes = new List<SpawnTime>(layer.spawnTimes);
|
|
|
+ List<SpawnTime> newSpawnTimes = new List<SpawnTime>();
|
|
|
EditorGUILayout.BeginVertical("box");
|
|
|
{
|
|
|
EditorGUILayout.LabelField("Spawn Times", EditorStyles.boldLabel);
|
|
|
@@ -988,7 +988,6 @@ public class GameMapEditor : EditorWindow
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-
|
|
|
spawnTime.id = grids[i];
|
|
|
spawnTime.pos = new List<int> { i};
|
|
|
newSpawnTimes.Add(spawnTime);
|
|
|
@@ -1001,9 +1000,9 @@ public class GameMapEditor : EditorWindow
|
|
|
SpawnTime newSpawnTime = newSpawnTimes[i];
|
|
|
|
|
|
EditorGUILayout.LabelField($"{asset.tileAsset.GetTile(newSpawnTime.id).name} - {newSpawnTime.pos.Count}", EditorStyles.boldLabel);
|
|
|
- newSpawnTime.startTime = EditorGUILayout.IntField("Start Time", newSpawnTime.startTime);
|
|
|
- newSpawnTime.endTime = EditorGUILayout.IntField("End Time", newSpawnTime.endTime);
|
|
|
- newSpawnTime.num = EditorGUILayout.IntField("Number", newSpawnTime.num);
|
|
|
+ newSpawnTime.startTime = EditorGUILayout.IntField("Start Time", layer.spawnTimes[i].startTime);
|
|
|
+ newSpawnTime.endTime = EditorGUILayout.IntField("End Time", layer.spawnTimes[i].endTime);
|
|
|
+ newSpawnTime.num = EditorGUILayout.IntField("Number", layer.spawnTimes[i].num);
|
|
|
|
|
|
if (GUILayout.Button("Remove"))
|
|
|
{
|
|
|
@@ -1036,6 +1035,7 @@ public class GameMapEditor : EditorWindow
|
|
|
layer.buildingHp = buildingHp;
|
|
|
layer.isTowerWave = isTowerWave;
|
|
|
layer.spawnTimes = newSpawnTimes;
|
|
|
+ Debug.Log(layer.spawnTimes[0].pos);
|
|
|
AssetDatabase.SaveAssets();
|
|
|
}
|
|
|
// 标记资源为脏数据,以便保存更改
|