Browse Source

查阅建档

zhaoyang 2 years ago
parent
commit
688769f10a
22 changed files with 153 additions and 43 deletions
  1. 5 4
      FGUIProject/assets/CommonGame/GoodsItemTips.xml
  2. 0 1
      FGUIProject/assets/CommonGame/components/ComItem.xml
  3. 1 1
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  4. 1 1
      GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs
  5. 14 0
      GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs
  6. 31 7
      GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs
  7. 1 1
      GameClient/Assets/Game/HotUpdate/Data/VO/StudioData.cs
  8. 0 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComItem.cs
  9. 15 2
      GameClient/Assets/Game/HotUpdate/ServerProxy/StudioSProxy.cs
  10. 2 0
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/GoodsItemTipsView.cs
  11. 9 6
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/ItemView.cs
  12. 1 1
      GameClient/Assets/Game/HotUpdate/Views/Mail/MailContentView.cs
  13. 11 1
      GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs
  14. 2 1
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryController.cs
  15. 1 0
      GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs
  16. 2 0
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingNpcView.cs
  17. 22 4
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingRewardView.cs
  18. 20 8
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingView.cs
  19. 15 2
      GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs
  20. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png
  21. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png
  22. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes

+ 5 - 4
FGUIProject/assets/CommonGame/GoodsItemTips.xml

@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,1137">
+<component size="962,1137" opaque="false">
   <displayList>
     <component id="n21_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" xy="0,0" size="962,1137">
-      <relation target="n17_ohbx" sidePair="height-height"/>
+      <relation target="n17_ohbx" sidePair="height-height,middle-middle"/>
     </component>
     <component id="n2_s2cc" name="comTipsBase" src="ohbxti3" fileName="components/ComTipsBase.xml" xy="0,15" group="n17_ohbx"/>
     <component id="n19_ohbx" name="comTipsApproach" src="ohbxti6" fileName="components/ComTipsApproach.xml" xy="0,505" size="962,596" group="n17_ohbx"/>
-    <group id="n17_ohbx" name="grpTips" xy="0,15" size="962,1086" advanced="true" layout="vt" excludeInvisibles="true"/>
+    <group id="n17_ohbx" name="grpTips" xy="0,15" size="962,1086" advanced="true" layout="vt" excludeInvisibles="true">
+      <relation target="" sidePair="middle-middle"/>
+    </group>
   </displayList>
-  <relation target="n17_ohbx" sidePair="height-height"/>
 </component>

+ 0 - 1
FGUIProject/assets/CommonGame/components/ComItem.xml

@@ -7,7 +7,6 @@
     <text id="n17_j48o" name="txtHasCount" xy="112,243" pivot="0.5,0" anchor="true" size="105,36" group="n21_qr4e" visible="false" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
     <loader id="n18_j48o" name="loaRarity" xy="164,0" size="44,94" group="n21_qr4e" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
     <text id="n15_ehs9" name="txtCount" xy="204,178" pivot="1,0" anchor="true" size="50,36" group="n21_qr4e" fontSize="26" color="#fbf6eb" vars="true" strokeColor="#8c7358" strokeSize="2" text="x{count=20}"/>
-    <image id="n16_j8b3" name="imgGot" src="j48o9b" fileName="images/yx_yilq.png" xy="21,91" group="n29_pu55"/>
     <image id="n23_slyz" name="imgHas" src="slyzthy" fileName="images/yx_yihd.png" xy="21,91" group="n29_pu55"/>
     <image id="n22_cs8j" name="imgNotHas" src="cs8jthx" fileName="images/yx_whd.png" xy="21,91" group="n29_pu55"/>
     <image id="n28_pu55" name="imgShowTong" src="tc539z" fileName="images/zx_jqgka_stjl.png" xy="30,91" group="n29_pu55"/>

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

@@ -110,6 +110,7 @@ namespace GFGGame
             await SuitFosterProxy.SendGetSuitInfos();
             await ActivitySProxy.ReqDailyLoginInfos();
             await RechargeSProxy.ReqRequestGiftBagInfo();
+            await StudioSProxy.ReqStudioInfos();
 
             GameGlobal.lastLoginTime = StorageDataManager.Instance.GetStorageValue(ConstStorageId.LAST_LOGIN_TIME);
             long lastTime = GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);
