From 38bbe9af958cac89c56b35ee6c7ba5b2ed44185c Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 21 一月 2019 21:34:33 +0800
Subject: [PATCH] 382 地图编辑器逻辑提交
---
Core/MapEditor/Editor/MapEditor.cs | 36 ++++++++++++++++++++++++++++++------
1 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/Core/MapEditor/Editor/MapEditor.cs b/Core/MapEditor/Editor/MapEditor.cs
index 346e3ef..e33dcf5 100644
--- a/Core/MapEditor/Editor/MapEditor.cs
+++ b/Core/MapEditor/Editor/MapEditor.cs
@@ -100,7 +100,15 @@
EditorGUILayout.BeginVertical(gUISkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- _mapData.showTriggerList = EditorGUILayout.Foldout(_mapData.showTriggerList, " 瑙﹀彂鍣ㄥ垪琛�", true, gUISkin.customStyles[3]);
+ if (_mapData.triggerList.Count > 0)
+ {
+ _mapData.showTriggerList = EditorGUILayout.Foldout(_mapData.showTriggerList, " 瑙﹀彂鍣ㄥ垪琛�", true, gUISkin.customStyles[3]);
+ }
+ else
+ {
+ EditorGUILayout.LabelField("瑙﹀彂鍣ㄥ垪琛�", gUISkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(100));
+ GUILayout.FlexibleSpace();
+ }
EditorGUI.indentLevel -= 1;
if (GUILayout.Button("娣诲姞", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
@@ -134,9 +142,17 @@
EditorGUILayout.BeginVertical(gUISkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- _mapData.showEventList = EditorGUILayout.Foldout(_mapData.showEventList, " 浜嬩欢鍒楄〃", true, gUISkin.customStyles[3]);
+ if (_mapData.eventList.Count > 0)
+ {
+ _mapData.showEventList = EditorGUILayout.Foldout(_mapData.showEventList, " 浜嬩欢鍒楄〃", true, gUISkin.customStyles[3]);
+ }
+ else
+ {
+ EditorGUILayout.LabelField("浜嬩欢鍒楄〃", gUISkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(100));
+ GUILayout.FlexibleSpace();
+ }
EditorGUI.indentLevel -= 1;
- eventType = (Evt.E_EventType)EditorGUILayout.EnumPopup(eventType, gUISkin.box, GUILayout.Height(22), GUILayout.Width(100));
+ eventType = (Evt.E_EventType)EditorGUILayout.EnumPopup(eventType, gUISkin.customStyles[1], GUILayout.Height(22), GUILayout.Width(100));
if (GUILayout.Button("娣诲姞", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
CreateEvent(eventType);
@@ -169,7 +185,15 @@
EditorGUILayout.BeginVertical(gUISkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- _mapData.showTransferList = EditorGUILayout.Foldout(_mapData.showTransferList, " 浼犻�佺粍鍒楄〃", true, gUISkin.customStyles[3]);
+ if (_mapData.transferList.Count > 0)
+ {
+ _mapData.showTransferList = EditorGUILayout.Foldout(_mapData.showTransferList, " 浼犻�佺粍鍒楄〃", true, gUISkin.customStyles[3]);
+ }
+ else
+ {
+ EditorGUILayout.LabelField("浼犻�佺粍鍒楄〃", gUISkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(100));
+ GUILayout.FlexibleSpace();
+ }
EditorGUI.indentLevel -= 1;
if (GUILayout.Button("娣诲姞", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
@@ -239,7 +263,7 @@
}
else if (type == Evt.E_EventType.SceneObject)
{
- var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshSceneObject_" + RequestEventID());
+ var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshSceneObject_" + RequestEventID());
var _eventBhv = _event.AddComponent<Bhv_Evt_RefreshSceneObject>();
_eventBhv.type = type;
_event.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_EventList));
@@ -280,7 +304,7 @@
{
var _mapData = target as Bhv_MapData;
string _defaultPath = EditorPrefs.GetString(LS_KEY_SAVEPATH, System.Environment.CurrentDirectory);
- string _path = EditorUtility.SaveFilePanel("瀵煎嚭鏁版嵁", _defaultPath, "map_" + _mapData.id, "gd");
+ string _path = EditorUtility.SaveFilePanel("瀵煎嚭鏁版嵁", _defaultPath, "map_" + _mapData.id, "bytes");
if (string.IsNullOrEmpty(_path))
{
return;
--
Gitblit v1.8.0