예제 #1
0
 private void OnGUI_WindowBtn()
 {
     GUILayout.Space(30);
     GUILayout.BeginHorizontal();
     GUILayout.Space(150);
     if (GUILayout.Button("Hero表编辑", GUILayout.Width(150), GUILayout.Height(30)))
     {
         TableToolMenu.OpenEditorWindow_CreateHero();
     }
     GUILayout.EndHorizontal();
     GUILayout.Space(30);
     GUILayout.BeginHorizontal();
     GUILayout.Space(150);
     if (GUILayout.Button("Skill表编辑", GUILayout.Width(150), GUILayout.Height(30)))
     {
         TableToolMenu.OpenEditorWindow_CreateSkill();
     }
     GUILayout.EndHorizontal();
     GUILayout.Space(30);
     GUILayout.BeginHorizontal();
     GUILayout.Space(150);
     if (GUILayout.Button("Buff表编辑", GUILayout.Width(150), GUILayout.Height(30)))
     {
         TableToolMenu.OpenEditorWindow_CreateBuff();
     }
     GUILayout.EndHorizontal();
 }
 private void OnGUI()
 {
     GUILayout.BeginVertical(GUILayout.Width(1000), GUILayout.Height(800));
     OnGUI_SkillList();
     GUILayout.EndVertical();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
 }
 private void OnGUI()
 {
     GUILayout.BeginHorizontal();
     this.ShowAniclipList();
     this.ShowCurFrame();
     GUILayout.EndHorizontal();
     TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
 }
 private void OnGUI()
 {
     GUILayout.BeginVertical(GUILayout.Width(600), GUILayout.Height(800));
     //OnGUI_EditorButton();
     OnGUI_BuffList();
     GUILayout.EndVertical();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
 }
예제 #5
0
 private void ShowSkillEventWindow()
 {
     GUILayout.BeginHorizontal();
     this.ShowEventList();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
     this.ShowCurEventWindow();
     GUILayout.EndHorizontal();
 }
 private void OnGUI()
 {
     GUILayout.BeginVertical(GUILayout.Width(1500), GUILayout.Height(820));
     OnGUI_MainWindow();
     OnGUI_EditorBottomButtons();
     TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
     GUILayout.EndVertical();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
 }
 private void OnGUI_EditorBuffItem(Buff b)
 {
     GUILayout.BeginHorizontal(GUILayout.Width(610));
     OnGUI_EditorSkillItemToggle(b);
     GUILayout.BeginVertical();
     DrawTableType.DrawDisplayWindow(b);
     GUILayout.EndVertical();
     GUILayout.EndHorizontal();
     TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
 }
 private void OnGUI_EditorSkillItem(Skill h)
 {
     GUILayout.BeginHorizontal();
     OnGUI_EditorSkillItemToggle(h);
     GUILayout.BeginVertical();
     DrawTableType.DrawDisplayWindow(h);
     GUILayout.EndVertical();
     GUILayout.EndHorizontal();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
 }