@@ -231,7 +232,6 @@ namespace GFGGame
             RechargeSProxy.ReqRechargeInfo().Coroutine();
             RechargeSProxy.ReqExchangeInfo().Coroutine();
             DailyTaskSProxy.ReqDailyTaskInfos().Coroutine();
-            StudioSProxy.ReqStudioInfos().Coroutine();
             NoticeSProxy.ReqSystemNoticeList().Coroutine();
             MailSProxy.ReqMailCount().Coroutine();
             FriendSProxy.ReqAllFriendInfos().Coroutine();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -276,7 +276,7 @@ namespace GFGGame
             title = "";
             if (type == ConstInstanceZonesType.Studio)
             {
-                StudioData studioData = StudioDataManager.Instance.GetStudioDataById(levelCfg.chapterId, type);
+                StudioData studioData = StudioDataManager.Instance.GetStudioDataById(levelCfg.chapterId);
                 times = Math.Min(times, studioData.TotalPlayTimes - studioData.PlayTimes);
             }
             title = string.Format("挑战{0}次", NumberUtil.GetChiniseNumberText(times));

+ 14 - 0
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -159,5 +159,19 @@ namespace GFGGame
             }
             return false;
         }
+        /// <summary>
+        /// 工作室红点
+        /// </summary>
+        /// <returns></returns>
+        public bool GetStudioFilingRed(bool checkCurChapter = true)
+        {
+            List<StudioCfg> studioCfgs = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioFilingView).Name);
+            for (int i = 0; i < studioCfgs.Count; i++)
+            {
+                if (!checkCurChapter && studioCfgs[i].id == StudioDataManager.Instance.filingChapterId) continue;
+                if (StudioDataManager.Instance.GetFilingRewardState(studioCfgs[i].id)) return true;
+            }
+            return false;
+        }
     }
 }

+ 31 - 7
GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

@@ -42,9 +42,9 @@ namespace GFGGame
             _StudioInfoById[chapterId].TotalPlayTimes = totalPlayTimes;
 
         }
-        public void RspFilingScoreReward(int chapterId, List<int> rewardsStatus)
+        public void RspFilingScoreReward(int chapterId, int index)
         {
-            _StudioInfoById[chapterId].RewardsStatus = rewardsStatus;
+            _StudioInfoById[chapterId].RewardsStatus[index] = ConstBonusStatus.GOT;
 
         }
         public void NoticeStudioPlayTimes(int chapterId, int PlayTimes)
@@ -58,7 +58,7 @@ namespace GFGGame
         }
 
 
-        public StudioData GetStudioDataById(int id, int type = ConstInstanceZonesType.Studio)
+        public StudioData GetStudioDataById(int id)
         {
             if (_StudioInfoById.ContainsKey(id))
             {
@@ -67,10 +67,10 @@ namespace GFGGame
             else
             {
                 int totalPlayTimes = 0;
-                if (type == ConstInstanceZonesType.Studio)
-                {
-                    totalPlayTimes = StudioCfgArray.Instance.GetCfg(id).num;
-                }
+                // if (type == ConstInstanceZonesType.Studio)
+                // {
+                totalPlayTimes = StudioCfgArray.Instance.GetCfg(id).num;
+                // }
                 StudioData studioData = new StudioData() { ChapterId = id, BuyTimes = 0, PlayTimes = 0, TotalPlayTimes = totalPlayTimes };
                 RspStudioInfos(studioData);
                 return studioData;
@@ -146,6 +146,30 @@ namespace GFGGame
             return addition;
         }
 
+        public bool GetFilingRewardState(int chapterId)
+        {
+            StudioData studioData = GetStudioDataById(chapterId);
+            if (studioData.RewardsStatus.Count == 0) return false;
+            for (int i = 0; i < studioData.RewardsStatus.Count; i++)
+            {
+                if (studioData.RewardsStatus[i] == ConstBonusStatus.CAN_GET)
+                {
+                    return true;
+                }
+                else if (studioData.RewardsStatus[i] == ConstBonusStatus.CAN_NOT_GET)
+                {
+                    return false;//奖励按顺序领取,第一个不可领则没有可领奖励
+                }
+            }
+            return false;
+        }
+        public int GetFilingRewardStateByIndex(int chapterId, int index)
+        {
+            StudioData studioData = GetStudioDataById(chapterId);
+            return studioData.RewardsStatus[index];
+
+        }
+
 
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/VO/StudioData.cs

@@ -32,6 +32,6 @@ namespace GFGGame
         /// <summary>
         /// 宝箱奖励状态,索引按照配置列表顺序索引,值由ConstBonusStatus定义(只有查阅建档才有值)
         /// </summary>
-        public List<int> RewardsStatus;
+        public List<int> RewardsStatus = new List<int>();
     }
 }

