少年修仙传客户端代码仓库
hch
2019-10-09 dd3d9c34106f948b95deaa23b6a1771212f6752f
0312 首充倒计时显示,暂关闭特效
3个文件已修改
48 ■■■■■ 已修改文件
System/Vip/FirstRechargeWin.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/FirstTimeRechargeModel.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/FirstTimeRechargeWin.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/FirstRechargeWin.cs
@@ -31,6 +31,7 @@
                return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<VipModel>());
            }
        }
        FirstTimeRechargeModel firstTimeRechargeModel { get { return ModelCenter.Instance.GetModel<FirstTimeRechargeModel>(); } }
        #region Built-in
        protected override void BindController()
        {
@@ -74,7 +75,8 @@
        protected override void OnPreOpen()
        {
            if (firstTimeRechargeModel.IsShowTime())
                firstTimeRechargeModel.IsShowOnce = true;
        }
        protected override void OnAfterOpen()
System/Vip/FirstTimeRechargeModel.cs
@@ -20,11 +20,12 @@
        public int CumulativeTime;//获取累计时间
        public int FirstGoldTimeOut = 0;
        public static event Action<string> FirstTimeRechargeTiime;
        public static event Action<string, bool> FirstTimeRechargeTiime;
        public static event Action FirstTimeRecharEffect;
        public bool IsPlayEffect = false;
        private bool IsStageLoadFinish = false;
        public bool IsTipShow = false;
        public bool IsShowOnce = false; //倒计时上线点击后不再显示,最后一分钟必显
        DateTime GetDateTime;
        //--------------------获取首冲试用数据
@@ -197,6 +198,16 @@
            return mapConfig != null && mapConfig.MapFBType != 0;
        }
        public bool IsShowTime()
        {
            TimeSpan ts = DateTime.Now - GetDateTime;
            int second = (int)ts.TotalSeconds;
            if (CumulativeTime != 0 && CumulativeTime > second)
                return true;
            return false;
        }
        private void secondEvent()
        {
            //var inDungeon = IsDungeon();
@@ -206,13 +217,15 @@
            {
                if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() && !WindowCenter.Instance.IsOpen<ChatWin>())
                {
                    int Residue = CumulativeTime - second;
                    if (!WindowCenter.Instance.IsOpen("FirstTimeRechargeWin"))
                    {
                        WindowCenter.Instance.Open<FirstTimeRechargeWin>();
                        if (!IsShowOnce && Residue / 60 > 0)
                            WindowCenter.Instance.Open<FirstTimeRechargeWin>();
                    }
                    int Residue = CumulativeTime - second;
                    string strTime = string.Empty;
                    bool isRed = false;
                    if (Residue / 60 > 0)
                    {
                        strTime = Residue / 60 + Language.Get("Minute") + Residue % 60 + Language.Get("RealmWin_Bewrite_35");
@@ -225,12 +238,13 @@
                    {
                        IsPlayEffect = true;
                        FirstTimeRecharEffect();
                        isRed = true;
                    }
                    if (FirstTimeRechargeTiime != null)
                    {
                        FirstTimeRechargeTiime(strTime);
                        FirstTimeRechargeTiime(strTime, isRed);
                    }
                }
                else
System/Vip/FirstTimeRechargeWin.cs
@@ -70,7 +70,7 @@
            else
            {
                m_EffectImage.gameObject.SetActive(false);
                m_Image.SetActive(true);
                m_Image.SetActive(false);
            }
            MainPositionTween.switchFunctionStateEvent += OnMainWinFunctionSwitch;
@@ -82,17 +82,17 @@
        protected override void OnActived()
        {
            base.OnActived();
            var isDungeon = MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID);
            if (ClientDungeonStageUtility.isClientDungeon)
            {
                isDungeon = true;
            }
            m_ContainerTime.anchoredPosition = isDungeon ? m_Positoins[1] : m_Positoins[0];
            //var isDungeon = MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID);
            //if (ClientDungeonStageUtility.isClientDungeon)
            //{
            //    isDungeon = true;
            //}
            //m_ContainerTime.anchoredPosition = isDungeon ? m_Positoins[1] : m_Positoins[0];
        }
        protected override void OnAfterOpen()
        {
            DisplayModel();
            //DisplayModel();
        }
        protected override void OnPreClose()
@@ -121,7 +121,7 @@
        private void OnMainWinFunctionSwitch(bool obj)
        {
            DisplayModel();
            //DisplayModel();
        }
        private void DisplayModel()
@@ -186,10 +186,12 @@
            {
                WindowCenter.Instance.Open<FirstRechargeWin>(true);
            }
        }
        private void FirstTimeRechargeTiime(string obj)
        private void FirstTimeRechargeTiime(string obj, bool isRed)
        {
            m_TimeText.text = obj;
            m_TimeText.color = isRed ? UIHelper.GetUIColor(TextColType.Red, true) : UIHelper.GetUIColor(TextColType.Green, true);
            if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing)
            {
                UI3DModelExhibition.Instance.StopShow();