zhaoyang 3 lat temu
rodzic
commit
05877c93c1

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -251,6 +251,7 @@ namespace GFGGame
                     ViewManager.Show<FieldFightEndView>();
                 }
             }
+            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
 
         }
 

+ 9 - 1
GameClient/Assets/Game/HotUpdate/Data/MailDataManager.cs

@@ -34,7 +34,14 @@ namespace GFGGame
         public int UnreadCount////未读邮件数量
         {
             get { return _unreadCount; }
-            set { _unreadCount = value; }
+            set
+            {
+                if (_unreadCount != value)
+                {
+                    _unreadCount = value;
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+                }
+            }
         }
 
         private int _startIndex = 0;
@@ -89,6 +96,7 @@ namespace GFGGame
             _mailInfoDic[mailId].state = state;
             if (content != "") _mailInfoDic[mailId].content = content;
             if (rewards != null) _mailInfoDic[mailId].rewards = rewards;
+            UnreadCount = UnreadCount - 1;
         }
 
 

+ 1 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/MailSProxy.cs

@@ -99,7 +99,7 @@ namespace GFGGame
                     MailDataManager.Instance.UpdateMailContent(response.MailId, response.Status);
                     List<ItemData> itemDatas = MailDataManager.Instance.GetMailInfoById(response.MailId).rewards;
                     BonusController.TryShowBonusList(itemDatas);
-
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     EventAgent.DispatchEvent(ConstMessage.MAIL_REWARD);
                     return true;
                 }
@@ -124,7 +124,6 @@ namespace GFGGame
                     }
                     BonusController.TryShowBonusList(itemDatas);
                     EventAgent.DispatchEvent(ConstMessage.MAIL_ALLREWARD);
-
                     return true;
                 }
             }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -806,6 +806,7 @@ namespace GFGGame
             UI_ComCostCurrency.ProxyEnd();
             UI_ComCostCurrencyWithHas.ProxyEnd();
             _comFosterBottom.m_listLvConsume.numItems = 0;
+            _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
         {

+ 4 - 2
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -54,9 +54,10 @@ namespace GFGGame
                 GFGAsset.Release(ResPathUtil.GetPrefabPath("SceneDressUp"));
                 _scenePrefab = null;
             }
-            if(_wrapper!=null){
+            if (_wrapper != null)
+            {
                 _wrapper.Dispose();
-                _wrapper=null;
+                _wrapper = null;
             }
             if (_comSelected != null)
             {
@@ -214,6 +215,7 @@ namespace GFGGame
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateSelectedItemInfo);
             EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateItemChange);
+            EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateItemChange);
 
         }
         private void OnClickBtnBack()

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/DailyTask/DailyTaskView.cs

@@ -64,6 +64,7 @@ namespace GFGGame
 
         protected override void OnHide()
         {
+            _valueBarController.OnHide();
             base.OnHide();
         }
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Field/FieldView.cs

@@ -82,7 +82,7 @@ namespace GFGGame
         {
             base.OnHide();
             Timers.inst.Remove(UpdateShowTime);
-
+            _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
         {

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusView.cs

@@ -21,10 +21,10 @@ namespace GFGGame
             base.Dispose();
             for (int i = 0; i < _effects.Count; i++)
             {
-                SceneController.DestroyObjectFromView(_effects[i],_wrappers[i]);
+                SceneController.DestroyObjectFromView(_effects[i], _wrappers[i]);
 
             }
-            SceneController.DestroyObjectFromView(_effect,_wrapper);
+            SceneController.DestroyObjectFromView(_effect, _wrapper);
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -52,6 +52,7 @@ namespace GFGGame
                 GGraph holder = _ui.target.GetChild("item" + i).asCom.GetChild("holder").asGraph;
                 SceneController.AddObjectToView(null, null, holder, resPath, out gameObject0, out wrapper0);
                 _effects.Add(gameObject0);
+                _wrappers.Add(wrapper0);
             }
             GGraph holder1 = _ui.target.GetChild("itemOne").asCom.GetChild("holder").asGraph;
             SceneController.AddObjectToView(null, null, holder1, resPath, out _effect, out _wrapper);

+ 5 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -324,7 +324,7 @@ namespace GFGGame
             _ui.m_proScore.m_txtCount.text = "总分 " + Math.Round(_score).ToString();
             // _ui.m_proScore.target.TweenValue(_score, 0.2f);
 
-            double proportion = _score / _ui.m_proScore.target.max;//(_score + _ui.m_proScore.target.max) > 0 ? _score / (_score + _ui.m_proScore.target.max) : 0;
+            double proportion = _score / _ui.m_proScore.target.max;
             float width = (float)(proportion * _ui.m_proScore.target.width);
             width = width > _ui.m_proScore.m_comBar.target.initWidth ? _ui.m_proScore.m_comBar.target.initWidth : width;
             GTween.To(_ui.m_proScore.m_comBar.target.width, width, 0.5f).SetTarget(_ui.m_proScore.m_comBar).OnUpdate((GTweener t) =>
@@ -345,8 +345,8 @@ namespace GFGGame
         }
         private void OnBtnBackClick()
         {
-            this.Hide();
             Reset();
+            this.Hide();
             InstanceZonesController.OnFinishStoryLevel(InstanceZonesDataManager.currentLevelCfgId, false, false);
         }
         protected override void RemoveEventListener()
@@ -368,7 +368,9 @@ namespace GFGGame
             _gameObject2.SetActive(false);
             // _ui.m_comClickCircle.m_ComScoreResult;// ComScoreResult
             _ui.m_comClickCircle.m_ComScoreResult.target.visible = false;
-
+            GTween.Kill(_gameObject7);
+            GTween.Kill(_ui.m_proScore.m_comBar);
+            GTween.Kill(_ui.m_holderPartScore);
         }
 
         private void PlayScoreTWEffect()

