From 04337e2a136af1f6f2f11cf8bf27409e753976df Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 22 一月 2019 22:12:09 +0800
Subject: [PATCH] 382 地图编辑器功能提交

---
 Core/MapEditor/Editor/MapEditor.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Core/MapEditor/Editor/MapEditor.cs b/Core/MapEditor/Editor/MapEditor.cs
index e33dcf5..d6caf60 100644
--- a/Core/MapEditor/Editor/MapEditor.cs
+++ b/Core/MapEditor/Editor/MapEditor.cs
@@ -93,6 +93,10 @@
             {
                 Export();
             }
+            if (GUILayout.Button("瀵煎叆", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
+            {
+                MapData.LoadFormFile(10010);
+            }
             EditorGUILayout.EndHorizontal();
 
             /// --------------------------------------------------------------------------------
@@ -296,6 +300,7 @@
                 using (var _binaryWriter = new BinaryWriter(_fileStream))
                 {
                     _mapData.Save(_binaryWriter);
+                    EditorPrefs.SetString(LS_KEY_SAVEPATH, Directory.GetParent(_path).FullName);
                 }
             }
         }
@@ -304,7 +309,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, "bytes");
+            string _path = EditorUtility.SaveFilePanel("瀵煎嚭鏁版嵁", _defaultPath, MapData.MapEditorData_Suffix + _mapData.id, "bytes");
             if (string.IsNullOrEmpty(_path))
             {
                 return;
@@ -313,7 +318,7 @@
             {
                 using (var _binaryWriter = new BinaryWriter(_fileStream))
                 {
-                    _mapData.Save(_binaryWriter);
+                    _mapData.Export(_binaryWriter);
                 }
             }
         }
@@ -335,6 +340,7 @@
                 using (var _binaryReader = new BinaryReader(_fileStream))
                 {
                     _mapData.Load(_binaryReader);
+                    EditorPrefs.SetString(LS_KEY_SAVEPATH, Directory.GetParent(_path).FullName);
                 }
             }
         }

--
Gitblit v1.8.0