少年修仙传客户端代码仓库
client_linchunjie
2018-11-21 5f397fffd6c50eac3ea98bad826e3e3be6c9cd4c
3335【1.3】关闭子界面逻辑修改
7个文件已修改
342 ■■■■ 已修改文件
System/FairyAu/UnionPanel.cs 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Market/MarketWin.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/RolePanel.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RunePanel.cs 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/SkillPanel.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipRechargeWin.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/WelfareWin.cs 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/UnionPanel.cs
@@ -64,56 +64,28 @@
        private void OnKingTemper()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<KingTempleWin>();
            }
            else
            {
                WindowCenter.Instance.Open<KingTempleWin>();
            }
            WindowCenter.Instance.Open<KingTempleWin>();
            functionOrder = 5;
        }
        private void OnUnionLeague()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<FairyLeagueWin>();
            }
            else
            {
                WindowCenter.Instance.Open<FairyLeagueWin>();
            }
            WindowCenter.Instance.Open<FairyLeagueWin>();
            functionOrder = 4;
        }
        private void OnUnionList()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<FairyApplyWin>();
            }
            else
            {
                WindowCenter.Instance.Open<FairyApplyWin>();
            }
            WindowCenter.Instance.Open<FairyApplyWin>();
            functionOrder = 3;
        }
        private void OnMemberList()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<FairyMemberWin>();
            }
            else
            {
                WindowCenter.Instance.Open<FairyMemberWin>();
            }
            WindowCenter.Instance.Open<FairyMemberWin>();
            functionOrder = 2;
        }
@@ -140,7 +112,7 @@
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
@@ -162,21 +134,10 @@
        void CloseChildWin()
        {
            funcPanel.SetActive(false);
            if (WindowCenter.Instance.IsOpen<FairyApplyWin>())
            var children = WindowConfig.Get().FindChildWindows("UnionPanel");
            foreach (var window in children)
            {
                WindowCenter.Instance.CloseImmediately<FairyApplyWin>();
            }
            if (WindowCenter.Instance.IsOpen<FairyMemberWin>())
            {
                WindowCenter.Instance.CloseImmediately<FairyMemberWin>();
            }
            if (WindowCenter.Instance.IsOpen<FairyLeagueWin>())
            {
                WindowCenter.Instance.CloseImmediately<FairyLeagueWin>();
            }
            if (WindowCenter.Instance.IsOpen<KingTempleWin>())
            {
                WindowCenter.Instance.CloseImmediately<KingTempleWin>();
                WindowCenter.Instance.Close(window);
            }
        }
System/Market/MarketWin.cs
@@ -38,42 +38,21 @@
        private void OnDealRecord()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<MarketDealRecordWin>();
            }
            else
            {
                WindowCenter.Instance.Open<MarketDealRecordWin>();
            }
            WindowCenter.Instance.Open<MarketDealRecordWin>();
            functionOrder = 2;
        }
        private void OnPutaway()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<MarketPutawayWin>();
            }
            else
            {
                WindowCenter.Instance.Open<MarketPutawayWin>();
            }
            WindowCenter.Instance.Open<MarketPutawayWin>();
            functionOrder = 1;
        }
        private void OnDeal()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<MarketDealWin>();
            }
            else
            {
                WindowCenter.Instance.Open<MarketDealWin>();
            }
            WindowCenter.Instance.Open<MarketDealWin>();
            functionOrder = 0;
        }
@@ -113,14 +92,10 @@
        }
        private void CloseChildWin()
        {
            if (WindowCenter.Instance.IsOpen<MarketDealWin>()) {
                WindowCenter.Instance.CloseImmediately<MarketDealWin>();
            }
            if (WindowCenter.Instance.IsOpen<MarketPutawayWin>()) {
                WindowCenter.Instance.CloseImmediately<MarketPutawayWin>();
            }
            if (WindowCenter.Instance.IsOpen<MarketDealRecordWin>()) {
                WindowCenter.Instance.CloseImmediately<MarketDealRecordWin>();
            var children = WindowConfig.Get().FindChildWindows("MarketWin");
            foreach (var window in children)
            {
                WindowCenter.Instance.Close(window);
            }
        }
    }
