少年修仙传客户端代码仓库
client_linchunjie
2018-11-21 5f397fffd6c50eac3ea98bad826e3e3be6c9cd4c
System/Skill/SkillPanel.cs
@@ -51,38 +51,21 @@
        {
            CloseChild();
            functionOrder = 1;
            if (windowState == WindowState.Opened) {
                WindowCenter.Instance.OpenWithoutAnimation<SkillPassWin>();
            }
            else {
                WindowCenter.Instance.Open<SkillPassWin>();
            }
            WindowCenter.Instance.Open<SkillPassWin>();
        }
        private void OnTalentFunc()
        {
            CloseChild();
            functionOrder = 2;
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<TalentWin>();
            }
            else
            {
                WindowCenter.Instance.Open<TalentWin>();
            }
            WindowCenter.Instance.Open<TalentWin>();
        }
        private void OnAccordFunc()
        {
            CloseChild();
            functionOrder = 0;
            if (windowState == WindowState.Opened) {
                WindowCenter.Instance.OpenWithoutAnimation<SkillAccordWin>();
            }
            else {
                WindowCenter.Instance.Open<SkillAccordWin>();
            }
            WindowCenter.Instance.Open<SkillAccordWin>();
        }
        protected override void OnPreOpen()
@@ -129,15 +112,10 @@
        void CloseChild()
        {
            if (WindowCenter.Instance.IsOpen<SkillAccordWin>()) {
                WindowCenter.Instance.CloseImmediately<SkillAccordWin>();
            }
            if (WindowCenter.Instance.IsOpen<SkillPassWin>()) {
                WindowCenter.Instance.CloseImmediately<SkillPassWin>();
            }
            if (WindowCenter.Instance.IsOpen<TalentWin>())
            var children = WindowConfig.Get().FindChildWindows("SkillPanel");
            foreach (var window in children)
            {
                WindowCenter.Instance.CloseImmediately<TalentWin>();
                WindowCenter.Instance.Close(window);
            }
        }
    }