예제 #9
0
 private void ShowSkillBlock()
 {
     blockpos = GUILayout.BeginScrollView(blockpos, GUILayout.Width(320), GUILayout.Height(800));
     GUILayout.BeginVertical(GUILayout.Height(780));
     GUILayout.Label("当前skill对应skillblock组");
     if (this.curSkill != null)
     {
         this.ShowBlockList(this.curSkill.Blocks);
     }
     GUILayout.EndVertical();
     GUILayout.EndScrollView();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
 }
    private void ShowAniclipList()
    {
        pos = GUILayout.BeginScrollView(pos, GUILayout.Width(320), GUILayout.Height(300));
        GUILayout.BeginVertical();
        foreach (AniClip clip in this._ani.clips)
        {
            this.DrawAniClipItem(clip);
        }

        GUILayout.EndVertical();
        GUILayout.EndScrollView();
        TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
    }
 private void OnGUI_SkillList()
 {
     GUILayout.BeginVertical();
     windowSelectPosition = GUILayout.BeginScrollView(windowSelectPosition, GUILayout.Width(1010), GUILayout.Height(800));
     {
         foreach (KeyValuePair <int, List <Skill> > kv in skillList)
         {
             OnGUI_SkillScrollView(kv);
         }
     }
     GUILayout.EndScrollView();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
     GUILayout.EndVertical();
 }
 private void OnGUI_SkillList()
 {
     GUILayout.BeginVertical();
     windowSelectPosition = GUILayout.BeginScrollView(windowSelectPosition, GUILayout.Width(1010), GUILayout.Height(800));
     {
         foreach (object obj in skillList)
         {
             OnGUI_EditorSkillItem(obj);
         }
     }
     GUILayout.EndScrollView();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
     GUILayout.EndVertical();
 }
 private void OnGUI_SkillScrollView(int k, List <Skill> v)
 {
     GUILayout.BeginHorizontal(GUILayout.Width(1500));
     GUILayout.BeginHorizontal(GUILayout.Width(200));
     for (int i = 0; i < v.Count; i++)
     {
         OnGUI_EditorSkillItem(v, i, k);
         TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
     }
     GUILayout.EndHorizontal();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
     OnGUI_EditorButtons(k, v);
     GUILayout.EndHorizontal();
 }
 private void OnGUI_BuffList()
 {
     GUILayout.BeginVertical();
     windowSelectPosition = GUILayout.BeginScrollView(windowSelectPosition, GUILayout.Width(600), GUILayout.Height(900));
     {
         for (int i = 0; i < buffList.Count; i++)
         {
             OnGUI_EditorBuffItem(i);
             TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
         }
     }
     GUILayout.EndScrollView();
     GUILayout.EndVertical();
 }
 private void OnGUI_BuffList()
 {
     GUILayout.BeginVertical();
     windowSelectPosition = GUILayout.BeginScrollView(windowSelectPosition, GUILayout.Width(610), GUILayout.Height(800));
     {
         foreach (Buff b in buffList)
         {
             OnGUI_EditorBuffItem(b);
         }
     }
     GUILayout.EndScrollView();
     TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
     GUILayout.EndVertical();
 }
예제 #16
0
    private void OnGUI()
    {
//        if (this.curSkill == null)
//        {
//            GUILayout.BeginVertical(GUILayout.Width(1200));
//        }
        GUILayout.BeginVertical();

        GUI.SetNextControlName("RefreshFocus");
        GUILayout.TextField("", GUILayout.Width(0), GUILayout.Height(0));
        GUILayout.BeginHorizontal(GUILayout.Height(800));
        this.ShowSkills();
        this.ShowSkillBlock();
        this.EditorSkillBlock();
        GUILayout.EndHorizontal();
        TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
        GUILayout.EndVertical();
    }
예제 #17
0
 private void OnGUI()
 {
     GUI.SetNextControlName("RefreshFocus");
     GUILayout.TextField("", GUILayout.Width(0), GUILayout.Height(0));
     GUILayout.BeginHorizontal(GUILayout.Height(800));
     {
         OnGUI_DrawSkillGroup();
         OnGUI_DrawSkillBlock();
         //
         GUILayout.BeginVertical();
         {
             OnGUI_DrawAniFrame();
             OnGUI_DrawSkillEventWindow();
         }
         GUILayout.EndVertical();
     }
     GUILayout.EndHorizontal();
     TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
 }
 private void OnGUI_SkillList()
 {
     GUILayout.BeginVertical();
     windowSelectPosition = GUILayout.BeginScrollView(windowSelectPosition, GUILayout.Width(1500), GUILayout.Height(800));
     {
         List <int> keyList = new List <int>(skillList.Keys);
         keyList.Sort();
         for (int i = 0; i < keyList.Count; i++)
         {
             int          k = keyList[i];
             List <Skill> v;
             if (skillList.TryGetValue(k, out v))
             {
                 OnGUI_SkillScrollView(k, v);
                 TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
             }
         }
     }
     GUILayout.EndScrollView();
     GUILayout.EndVertical();
 }
