|
|
@@ -815,22 +815,28 @@ public class GameMapEditor : EditorWindow
|
|
|
|
|
|
private void DrawLayerInfo(GameMapLayer layer)
|
|
|
{
|
|
|
- EditorGUILayout.LabelField("Layer Information", EditorStyles.boldLabel);
|
|
|
+ EditorGUILayout.LabelField("Wave Information", EditorStyles.boldLabel);
|
|
|
|
|
|
- // 显示图层名称
|
|
|
+ // 显示并编辑图层名称
|
|
|
EditorGUI.BeginChangeCheck();
|
|
|
- string layerName = EditorGUILayout.TextField("Name", layer.name);
|
|
|
+ string addName = EditorGUILayout.TextField("Name", layer.name);
|
|
|
+ float addHp = EditorGUILayout.FloatField("Hp", layer.Hp);
|
|
|
+ float addMoveSpeed = EditorGUILayout.FloatField("MoveSpeed", layer.moveSpeed);
|
|
|
+ float addAttack = EditorGUILayout.FloatField("Attack", layer.attack);
|
|
|
if (EditorGUI.EndChangeCheck())
|
|
|
{
|
|
|
- Undo.RecordObject(asset, "Change Layer Name");
|
|
|
- layer.name = layerName;
|
|
|
+ Undo.RecordObject(asset, "Change Layer Information");
|
|
|
+ layer.name = addName;
|
|
|
+ layer.Hp = addHp;
|
|
|
+ layer.moveSpeed = addMoveSpeed;
|
|
|
+ layer.attack = addAttack;
|
|
|
EditorUtility.SetDirty(asset);
|
|
|
}
|
|
|
|
|
|
// 显示其他图层信息(根据需求扩展)
|
|
|
- EditorGUILayout.LabelField("Other Properties:");
|
|
|
- EditorGUILayout.LabelField($"Grid Size: {layer.gridSize}");
|
|
|
- EditorGUILayout.LabelField($"Is Visible: {layer.isVisible}");
|
|
|
+ //EditorGUILayout.LabelField("Other Properties:");
|
|
|
+ //EditorGUILayout.LabelField($"Grid Size: {layer.gridSize}");
|
|
|
+ //EditorGUILayout.LabelField($"Is Visible: {layer.isVisible}");
|
|
|
}
|
|
|
|
|
|
private void DrawTileProperties(Event ev)
|