+ 0 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComItem.cs

@@ -12,7 +12,6 @@ namespace UI.CommonGame
         public GTextField m_txtHasCount;
         public GLoader m_loaRarity;
         public GTextField m_txtCount;
-        public GImage m_imgGot;
         public GImage m_imgHas;
         public GImage m_imgNotHas;
         public GImage m_imgShowTong;
@@ -69,7 +68,6 @@ namespace UI.CommonGame
             m_txtHasCount = (GTextField)comp.GetChild("txtHasCount");
             m_loaRarity = (GLoader)comp.GetChild("loaRarity");
             m_txtCount = (GTextField)comp.GetChild("txtCount");
-            m_imgGot = (GImage)comp.GetChild("imgGot");
             m_imgHas = (GImage)comp.GetChild("imgHas");
             m_imgNotHas = (GImage)comp.GetChild("imgNotHas");
             m_imgShowTong = (GImage)comp.GetChild("imgShowTong");
@@ -82,7 +80,6 @@ namespace UI.CommonGame
             m_txtHasCount = null;
             m_loaRarity = null;
             m_txtCount = null;
-            m_imgGot = null;
             m_imgHas = null;
             m_imgNotHas = null;
             m_imgShowTong = null;

+ 15 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/StudioSProxy.cs

@@ -20,6 +20,7 @@ namespace ET
         {
             StudioDataManager.Instance.NoticeFilingScoreBonusChanged(message.ChapterId, message.ChapterScore, message.BonusStatusList);
             EventAgent.DispatchEvent(ConstMessage.FILING_SCORE_CHANGE);
+            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
 
             await ETTask.CompletedTask;
         }
@@ -41,7 +42,7 @@ namespace GFGGame
                 {
                     for (int i = 0; i < response.infos.Count; i++)
                     {
-                        StudioData studioData = new StudioData { ChapterId = response.infos[i].ChapterId, BuyTimes = response.infos[i].BuyTimes, PlayTimes = response.infos[i].PlayTimes, TotalPlayTimes = response.infos[i].TotalPlayTimes, ChapterScore = response.infos[i].ChapterScore, };
+                        StudioData studioData = new StudioData { ChapterId = response.infos[i].ChapterId, BuyTimes = response.infos[i].BuyTimes, PlayTimes = response.infos[i].PlayTimes, TotalPlayTimes = response.infos[i].TotalPlayTimes, ChapterScore = response.infos[i].ChapterScore, RewardsStatus = response.infos[i].BonusStatusList };
                         StudioDataManager.Instance.RspStudioInfos(studioData);
                     }
                     // EventAgent.DispatchEvent(ConstMessage.GET_STUDIO_INFO);
@@ -73,8 +74,20 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    StudioDataManager.Instance.RspFilingScoreReward(response.ChapterId, response.BonusIndexList);
+                    List<ItemData> itemDatas = new List<ItemData>();
+                    for (int i = 0; i < response.BonusIndexList.Count; i++)
+                    {
+                        StudioDataManager.Instance.RspFilingScoreReward(response.ChapterId, response.BonusIndexList[i]);
+                        List<FilingRewardCfg> filingRewards = FilingRewardCfgArray.Instance.GetCfgsByid(response.ChapterId);
+                        int[][] rewards = filingRewards[response.BonusIndexList[i]].itemsArr;
+                        for (int j = 0; j < rewards.Length; j++)
+                        {
+                            itemDatas.Add(ItemUtil.createItemData(rewards[j]));
+                        }
+                    }
+                    BonusController.TryShowBonusList(itemDatas);
                     EventAgent.DispatchEvent(ConstMessage.FILING_SCORE_CHANGE);
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
 
                 }
             }

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GoodsItemTipsView.cs

@@ -49,6 +49,8 @@ namespace GFGGame
             UpdateBase();
             UpdateScore();
             UpdateSourec(sourceDatas);
+            // this.viewCom.height = _ui.m_grpTips.height;
+            // this.viewCom.Center();
             Timers.inst.AddUpdate(CheckGuide);
         }
         protected override void OnHide()

+ 9 - 6
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ItemView.cs

@@ -9,7 +9,8 @@ namespace GFGGame
         private GTextField _txtName;
         private GTextField _txtCount;
         private GTextField _txtHasCount;