예제 #19
0
    private void EditorSkillBlock()
    {
        if (this.curblock != null)
        {
            EditorSkillTool.GetSkillEventDict(this.curblock, ref seDict); //获取当前block event组
        }
        else
        {
            seDict.Clear();
            return;
        }

        GUILayout.BeginVertical();
        this.ShowCurAni();
        TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
        GUILayout.Space(10);
        this.ShowSkillEventWindow();
        //重组 覆盖当前block的List<SkillEvent>
        EditorSkillTool.PushSkillEventToBlock(ref this.curblock, seDict);
        EditorUtility.SetDirty(this.ani);
        GUILayout.EndVertical();
    }
    private void OnGUI_SkillScrollView(KeyValuePair <int, List <Skill> > kv)
    {
        GUILayout.BeginHorizontal();
        Vector2 selectPos;

        if (!selectPosDic.TryGetValue(kv.Key, out selectPos))
        {
            selectPos = Vector2.zero;
            selectPosDic.Add(kv.Key, selectPos);
        }
        selectPosDic[kv.Key] = GUILayout.BeginScrollView(selectPos, GUILayout.Width(1000), GUILayout.Height(200));
        {
            GUILayout.BeginHorizontal(GUILayout.Width(200), GUILayout.Height(200));
            for (int i = 0; i < kv.Value.Count; i++)
            {
                OnGUI_EditorSkillItem(kv.Value[i]);
            }
            GUILayout.EndHorizontal();
        }
        GUILayout.EndScrollView();
        TableToolMenu.Layout_DrawSeparator(Color.gray, 2);
        GUILayout.EndHorizontal();
    }
예제 #21
0
    public static void SwitchHandle(object target, TableConfig cfg)
    {
//        handle = target;
        TableToolMenu.OpenEditorWindow_SkillsSelect(target, cfg);
    }
 public static void SwitchHandle(Skill target)
 {
     handle = target;
     TableToolMenu.OpenEditorWindow_BuffsSelect();
 }
예제 #23
0
    private void ShowSkills()
    {
        int count = this.skill.SkillList.Count;

        skillpos = GUILayout.BeginScrollView(skillpos, GUILayout.Width(350), GUILayout.Height(800));
        GUILayout.BeginVertical(GUILayout.Height(780));
        GUILayout.Label("当前skill组");
        if (count == 0)
        {
            if (GUILayout.Button("新建一个Skill", GUILayout.Width(300)))
            {
//                Skill sk = new Skill();
//                sk.Blocks = new List<SkillBlock>();
//                this.skill.SkillList.Add(sk);
                Window_SelectSkill window =
                    (Window_SelectSkill)EditorWindow.GetWindow(typeof(Window_SelectSkill), false, "SelectSkillID");
                window.Show(this.skill, 0);
            }
        }

        count = this.skill.SkillList.Count;
        for (int i = 0; i < count; i++)
        {
            Skill sk = this.skill.SkillList[i];
            GUILayout.BeginHorizontal(GUILayout.Width(300));
            if (skillIndex == i)
            {
                GUI.color = Color.green;
                curSkill  = sk;
            }
            else
            {
                GUI.color = Color.white;
            }

            if (GUILayout.Button(sk.Id + ""))
            {
                if (skillIndex != i)
                {
                    this.blockIndex = 0;
                }
                skillIndex = i;
                curSkill   = sk;
                GUI.FocusControl("RefreshFocus");
            }

            GUI.color = GUI.backgroundColor;
            if (GUILayout.Button("add", GUILayout.Width(50)))
            {
//                Skill tp = new Skill();
//                tp.Blocks = new List<SkillBlock>();
//                this.skill.SkillList.Insert(i + 1, tp);
                Window_SelectSkill window =
                    (Window_SelectSkill)EditorWindow.GetWindow(typeof(Window_SelectSkill), false, "SelectSkillID");
                window.Show(this.skill, i);
            }

            if (GUILayout.Button("del", GUILayout.Width(50)))
            {
                this.skill.SkillList.Remove(sk);
                if (skillIndex == i)
                {
                    curSkill   = null;
                    skillIndex = 0;
                }
                else if (skillIndex > i)
                {
                    skillIndex--;
                }
            }

            count = this.skill.SkillList.Count;

            GUILayout.EndHorizontal();
        }

        GUILayout.EndVertical();
        GUILayout.EndScrollView();
        TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
    }