+ 12 - 13
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -186,6 +186,7 @@ namespace GFGGame
             _ui.m_ComShieldNpc.m_holder.visible = false;
             _ui.m_ComShieldNpc.m_holder1.visible = false;
         }
+
         protected override void Init()
         {
             base.Init();
@@ -280,13 +281,7 @@ namespace GFGGame
             _targetMainScore = fightCfg.targetMainScore;
 
             UpdateNormal();
-            _ui.m_btnSpeedUp.visible = _isAutoPlay;
-            _ui.m_btnSpeedUp.title = "x" + _speed;
 
-            if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.TARGET_FIGHT) <= 0)
-            {
-                _ui.m_btnSkill0.target.touchable = false;
-            }
             Timers.inst.Add(0.5f / _speed, 1, CircleScoreStart);//评分开始
             Timers.inst.AddUpdate(CheckGuide);
         }
@@ -320,6 +315,12 @@ namespace GFGGame
                     OnBtnSkillClick(btnSkill);
                 }
             }
+            _ui.m_btnSpeedUp.visible = _isAutoPlay;
+            _ui.m_btnSpeedUp.title = "x" + _speed;
+            if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.TARGET_FIGHT) <= 0)
+            {
+                _ui.m_btnSkill0.target.touchable = false;
+            }
         }
 
 
@@ -435,12 +436,7 @@ namespace GFGGame
             {
                 PlayScoreTWEffect(_ui.m_holderPartScoreNpc, _ui.m_comTargetCircle.target.position, _ui.m_proScore.target.position + new Vector3(_ui.m_proScore.target.width, 0, 0));
             });
-            // _ui.m_comTargetCircle.m_t1.ignoreEngineTimeScale = false;
-            // _ui.m_comTargetCircle.m_t1.timeScale = _speed;
-            // _ui.m_comTargetCircle.m_t1.Play(() =>
-            // {
-            //     PlayScoreTWEffect(_ui.m_holderPartScoreNpc, _ui.m_comTargetCircle.target.position, _ui.m_proScore.target.position + new Vector3(_ui.m_proScore.target.width, 0, 0));
-            // });
+
             Timers.inst.Add(2.5f / _speed, 1, CircleScoreEnd);
         }
         private void PlayScoreTWEffect(GGraph holderScore, Vector3 startValue, Vector3 endValue)
@@ -727,7 +723,10 @@ namespace GFGGame
             if (twenerMine != null) twenerMine.Kill(true);
             GTweener twenerNpc = GTween.GetTween(_ui.m_proMinusNpc, TweenPropType.Progress);
             if (twenerNpc != null) twenerNpc.Kill(true);
-
+            GTween.Kill(_ui.m_proScore.m_comBar);
+            GTween.Kill(_ui.m_holderPartScore);
+            GTween.Kill(_ui.m_holderPartScoreNpc);
+            //   GTween.To(startValue, endValue, 0.5f).SetTarget(holderScore)
             _gameObject13.SetActive(false);
             _gameObject14.SetActive(false);
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -461,7 +461,7 @@ namespace GFGGame
         protected override void UpdateToCheckGuide(object param)
         {
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
-            GuideController.TryGuide(_ui.m_btnZhaiXing.target, ConstGuideId.LUCKY_BOX, 2, "“摘星”里可以通过星辰的力量获得服饰", -1, false);
+            GuideController.TryGuide(_ui.m_btnZhaiXing.target, ConstGuideId.LUCKY_BOX, 2, "“摘星”里可以通过星辰的力量获得服饰", -1, true);
 
             GuideController.TryCompleteGuide(ConstGuideId.FREEDOM_DRESS, 6);
             GuideController.TryGuide(_ui.m_btnHuanZhuang.target, ConstGuideId.FREEDOM_DRESS, 2, "在这里,可以自由搭配服饰和分享哦~", -1, false);

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -298,13 +298,13 @@ namespace GFGGame
                     _viewDic.Remove(viewName);
                 }
             }
-
         }
         public static void HideAllView(string excludeViewName = null)
         {
             for (int i = _viewDic.Keys.Count - 1; i >= 0; i--)//不用foreach是因为:循环过程中可能会触发dispose,导致_viewDic.Keys变化,最终报错
             {
-                KeyValuePair<string, UIView> kv = _viewDic.ElementAt(i);
+                int index = i > _viewDic.Keys.Count - 1 ? _viewDic.Keys.Count - 1 : i;//直接去最后一个,不用i是因为关闭一个界面可能会连带关闭其他界面,最终i比_viewDic.Keys.Count大而报错
+                KeyValuePair<string, UIView> kv = _viewDic.ElementAt(index);
                 if (kv.Key != excludeViewName)
                 {
                     if (kv.Key == typeof(FunctionOpenView).Name) continue;//功能开启界面不能强制关闭