-        private GImage _imgGot;
+        // private GImage _imgGot;
+        private GGroup _grpGot;
         private GImage _imgNotHas;
         private GImage _imgHas;
         private GImage _imgShouTong;
@@ -27,7 +28,8 @@ namespace GFGGame
             _txtName = obj.GetChild("txtName") as GTextField;
             _txtCount = obj.GetChild("txtCount") as GTextField;
             _txtHasCount = obj.GetChild("txtHasCount") as GTextField;
-            _imgGot = obj.GetChild("imgGot") as GImage;
+            // _imgGot = obj.GetChild("imgGot") as GImage;
+            _grpGot = obj.GetChild("grpGot") as GGroup;
             _imgNotHas = obj.GetChild("imgNotHas") as GImage;
             _imgHas = obj.GetChild("imgHas") as GImage;
             _imgShouTong = obj.GetChild("imgShowTong") as GImage;
@@ -57,7 +59,8 @@ namespace GFGGame
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemData.id);
             _loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             RarityIconController.UpdateRarityIcon(_loaRarity, _itemData.id, false);
-            _imgGot.visible = false;
+            // _imgGot.visible = false;
+            _grpGot.visible = false;
             _imgNotHas.visible = false;
             _imgHas.visible = false;
             _imgShouTong.visible = false;
@@ -81,15 +84,15 @@ namespace GFGGame
         /// “已领取”显示状态
         /// </summary>
         /// <value></value>
-        public bool ImgGotVisible
+        public bool GrpGotVisible
         {
             get
             {
-                return _imgGot.visible;
+                return _grpGot.visible;
             }
             set
             {
-                _imgGot.visible = value;
+                _grpGot.visible = value;
             }
         }
         /// “已获得”显示状态

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Mail/MailContentView.cs

@@ -74,7 +74,7 @@ namespace GFGGame
                 obj.data = new ItemView(obj as GComponent);
             }
             (obj.data as ItemView).SetData(reward);
-            (obj.data as ItemView).ImgGotVisible = (ConstMailStatus)mailInfo.state == ConstMailStatus.ReadedAndGot ? true : false;
+            (obj.data as ItemView).GrpGotVisible = (ConstMailStatus)mailInfo.state == ConstMailStatus.ReadedAndGot ? true : false;
         }
 
         private async void OnClickBtnGet()

+ 11 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs

@@ -38,8 +38,18 @@ namespace GFGGame
                     Debug.LogError(string.Format("剧情id:{0}  无配置", levelCfg.storyStartID));
                     return;
                 }
+                object[] gobackparams;
+                if (levelCfg.type == ConstInstanceZonesType.Studio && levelCfg.subType == ConstInstanceZonesSubType.Hard3)
+                {
+                    gobackparams = new object[] { typeof(StudioFilingView).FullName };
+                }
+                else
+                {
+                    gobackparams = new object[] { typeof(StoryChapterView).FullName, MainStoryDataManager.currentChapterCfgId };
+                }
+                //, new object[] { typeof(StoryChapterView).FullName, MainStoryDataManager.currentChapterCfgId }
                 bool skipable = MainStoryDataManager.CheckCurrentLevelPass();
-                ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { levelCfg.storyStartID, skipable, new OnCompleteStoryDialogCall(OnCompleteChapterStoryDialog) }, new object[] { typeof(StoryChapterView).FullName, MainStoryDataManager.currentChapterCfgId }, true);
+                ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { levelCfg.storyStartID, skipable, new OnCompleteStoryDialogCall(OnCompleteChapterStoryDialog) }, gobackparams, true);
             }
         }
 

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryController.cs

@@ -85,7 +85,8 @@ namespace GFGGame
         {
             InstanceZonesController.OnCompleteChapterStoryDialog(isSkip, param);
 
-            ViewManager.Show<StudioFilingView>(MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName), true);
+            ViewManager.Show<StudioFilingView>(MainStoryDataManager.currentChapterCfgId, null, true);
+            //, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName)
         }
     }
 }

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

@@ -443,6 +443,7 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_btnHaoYou, RedDotDataManager.Instance.GetFriendRed());
             RedDotController.Instance.SetComRedDot(_btnStore, RedDotDataManager.Instance.GetRechargeGiftFreeRed());
             RedDotController.Instance.SetComRedDot(_btnField, RedDotDataManager.Instance.GetFieldRed());
