From 12cd434b5ccfdb92ed9f0a2887ccd8e8ada76524 Mon Sep 17 00:00:00 2001 From: client_Hale <339726288@qq.com> Date: 星期六, 13 十月 2018 10:25:09 +0800 Subject: [PATCH] 3270 【开发】主干:模型生成工具 --- Assets/Editor/Actor/ActorEditor.cs | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 16 deletions(-) diff --git a/Assets/Editor/Actor/ActorEditor.cs b/Assets/Editor/Actor/ActorEditor.cs index 11636ea..dff54de 100644 --- a/Assets/Editor/Actor/ActorEditor.cs +++ b/Assets/Editor/Actor/ActorEditor.cs @@ -79,23 +79,44 @@ m_NpcResBuilder.BuildNpc(m_ModelName, m_BuildName, (int)m_NpcType, m_HighMesh); } - // if (GUILayout.Button("鐢熸垚鎵�鏈�", GUILayout.Height(24))) - // { - // bool _result = EditorUtility.DisplayDialog("娓╅Θ鎻愰啋", "鐢熸垚鎵�鏈夋崲瑁呰祫婧愬皢浼氳�楄垂姣旇緝闀跨殑鏃堕棿, 璇疯寰楀嚑鐐�, 鏄惁鏄渶瑕佺敓鎴愭墍鏈夌殑璧勬簮, 濡傛灉涓嶆槸, 璁板緱鍙互鍘绘帀涓嶇敓鎴愮殑璧勬簮,鏄笉鏄笉闇�瑕佺敓鎴愬凡缁忓瓨鍦ㄧ殑璧勬簮, 濡傛灉涓嶉渶瑕�, 璁板緱鍕鹃�塠鍙敓鎴愪笉瀛樺湪鐨刔", "纭鐢熸垚", "鎴戞寜閿欎簡"); - // if (_result) - // { - // var _dict = Config.Instance.GetAllValues<NPCConfig>(); - // foreach (var _model in _dict) - // { - // if (string.IsNullOrEmpty(_model.MODE)) - // { - // continue; - // } + if (GUILayout.Button("鐢熸垚鎵�鏈�", GUILayout.Height(24))) + { + bool _result = EditorUtility.DisplayDialog("娓╅Θ鎻愰啋", "鐢熸垚鎵�鏈夋崲瑁呰祫婧愬皢浼氳�楄垂姣旇緝闀跨殑鏃堕棿, 璇疯寰楀嚑鐐�, 鏄惁鏄渶瑕佺敓鎴愭墍鏈夌殑璧勬簮, 濡傛灉涓嶆槸, 璁板緱鍙互鍘绘帀涓嶇敓鎴愮殑璧勬簮,鏄笉鏄笉闇�瑕佺敓鎴愬凡缁忓瓨鍦ㄧ殑璧勬簮, 濡傛灉涓嶉渶瑕�, 璁板緱鍕鹃�塠鍙敓鎴愪笉瀛樺湪鐨刔", "纭鐢熸垚", "鎴戞寜閿欎簡"); + if (_result) + { + var _dict = Config.Instance.GetAllValues<NPCConfig>(); + int i = 0; + foreach (var _model in _dict) + { + if (_model.NPCType != 0 + && _model.NPCType != 2 + && _model.NPCType != 3 + && _model.NPCType != 4 + && _model.NPCType != 5 + && _model.NPCType != 8 + && _model.NPCType != 9 + && _model.NPCType != 14 + && _model.NPCType != 16 + && _model.NPCType != 17 + && _model.NPCType != 18 + && _model.NPCType != 19) + { + continue; + } - // m_NpcResBuilder.BuildNpc(_model.MODE); - // } - // } - // } + if (string.IsNullOrEmpty(_model.MODE)) + { + continue; + } + + m_NpcResBuilder.BuildNpc(_model.MODE, m_BuildName, (int)m_NpcType, m_HighMesh); + // if (i++ > 3) + // { + // break; + // } + } + } + } GUILayout.Space(10); -- Gitblit v1.8.0