예제 #1
0
 private void OnEnable()
 {
     EditorDataContainer.LoadSystemTables();
 }
예제 #2
0
        private void DrawButtons()
        {
            //使用选择的技能参数
            if (GUILayout.Button(new GUIContent("Use Choose Unit\n加载选择的技能数据", "使用选择的技能Unit"), GUILayout.Height(40)))
            {
                DataConvert.ConvertSkillUnit(EditorDataContainer.currentskillAssetData.skillUnit, EditorDataContainer.allSkillUnits.units[SelectSkillUnit]);
                int curart = EditorDataContainer.currentskillAssetData.skillUnit.artId;
                SkillUnit.SkillArt oart = EditorDataContainer.allSkillUnits.arts[curart];
                DataConvert.ConvertSkillArt(EditorDataContainer.currentskillAssetData.skillArt, oart);
                EditorDataContainer.UseSkillArt(oart);
            }
            //使用选择的技能参数
            if (GUILayout.Button(new GUIContent("Use Choose Skill Art\n加载选择的特效数据", "使用选择的技能数据填充当前技能数据"), GUILayout.Height(40)))
            {
                SkillUnit.SkillArt oart = EditorDataContainer.allSkillUnits.arts[SelectSkillArt];
                EditorDataContainer.UseSkillArt(oart);
            }
            if (GUILayout.Button(new GUIContent("Generate Sequence\n生成序列", "生成序列"), GUILayout.Height(40)))
            {
                EditorDataContainer.GenerateSequence(EditorDataContainer.currentskillAssetData);
                Close();
            }
            if (GUILayout.Button(new GUIContent("Generate SkillData\n生成技能数据", "由当前序列生成技能数据对象"), GUILayout.Height(40)))
            {
                if (CurrentSequence != null)
                {
                    EditorDataContainer.currentskillAssetData = EditorDataContainer.MakeSkillAssetData(CurrentSequence);
                    Debug.Log(EditorDataContainer.currentskillAssetData.skillArt.beginEffect.Count);
                    Reset();
                }
            }
            if (GUILayout.Button("Search\n搜索技能", GUILayout.Height(40)))
            {
                var window = GetWindow <SearchWindow>();
                window.Show();
            }
            if (GUILayout.Button("Save Asset\n保存技能为Asset", GUILayout.Height(40)))
            {
                EditorDataContainer.SaveSkillAssetData();
            }
            if (GUILayout.Button("Load Asset\n加载Asset技能文件", GUILayout.Height(40)))
            {
                EditorDataContainer.LoadSkillAssetData();
                Reset();
                Repaint();
            }
            if (GUILayout.Button("Save SystemTables\n保存技能到系统表", GUILayout.Height(40)))
            {
                EditorDataContainer.SaveSystemTables();
                EditorDataContainer.LoadSystemTables();
                Reset();
                Repaint();
            }

            if (GUILayout.Button(showUnitList ? "HideSkillUnitList\n隐藏系统技能表" : "ShowSkillUnitList\n显示系统技能表", GUILayout.Height(40)))
            {
                showUnitList = !showUnitList;
            }
            if (GUILayout.Button(showArtList ? "HideSkillArtList\n隐藏系统特效表" : "ShowSkillArtList\n显示系统特效表", GUILayout.Height(40)))
            {
                showArtList = !showArtList;
            }
            if (GUILayout.Button("Close\n关闭窗口", GUILayout.Height(40)))
            {
                Close();
            }
        }