System/Role/RolePanel.cs
@@ -14,11 +14,7 @@
    {
        [SerializeField] FunctionButtonGroup buttonGroup;
        [SerializeField] FunctionButton functionButtonRole;
        [SerializeField] FunctionButton functionButtonClothes;
        [SerializeField] FunctionButton functionButtonMounts;
        [SerializeField] FunctionButton functionButtonMagician;
        [SerializeField] FunctionButton functionButtonGulu;
        [SerializeField] FunctionButton functionButtonHorucx;
        [SerializeField] RectTransform m_RoleInfoRt;
        [SerializeField] Text m_PropertyAtk;
@@ -267,11 +263,7 @@
        protected override void AddListeners()
        {
            functionButtonRole.onClick.AddListener(OnFuncRole);
            functionButtonClothes.onClick.AddListener(OnFuncClothes);
            functionButtonMounts.onClick.AddListener(OnFuncMounts);
            functionButtonMagician.onClick.AddListener(OnFuncMagician);
            functionButtonGulu.onClick.AddListener(OnFuncGulu);
            functionButtonHorucx.onClick.AddListener(OnFuncHorucx);
            m_AddPoint.onClick.AddListener(OnPromoteClick);
            m_PlayerPropertyBtn.onClick.AddListener(OnAttrExplainClick);
            m_TitleBtn.onClick.AddListener(OnDesignationClick);
@@ -280,16 +272,6 @@
            m_LeftBtn.onClick.AddListener(buttonGroup.TriggerLast);
            m_RightBtn.onClick.AddListener(buttonGroup.TriggerNext);
            m_CloseBtn.onClick.AddListener(CloseClick);
        }
        private void OnFuncHorucx()
        {
            functionOrder = 5;
        }
        private void OnFuncGulu()
        {
            functionOrder = 4;
        }
        private void OnFuncMagician()
@@ -304,25 +286,6 @@
                WindowCenter.Instance.Open<MagicianWin>();
            }
            functionOrder = 3;
        }
        private void OnFuncMounts()
        {
            CloseChild();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<MountWin>();
            }
            else
            {
                WindowCenter.Instance.Open<MountWin>();
            }
            functionOrder = 2;
        }
        private void OnFuncClothes()
        {
            functionOrder = 1;
        }
        private void OnFuncRole()
@@ -390,13 +353,10 @@
                OnDisableRole();
                m_RoleInfoRt.gameObject.SetActive(false);
            }
            if (WindowCenter.Instance.IsOpen<MagicianWin>())
            var children = WindowConfig.Get().FindChildWindows("RolePanel");
            foreach (var window in children)
            {
                WindowCenter.Instance.CloseImmediately<MagicianWin>();
            }
            if (WindowCenter.Instance.IsOpen<MountWin>())
            {
                WindowCenter.Instance.CloseImmediately<MountWin>();
                WindowCenter.Instance.Close(window);
            }
        }
System/Rune/RunePanel.cs
@@ -47,41 +47,23 @@
        {
            CloseChild();
            functionOrder = 2;
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<RuneComposeWin>();
            }
            else
            {
                WindowCenter.Instance.Open<RuneComposeWin>();
            }
            WindowCenter.Instance.Open<RuneComposeWin>();
        }
        private void OnRuneBreak()
        {
            CloseChild();
            functionOrder = 1;
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<RuneBreakWin>();
            }
            else
            {
                WindowCenter.Instance.Open<RuneBreakWin>();
            }
            WindowCenter.Instance.Open<RuneBreakWin>();
        }
        private void OnRuneMosaic()
        {
            CloseChild();
            functionOrder = 0;
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<RuneMosaicWin>();
            }
            else
            {
                WindowCenter.Instance.Open<RuneMosaicWin>();
            }
            WindowCenter.Instance.Open<RuneMosaicWin>();
        }
        protected override void OnPreOpen()
        {
            model.JumpToComposeEvent += JumpToComposeEvent;
@@ -111,17 +93,10 @@
        private void CloseChild()
        {
            if (WindowCenter.Instance.IsOpen<RuneMosaicWin>())
            var children = WindowConfig.Get().FindChildWindows("RunePanel");
            foreach (var window in children)
            {
                WindowCenter.Instance.CloseImmediately<RuneMosaicWin>();
            }
            if (WindowCenter.Instance.IsOpen<RuneBreakWin>())
            {
                WindowCenter.Instance.CloseImmediately<RuneBreakWin>();
            }
            if (WindowCenter.Instance.IsOpen<RuneComposeWin>())
            {
                WindowCenter.Instance.CloseImmediately<RuneComposeWin>();
                WindowCenter.Instance.Close(window);
            }
        }
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);
            }
        }
    }
System/Vip/VipRechargeWin.cs
@@ -52,14 +52,7 @@
        public void OnVipPay()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<RechargeWin>();
            }
            else
            {
                WindowCenter.Instance.Open<RechargeWin>();
            }
            WindowCenter.Instance.Open<RechargeWin>();
            presentWinType = VipModel.VipWinType.Pay;
            functionOrder = 0;
        }