예제 #24
0
    /// <summary>
    /// 所有技能
    /// </summary>
    private void OnGUI_DrawSkillGroup()
    {
        if (skill == null)
        {
            return;
        }
        GUILayout.BeginVertical(GUILayout.Width(300), GUILayout.Height(800));
        //保存按钮
        {
            var oc = GUI.backgroundColor;
            GUI.color = Color.yellow;
            if (GUILayout.Button("保存", GUILayout.Width(100), GUILayout.Height(30)))
            {
                EditorUtility.SetDirty(skill);
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
            }
            // GUILayout.EndHorizontal();
            GUI.backgroundColor = oc;
        }
        GUILayout.Label("技能列表:");
        //显示所有按钮
        int count = skill.SkillList.Count;

        for (int i = 0; i < count; i++)
        {
            if (curSkillIndex == i)
            {
                GUI.color = Color.green;
            }
            else
            {
                GUI.color = Color.white;
            }

            var s = skill.SkillList[i];
            s.Id = i + 1;
            GUILayout.BeginHorizontal(); //每一个技能的横条
            {
                if (GUILayout.Button(s.Id.ToString()))
                {
                    curSkillIndex          = i;
                    curSkill               = s;
                    this.curSkillblockList = curSkill.Blocks;

                    curSkillblockIndex  = -1;
                    curSkillEvnetIndex  = -1;
                    curSkillblock       = null;
                    curSkillEventList   = null;
                    curAniClip          = null;
                    curSkillEventEditor = null;
                    GUI.FocusControl("RefreshFocus");
                }

                GUI.color = GUI.backgroundColor;

                if (GUILayout.Button("DEL", GUILayout.Width(35)))
                {
                    skill.SkillList.Remove(s);
                    curSkillIndex       = -1;
                    curSkillblockIndex  = -1;
                    curSkillEvnetIndex  = -1;
                    curSkillblock       = null;
                    curSkillEventList   = null;
                    curAniClip          = null;
                    curSkillEventEditor = null;
                    curSkillblockList   = null;
                    count = skill.SkillList.Count;

                    GUI.FocusControl("RefreshFocus");
                }
            }
            GUILayout.EndHorizontal();
        }

        GUILayout.Space(20);
        if (GUILayout.Button("创建skill"))
        {
            if (skill.SkillList == null || skill.SkillList.Count == 0)
            {
                skill.SkillList = new List <Game.Battle.Skill.Skill>();
            }

            var s = new Skill();
//            s.Id = skill.SkillList.Count;

            skill.SkillList.Add(s);
        }

        GUILayout.EndVertical();
        TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
    }