+            RedDotController.Instance.SetComRedDot(_btnStudio, RedDotDataManager.Instance.GetStudioFilingRed());
         }
 
         private void CheckGuide(object param)

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingNpcView.cs

@@ -83,6 +83,8 @@ namespace GFGGame
             {
                 item.target.AddChild(_comSelect);
             }
+            RedDotController.Instance.SetComRedDot(item.target, StudioDataManager.Instance.GetFilingRewardState(cfg.id), "", -38, 116);
+
             UI_ListNpcItem.ProxyEnd();
         }
         private void OnListItemClick(EventContext context)

+ 22 - 4
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingRewardView.cs

@@ -32,19 +32,26 @@ namespace GFGGame
             viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
 
             _ui.m_list.itemRenderer = RenderListItem;
+            _ui.m_btnGet.onClick.Add(OnBtnGetClcik);
         }
         protected override void AddEventListener()
         {
             base.AddEventListener();
+            EventAgent.AddEventListener(ConstMessage.FILING_SCORE_CHANGE, UpdateView);
 
         }
         protected override void OnShown()
         {
             base.OnShown();
             _ui.m_txtScore.text = string.Format("本章评分:{0}", StudioDataManager.Instance.GetStudioDataById(StudioDataManager.Instance.filingChapterId).ChapterScore);
-            _ui.m_list.numItems = FilingRewardCfgArray.Instance.GetCfgsByid(StudioDataManager.Instance.filingChapterId).Count;
+            UpdateView();
         }
 
+        private void UpdateView()
+        {
+            _ui.m_list.numItems = FilingRewardCfgArray.Instance.GetCfgsByid(StudioDataManager.Instance.filingChapterId).Count;
+            _ui.m_btnGet.grayed = !StudioDataManager.Instance.GetFilingRewardState(StudioDataManager.Instance.filingChapterId);
+        }
         protected override void OnHide()
         {
             base.OnHide();
@@ -54,14 +61,14 @@ namespace GFGGame
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-
+            EventAgent.RemoveEventListener(ConstMessage.FILING_SCORE_CHANGE, UpdateView);
         }
         private void RenderListItem(int index, GObject obj)
         {
             FilingRewardCfg cfg = FilingRewardCfgArray.Instance.GetCfgsByid(StudioDataManager.Instance.filingChapterId)[index];
             UI_ListRewardItem item = UI_ListRewardItem.Proxy(obj);
             item.m_txtDesc.text = string.Format("总评分达到{0}", cfg.score);
-            item.m_listReward.data = cfg.itemsArr;
+            item.m_listReward.data = index;
             item.m_listReward.itemRenderer = RenderListRewardItem;
             item.m_listReward.numItems = cfg.itemsArr.Length;
             item.m_listReward.SetScale(0.6f, 0.6f);
@@ -70,7 +77,8 @@ namespace GFGGame
         }
         private void RenderListRewardItem(int index, GObject obj)
         {
-            int[][] rewards = (int[][])obj.parent.data;
+            int rewardIndex = (int)obj.parent.data;
+            int[][] rewards = FilingRewardCfgArray.Instance.GetCfgsByid(StudioDataManager.Instance.filingChapterId)[rewardIndex].itemsArr;
             UI_ComItem item = UI_ComItem.Proxy(obj);
             ItemData reward = ItemUtil.createItemData(rewards[index]);//_rewardDatas[index];
             if (obj.data == null)
@@ -78,9 +86,19 @@ namespace GFGGame
                 obj.data = new ItemView(obj as GComponent);
             }
             (obj.data as ItemView).SetData(reward);
+            (obj.data as ItemView).GrpGotVisible = StudioDataManager.Instance.GetFilingRewardStateByIndex(StudioDataManager.Instance.filingChapterId, rewardIndex) == ConstBonusStatus.GOT ? true : false;
 
             UI_ComItem.ClearProxy();
         }
 
+        private void OnBtnGetClcik()
+        {
+            if (!StudioDataManager.Instance.GetFilingRewardState(StudioDataManager.Instance.filingChapterId))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("当前无奖励可领取");
+                return;
+            }
+            StudioSProxy.ReqFilingScoreRewards(StudioDataManager.Instance.filingChapterId).Coroutine();
+        }
     }
 }

+ 20 - 8
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingView.cs