@@ -67,17 +60,11 @@
        private void OnVip()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<VipWin>();
            }
            else
            {
                WindowCenter.Instance.Open<VipWin>();
            }
            WindowCenter.Instance.Open<VipWin>();
            presentWinType = VipModel.VipWinType.Vip;
            functionOrder = 1;
        }
        protected override void OnPreOpen()
        {
            CloseChildWin();
@@ -130,13 +117,10 @@
        private void CloseChildWin()
        {
            if (WindowCenter.Instance.IsOpen<VipWin>())
            var children = WindowConfig.Get().FindChildWindows("VipRechargeWin");
            foreach (var window in children)
            {
                WindowCenter.Instance.CloseImmediately<VipWin>();
            }
            if (WindowCenter.Instance.IsOpen<RechargeWin>())
            {
                WindowCenter.Instance.CloseImmediately<RechargeWin>();
                WindowCenter.Instance.Close(window);
            }
        }
System/Welfare/WelfareWin.cs
@@ -24,7 +24,7 @@
        InSevenDayModel m_InSevenDayModel;
        InSevenDayModel inSevenDay { get { return m_InSevenDayModel ?? (m_InSevenDayModel = ModelCenter.Instance.GetModel<InSevenDayModel>()); } }
        FairyJadeInvestmentModel m_FairyJadeInvestmentModel;
        FairyJadeInvestmentModel fairyJadeInvestmentModel { get { return m_FairyJadeInvestmentModel ?? (m_FairyJadeInvestmentModel = ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>()); } }
        #region Built-in
@@ -45,75 +45,38 @@
        private void OnPrayer()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<PrayerWin>();
            }
            else
            {
                WindowCenter.Instance.Open<PrayerWin>();
            }
            WindowCenter.Instance.Open<PrayerWin>();
            functionOrder = 1;
        }
        private void InSeven()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<InSevenDayWin>();
            }
            else
            {
                WindowCenter.Instance.Open<InSevenDayWin>();
            }
            WindowCenter.Instance.Open<InSevenDayWin>();
            functionOrder = 2;
        }
        private void OnLevelGift()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<LevelGiftWin>();
            }
            else
            {
                WindowCenter.Instance.Open<LevelGiftWin>();
            }
            WindowCenter.Instance.Open<LevelGiftWin>();
            functionOrder = 3;
        }
        private void OnExchange()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<AwardExchangeWin>();
            }
            else
            {
                WindowCenter.Instance.Open<AwardExchangeWin>();
            }
            WindowCenter.Instance.Open<AwardExchangeWin>();
            functionOrder = 4;
        }
        private void OnSignIn()
        {
            CloseChildWin();
            if (windowState == WindowState.Opened)
            {
                WindowCenter.Instance.OpenWithoutAnimation<SignInWin>();
            }
            else
            {
                WindowCenter.Instance.Open<SignInWin>();
            }
            WindowCenter.Instance.Open<SignInWin>();
            functionOrder = 0;
        }
        protected override void OnPreOpen()
        {
            OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
            if (TimeUtility.CreateDays > 7 && inSevenDay.redPointStre1.state == RedPointState.None)//创角天
            {
                Btn_InSeven.gameObject.SetActive(false);
@@ -122,9 +85,6 @@
            {
                Btn_InSeven.gameObject.SetActive(true);
            }
            CheckOperationOpen();
        }
        protected override void OnActived()
@@ -135,8 +95,6 @@
        protected override void OnPreClose()
        {
            OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent;
            OperationTimeHepler.Instance.operationEndEvent -= OperationEndEvent;
            CloseChildWin();
            if (NewBieCenter.Instance.inGuiding && NewBieCenter.Instance.currentGuide == 40)
            {
@@ -160,50 +118,13 @@
        #endregion
        private void CloseChildWin()
        {
            if (WindowCenter.Instance.IsOpen<SignInWin>())
            var children = WindowConfig.Get().FindChildWindows("WelfareWin");
            foreach (var window in children)
            {
                WindowCenter.Instance.CloseImmediately<SignInWin>();
            }
            if (WindowCenter.Instance.IsOpen<PrayerWin>())
            {
                WindowCenter.Instance.CloseImmediately<PrayerWin>();
            }
            if (WindowCenter.Instance.IsOpen<InSevenDayWin>())
            {
                WindowCenter.Instance.CloseImmediately<InSevenDayWin>();
            }
            if (WindowCenter.Instance.IsOpen<LevelGiftWin>())
            {
                WindowCenter.Instance.CloseImmediately<LevelGiftWin>();
            }
            if (WindowCenter.Instance.IsOpen<AwardExchangeWin>())
            {
                WindowCenter.Instance.CloseImmediately<AwardExchangeWin>();
                WindowCenter.Instance.Close(window);
            }
        }
        private void OperationStartEvent(Operation arg1, int arg2)
        {
            CheckOperationOpen();
        }
        private void OperationEndEvent(Operation type, int state)
        {
        }
        void CheckOperationOpen()
        {
        }
        public bool Open(Operation type,out OperationBase operation)
        {
            operation = null;
            OperationTimeHepler.Instance.TryGetOperationTime(type, out operation);
            return OperationTimeHepler.Instance.SatisfyOpenCondition(type);
        }
    }
}