예제 #25
0
    /// <summary>
    /// 当前技能帧事件
    /// </summary>
    private void OnGUI_DrawSkillEvent()
    {
        GUILayout.BeginVertical(GUILayout.Width(300), GUILayout.Height(550));
        GUILayout.Label("技能事件列表:");
        if (curSkillEventList != null)
        {
            int count = curSkillEventList.Count;
            for (int i = 0; i < curSkillEventList.Count; i++)
            {
                GUILayout.BeginHorizontal();
                if (curSkillEvnetIndex == i)
                {
                    GUI.color = Color.green;
                }
                else
                {
                    GUI.color = Color.white;
                }

                var e = curSkillEventList[i];
                if (GUILayout.Button(string.Format("[{0}] " + e.EventName, i)))
                {
                    this.curSkillEvnetIndex = i;
                    //TODO 需要给Editor进行赋值
                    SkillEditorData data = skillEditorDict[e.EventName];
                    curSkillEventEditor =
                        (ISkillEventEditor)data.classdata.Assembly.CreateInstance(data.classdata.FullName);

                    GUI.FocusControl("RefreshFocus");
                }

                GUI.color = GUI.backgroundColor;
                if (GUILayout.Button("DEL", GUILayout.Width(35)))
                {
                    curSkillEventList.Remove(e);
                    curSkillblock.Events.Remove(e);
                    this.curSkillEvnetIndex = -1;
                    curSkillEventEditor     = null;
                    count = curSkillEventList.Count;

                    GUI.FocusControl("RefreshFocus");
                }
                GUILayout.EndHorizontal();
            }
        }

        GUILayout.Space(20);
        if (curSkillblock != null)
        {
            if (GUILayout.Button("添加事件"))
            {
                Window_SelectSkillEvent window =
                    (Window_SelectSkillEvent)EditorWindow.GetWindow(typeof(Window_SelectSkillEvent), false,
                                                                    "选择创建skillevent");
                window.Show(this.curframe, this.curSkillblock, this.curSkillEventList);
            }
        }

        GUILayout.EndVertical();
        TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
    }
예제 #26
0
    /// <summary>
    /// 当前技能block
    /// </summary>
    private void OnGUI_DrawSkillBlock()
    {
        GUILayout.BeginVertical(GUILayout.Width(300), GUILayout.Height(800));

        GUILayout.Label("技能块列表:");
        if (curSkillblockList != null)
        {
            int count = curSkillblockList.Count;
            for (int i = 0; i < count; i++)
            {
                GUILayout.BeginVertical();
                if (curSkillblockIndex == i)
                {
                    GUI.color = Color.green;
                }
                else
                {
                    GUI.color = Color.white;
                }

                var sb = this.curSkillblockList[i];
                GUILayout.BeginHorizontal();
                if (GUILayout.Button(string.Format("[{0}] -" + sb.AniName, i)))
                {
                    curSkillblockIndex  = i;
                    curAniClip          = ani.GetClip(sb.AniName);
                    curSkillblock       = sb;
                    curSkillEventList   = EditorSkillTool.GetCurFrameEventList(this.curframe, curSkillblock);
                    curSkillEvnetIndex  = -1;
                    curSkillEventEditor = null;
                    GUI.FocusControl("RefreshFocus");
                }

                GUI.color = GUI.backgroundColor;
                if (GUILayout.Button("DEL", GUILayout.Width(35)))
                {
                    this.curSkillblockList.Remove(sb);
                    count = curSkillblockList.Count;
                    curSkillblockIndex  = -1;
                    curSkillblock       = null;
                    curSkillEventList   = null;
                    curSkillEvnetIndex  = -1;
                    curAniClip          = null;
                    curSkillEventEditor = null;

                    GUI.FocusControl("RefreshFocus");
                }

                GUILayout.EndHorizontal();

                GUILayout.EndVertical();
            }
        }

        GUILayout.Space(20);
        if (curSkillblockList != null)
        {
            if (GUILayout.Button("创建skillBlock"))
            {
                Window_SelectAniClip window =
                    (Window_SelectAniClip)EditorWindow.GetWindow(typeof(Window_SelectAniClip), false, "SelectAniClip");
                window.Show(this.curSkillblockList, this.ani);
            }
        }

        GUILayout.EndVertical();

        TableToolMenu.Layout_DrawSeparatorV(Color.gray, 2);
    }