@@ -47,6 +47,8 @@ namespace GFGGame
             base.AddEventListener();
             EventAgent.AddEventListener(ConstMessage.STORY_LEVEL_CHANGE, UpdateView);
             EventAgent.AddEventListener(ConstMessage.FILLING_CHANGE_CHAPTER, UpdateView);
+            EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
+
         }
         protected override void OnShown()
         {
@@ -65,15 +67,18 @@ namespace GFGGame
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.STORY_LEVEL_CHANGE, UpdateView);
             EventAgent.RemoveEventListener(ConstMessage.FILLING_CHANGE_CHAPTER, UpdateView);
+            EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
 
         }
 
         private void UpdateView()
         {
+            StudioData studioData = StudioDataManager.Instance.GetStudioDataById(StudioDataManager.Instance.filingChapterId);
 
             _filingCfg = StudioCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
             _ui.m_txtTitle.SetVar("name", _filingCfg.name).FlushVars();
             _ui.m_loaNpc.url = ResPathUtil.GetNpcPicFPath(_filingCfg.res);
+            _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", studioData.TotalPlayTimes - studioData.PlayTimes, _filingCfg.num);
 
             SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_filingCfg.suitId);
             _ui.m_txtSuitName.text = suitCfg.name;
@@ -83,6 +88,8 @@ namespace GFGGame
 
             _storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_filingCfg.type, _filingCfg.subType, StudioDataManager.Instance.filingChapterId);
             _ui.m_list.numItems = _storyLevelCfgs.Count;
+
+            UpdateRedDot();
         }
 
         private void RenderListItem(int index, GObject obj)
@@ -108,14 +115,14 @@ namespace GFGGame
             }
 
             MainStoryDataManager.currentLevelCfgId = storyLevelCfg.id;
-            if (!string.IsNullOrEmpty(storyLevelCfg.storyStartID))
-            {
-                StoryController.ShowFilingStoryDialog(storyLevelCfg);
-            }
-            else
-            {
-                InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishFilingStoryLevel);
-            }
+            // if (!string.IsNullOrEmpty(storyLevelCfg.storyStartID))
+            // {
+            //     StoryController.ShowFilingStoryDialog(storyLevelCfg);
+            // }
+            // else
+            // {
+            InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishFilingStoryLevel);
+            // }
         }
         private void OnBtnChangeClick()
         {
@@ -140,5 +147,10 @@ namespace GFGGame
             }
             ViewManager.Show<ClothingSyntheticView>(new object[] { _filingCfg.suitId }, new object[] { typeof(StudioFilingView).FullName, this.viewData }, true);
         }
+        private void UpdateRedDot()
+        {
+            RedDotController.Instance.SetComRedDot(_ui.m_btnReward, StudioDataManager.Instance.GetFilingRewardState(StudioDataManager.Instance.filingChapterId));
+            RedDotController.Instance.SetComRedDot(_ui.m_btnChange, RedDotDataManager.Instance.GetStudioFilingRed(false));
+        }
     }
 }

+ 15 - 2
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs

@@ -36,7 +36,11 @@ namespace GFGGame
             _ui.m_comProperty.target.onClick.Add(OnComProperty);
             _ui.m_comFiling.target.onClick.Add(OnClickComFilling);
         }
-
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+            EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
+        }
         protected override void OnShown()
         {
             base.OnShown();//1;//
@@ -50,7 +54,7 @@ namespace GFGGame
             isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFilingView).FullName, false) ? 1 : 0;
             _ui.m_comFiling.m_c1.selectedIndex = isopen;
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("ejzjm_bj");
-
+            UpdateRedDot();
             Timers.inst.AddUpdate(CheckGuide);
         }
 
@@ -60,7 +64,12 @@ namespace GFGGame
             TryCompleteGuide();
             Timers.inst.Remove(CheckGuide);
         }
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+            EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
 
+        }
         private void OnClickBtnBack()
         {
             ViewManager.GoBackFrom(typeof(StudioView).FullName);
@@ -97,6 +106,10 @@ namespace GFGGame
 
             ViewManager.Show<StudioFilingView>(null, new object[] { typeof(StudioView).FullName, this.viewData });
         }
+        private void UpdateRedDot()
+        {
+            RedDotController.Instance.SetComRedDot(_ui.m_comFiling.target, RedDotDataManager.Instance.GetStudioFilingRed(), "", 10, 24);
+        }
         private void CheckGuide(object param)
         {
             if (GuideDataManager.IsGuideFinish(ConstGuideId.STUDIO_OPEN) <= 0)

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes