Эх сурвалжийг харах

提交新活动逻辑;
修复精英关卡背景显示不全的问题

leiyasi 1 жил өмнө
parent
commit
17dc701671
41 өөрчлөгдсөн 601 нэмэгдсэн , 17 устгасан
  1. 22 0
      GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs
  2. 6 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityThemeLuckyBox/UI_ActivityThemeLuckyBoxUI.cs
  3. 6 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs
  4. 93 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ActivityStoryChapterUI.cs
  5. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ActivityStoryChapterUI.cs.meta
  6. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_CompStoryLevelItem.cs
  7. 4 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_MainUI.cs
  8. 1 2
      GameClient/Assets/Game/HotUpdate/Views/ActivityMainTips/ActivityZCJBChapterView.cs
  9. 35 3
      GameClient/Assets/Game/HotUpdate/Views/ActivityThemeLuckyBox/ActivityThemeLuckyBoxView.cs
  10. 10 9
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs
  11. 386 0
      GameClient/Assets/Game/HotUpdate/Views/MainStory/ActivityStoryChapterView.cs
  12. 11 0
      GameClient/Assets/Game/HotUpdate/Views/MainStory/ActivityStoryChapterView.cs.meta
  13. 13 0
      GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs
  14. BIN
      GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_atlas0!a.png
  15. BIN
      GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_atlas0.png
  16. BIN
      GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_fui.bytes
  17. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png
  18. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png
  19. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1.png
  20. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes
  21. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0!a.png
  22. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0.png
  23. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_1!a.png
  24. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_1.png
  25. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_10!a.png
  26. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_10.png
  27. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_3!a.png
  28. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_3.png
  29. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_4!a.png
  30. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_4.png
  31. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_5!a.png
  32. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_5.png
  33. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_6!a.png
  34. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_6.png
  35. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_7!a.png
  36. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_7.png
  37. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_8!a.png
  38. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_8.png
  39. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_9!a.png
  40. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_9.png
  41. BIN
      GameClient/Assets/ResIn/UI/Main/Main_fui.bytes

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

@@ -1117,5 +1117,27 @@ namespace GFGGame
             }
             return false;
         }
+
+        public bool CheckActivityLuckyBoxCanChallenge(int limit, int activityID)
+        {
+            int chapterID = ActivityOpenCfgArray.Instance.GetCfg(activityID).params3Arr[0];
+            ActivityFightCfg chapterCfg = ActivityFightCfgArray.Instance.GetCfg(chapterID);
+
+            var list = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
+            RoleLimitData limitData = RoleLimitDataManager.GetLimitData(limit);
+            int times = limitData.TotalPlayMax - limitData.PlayTimes;
+
+            bool canChallenge = ((times > 0) && (!InstanceZonesDataManager.CheckLevelPass(list[list.Count - 1].id)));
+            return canChallenge;
+        }
+
+        public bool GetActivityLuckyBoxRed(int activityID)
+        {
+            int chapterID = ActivityOpenCfgArray.Instance.GetCfg(activityID).params3Arr[0];
+
+            return GetMeiRiTeHuiRed()
+                || GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox)
+                || GetActLuckyBoxTaskdRed() || CheckActivityLuckyBoxCanChallenge(300, chapterID) || GetGiftBagRewardRed();
+        }
     }
 }

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityThemeLuckyBox/UI_ActivityThemeLuckyBoxUI.cs

@@ -14,11 +14,13 @@ namespace UI.ActivityThemeLuckyBox
         public UI_Button1 m_btnTask;
         public UI_Button1 m_btnShop;
         public GTextField m_timeDesc;
+        public GTextField m_txtTime_3;
         public GTextField m_txtTime;
         public GButton m_btnLuckyBox_old;
         public UI_Button1 m_btnLuckyBox;
         public GGraph m_bgEffectHolder;
         public Transition m_In_2;
+        public Transition m_in_3;
         public const string URL = "ui://ubfk2kobmbf1k";
         public const string PACKAGE_NAME = "ActivityThemeLuckyBox";
         public const string RES_NAME = "ActivityThemeLuckyBoxUI";
@@ -73,11 +75,13 @@ namespace UI.ActivityThemeLuckyBox
             m_btnTask = (UI_Button1)UI_Button1.Create(comp.GetChild("btnTask"));
             m_btnShop = (UI_Button1)UI_Button1.Create(comp.GetChild("btnShop"));
             m_timeDesc = (GTextField)comp.GetChild("timeDesc");
+            m_txtTime_3 = (GTextField)comp.GetChild("txtTime_3");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_btnLuckyBox_old = (GButton)comp.GetChild("btnLuckyBox_old");
             m_btnLuckyBox = (UI_Button1)UI_Button1.Create(comp.GetChild("btnLuckyBox"));
             m_bgEffectHolder = (GGraph)comp.GetChild("bgEffectHolder");
             m_In_2 = comp.GetTransition("In_2");
+            m_in_3 = comp.GetTransition("in_3");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -91,12 +95,14 @@ namespace UI.ActivityThemeLuckyBox
             m_btnShop.Dispose();
             m_btnShop = null;
             m_timeDesc = null;
+            m_txtTime_3 = null;
             m_txtTime = null;
             m_btnLuckyBox_old = null;
             m_btnLuckyBox.Dispose();
             m_btnLuckyBox = null;
             m_bgEffectHolder = null;
             m_In_2 = null;
+            m_in_3 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 6 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs

@@ -10,9 +10,9 @@ namespace UI.LuckyBox
         public Controller m_c1;
         public UI_ComModel m_comModel;
         public GLoader m_btnOpenServer;
+        public GTextField m_txtOpenServerOwned;
         public UI_Button3 m_btnPreview;
         public GTextField m_txtOwned;
-        public GTextField m_txtOpenServerOwned;
         public GLoader m_imgActLuckyBox;
         public UI_ComCost2 m_comCostOne;
         public UI_ComCost2 m_comCostTen;
@@ -25,6 +25,7 @@ namespace UI.LuckyBox
         public GGroup m_grpSpecial;
         public GTextField m_txtCount;
         public GTextField m_txtOpenServerCount;
+        public GTextField m_txtSYJHCount;
         public const string URL = "ui://drx9d1usnjmn2p";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComBox";
@@ -75,9 +76,9 @@ namespace UI.LuckyBox
             m_c1 = comp.GetController("c1");
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
             m_btnOpenServer = (GLoader)comp.GetChild("btnOpenServer");
+            m_txtOpenServerOwned = (GTextField)comp.GetChild("txtOpenServerOwned");
             m_btnPreview = (UI_Button3)UI_Button3.Create(comp.GetChild("btnPreview"));
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
-            m_txtOpenServerOwned = (GTextField)comp.GetChild("txtOpenServerOwned");
             m_imgActLuckyBox = (GLoader)comp.GetChild("imgActLuckyBox");
             m_comCostOne = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostOne"));
             m_comCostTen = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostTen"));
@@ -90,6 +91,7 @@ namespace UI.LuckyBox
             m_grpSpecial = (GGroup)comp.GetChild("grpSpecial");
             m_txtCount = (GTextField)comp.GetChild("txtCount");
             m_txtOpenServerCount = (GTextField)comp.GetChild("txtOpenServerCount");
+            m_txtSYJHCount = (GTextField)comp.GetChild("txtSYJHCount");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -97,10 +99,10 @@ namespace UI.LuckyBox
             m_comModel.Dispose();
             m_comModel = null;
             m_btnOpenServer = null;
+            m_txtOpenServerOwned = null;
             m_btnPreview.Dispose();
             m_btnPreview = null;
             m_txtOwned = null;
-            m_txtOpenServerOwned = null;
             m_imgActLuckyBox = null;
             m_comCostOne.Dispose();
             m_comCostOne = null;
@@ -115,6 +117,7 @@ namespace UI.LuckyBox
             m_grpSpecial = null;
             m_txtCount = null;
             m_txtOpenServerCount = null;
+            m_txtSYJHCount = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 93 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ActivityStoryChapterUI.cs

@@ -0,0 +1,93 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Main
+{
+    public partial class UI_ActivityStoryChapterUI
+    {
+        public GComponent target;
+        public Controller m_activityID;
+        public GLoader m_loaBg;
+        public GGraph m_bgEffect;
+        public UI_CompChapter m_chapter;
+        public GComponent m_valueBar;
+        public GButton m_btnBack;
+        public GTextField m_txtTime;
+        public Transition m_t0;
+        public const string URL = "ui://mfvz4q8kpllz9fys";
+        public const string PACKAGE_NAME = "Main";
+        public const string RES_NAME = "ActivityStoryChapterUI";
+        private static UI_ActivityStoryChapterUI _proxy;
+
+        public static UI_ActivityStoryChapterUI Create(GObject gObject = null)
+        {
+            var ui = new UI_ActivityStoryChapterUI();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ActivityStoryChapterUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ActivityStoryChapterUI();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_activityID = comp.GetController("activityID");
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_bgEffect = (GGraph)comp.GetChild("bgEffect");
+            m_chapter = (UI_CompChapter)UI_CompChapter.Create(comp.GetChild("chapter"));
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
+            m_btnBack = (GButton)comp.GetChild("btnBack");
+            m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_t0 = comp.GetTransition("t0");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_activityID = null;
+            m_loaBg = null;
+            m_bgEffect = null;
+            m_chapter.Dispose();
+            m_chapter = null;
+            m_valueBar = null;
+            m_btnBack = null;
+            m_txtTime = null;
+            m_t0 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ActivityStoryChapterUI.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a51242332c15ee8458320d9c073567c1
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_CompStoryLevelItem.cs

@@ -9,6 +9,7 @@ namespace UI.Main
         public GComponent target;
         public Controller m_c1;
         public Controller m_c2;
+        public Controller m_activityID;
         public UI_ComDialogBg m_comDialogBg;
         public GLoader m_loaDialogBg;
         public GTextField m_txtDialogOrder;
@@ -70,6 +71,7 @@ namespace UI.Main
         {
             m_c1 = comp.GetController("c1");
             m_c2 = comp.GetController("c2");
+            m_activityID = comp.GetController("activityID");
             m_comDialogBg = (UI_ComDialogBg)UI_ComDialogBg.Create(comp.GetChild("comDialogBg"));
             m_loaDialogBg = (GLoader)comp.GetChild("loaDialogBg");
             m_txtDialogOrder = (GTextField)comp.GetChild("txtDialogOrder");
@@ -87,6 +89,7 @@ namespace UI.Main
         {
             m_c1 = null;
             m_c2 = null;
+            m_activityID = null;
             m_comDialogBg.Dispose();
             m_comDialogBg = null;
             m_loaDialogBg = null;

+ 4 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_MainUI.cs

@@ -26,6 +26,7 @@ namespace UI.Main
         public UI_BtnModle2 m_btnActivityZCJB;
         public UI_BtnModle2 m_btnGetYuanXiao;
         public UI_BtnModle2 m_btnActivityFYJY;
+        public UI_BtnModle2 m_btnActivitySYJH;
         public GTextField m_serverTime;
         public GLoader m_loaGuidestudio;
         public UI_ComAd m_comListAd;
@@ -113,6 +114,7 @@ namespace UI.Main
             m_btnActivityZCJB = (UI_BtnModle2)UI_BtnModle2.Create(comp.GetChild("btnActivityZCJB"));
             m_btnGetYuanXiao = (UI_BtnModle2)UI_BtnModle2.Create(comp.GetChild("btnGetYuanXiao"));
             m_btnActivityFYJY = (UI_BtnModle2)UI_BtnModle2.Create(comp.GetChild("btnActivityFYJY"));
+            m_btnActivitySYJH = (UI_BtnModle2)UI_BtnModle2.Create(comp.GetChild("btnActivitySYJH"));
             m_serverTime = (GTextField)comp.GetChild("serverTime");
             m_loaGuidestudio = (GLoader)comp.GetChild("loaGuidestudio");
             m_comListAd = (UI_ComAd)UI_ComAd.Create(comp.GetChild("comListAd"));
@@ -166,6 +168,8 @@ namespace UI.Main
             m_btnGetYuanXiao = null;
             m_btnActivityFYJY.Dispose();
             m_btnActivityFYJY = null;
+            m_btnActivitySYJH.Dispose();
+            m_btnActivitySYJH = null;
             m_serverTime = null;
             m_loaGuidestudio = null;
             m_comListAd.Dispose();

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/ActivityMainTips/ActivityZCJBChapterView.cs

@@ -212,7 +212,7 @@ namespace GFGGame
             for (int i = 0; i < 20; i++)
             {
                 GObject obj = _ui.m_chapter.m_compChapterScroll.target.GetChild("g" + (19 - i + 1));
-                obj.SetPosition(obj.x, starPosY - lineGap * i - 300, 0); ;
+                obj.SetPosition(obj.x, starPosY - lineGap * i - 300, 0);
                 StoryLevelCfg levelCfg = i < list.Count ? list[i] : null;
                 UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(obj);
                 levelItem.m_fightBg.visible = true;
@@ -368,7 +368,6 @@ namespace GFGGame
 
         private void OnClickLevelItem(EventContext context)
         {
-
             UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(context.sender as GObject);
             int levelCfgId = (int)levelItem.target.data;
             UI_CompStoryLevelItem.ProxyEnd();

+ 35 - 3
GameClient/Assets/Game/HotUpdate/Views/ActivityThemeLuckyBox/ActivityThemeLuckyBoxView.cs

@@ -111,7 +111,19 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt("活动已结束");
                 return;
             }
-            ViewManager.Show<StudioActivityView>();
+
+            int type = _activityCfg.type;
+            if(type == 1)
+            {
+                // 剧情+战斗混合
+                ViewManager.Show<StudioActivityView>();
+            }
+            else
+            {
+                // 纯战斗
+                ViewManager.Show<ActivityStoryChapterView>(_activityId);
+            }
+            
         }
         private void OnBtnLuckyBoxClick()
         {
@@ -148,7 +160,15 @@ namespace GFGGame
                 return;
             }
             TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
-            _ui.m_txtTime.text = TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
+            string timeStr = TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
+            _ui.m_txtTime.text = timeStr;
+
+            // 检测是否有活动专属时间字体
+            GObject activityTimeText = _ui.target.GetChild("txtTime_" + _activityId);
+            if (activityTimeText != null)
+            {
+                ((GTextField)activityTimeText).text = timeStr;
+            }
         }
         private void UpdateRedDot()
         {
@@ -156,7 +176,19 @@ namespace GFGGame
                 , RedDotDataManager.Instance.GetMeiRiTeHuiRed() || RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox) 
                 || RedDotDataManager.Instance.GetGiftBagRewardRed(), "", -36, 39);
             RedDotController.Instance.SetComRedDot(_ui.m_btnTask.target, RedDotDataManager.Instance.GetActLuckyBoxTaskdRed());
-            RedDotController.Instance.SetComRedDot(_ui.m_btnChapter.target, RedDotDataManager.Instance.GetActLuckyBoxStudioFilingRed());
+
+            int type = _activityCfg.type;
+
+            // 剧情战斗混合
+            if(type == 1)
+            {
+                RedDotController.Instance.SetComRedDot(_ui.m_btnChapter.target, RedDotDataManager.Instance.GetActLuckyBoxStudioFilingRed());
+            }
+            else
+            {
+                RedDotController.Instance.SetComRedDot(_ui.m_btnChapter.target, RedDotDataManager.Instance.CheckActivityLuckyBoxCanChallenge(300, _activityId));
+            }
+            
         }
 
         private void UpdateEffect()

+ 10 - 9
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -96,17 +96,11 @@ namespace GFGGame
             UpLuckyDiscount();
             Timers.inst.Add(1, 0, UpdateTime);
             UpdateListItemData();
+            ChangeUIByActivity();
             UpdateRedDot();
-            _ui.m_comBox.m_c1.SetSelectedPage(_activityId.ToString());
-            if(_activityType == ConstLimitTimeActivityType.ActLimitStlyc)
-                _ui.m_comBox.m_c1.selectedIndex = 2;
-            else
-                _ui.m_comBox.m_c1.selectedIndex = 1;
-
-            int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(_activityType);
-            ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(activityId);
+            ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(_activityId);
             if(activityOpenCfg.params2Arr.Length > 0)
-                GetWishingPoolInfo(activityId);
+                GetWishingPoolInfo(_activityId);
         }
 
         private void UpdateTime(object param = null)
@@ -398,5 +392,12 @@ namespace GFGGame
                     ViewManager.Show<LuckyBoxWishView>(_activityType);
             }
         }
+
+        /// 修改活动的专属UI
+        /// </summary>
+        private void ChangeUIByActivity()
+        {
+            _ui.m_comBox.m_c1.SetSelectedPage(_activityId.ToString());
+        }
     }
 }

+ 386 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/ActivityStoryChapterView.cs

@@ -0,0 +1,386 @@
+using FairyGUI;
+using UI.CommonGame;
+using UI.Main;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Collections;
+using ET;
+
+namespace GFGGame
+{
+    public class ActivityStoryChapterView : BaseWindow
+    {
+        private UI_ActivityStoryChapterUI _ui;
+        private int _chapterID;
+        private int _activityID;
+        private ActivityOpenCfg _activityCfg;
+
+        private GComponent _compChapter;
+        private ValueBarController _valueBarController;
+        private GObject _unPasslevelItem;
+        private GObject _endLevelItem;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
+        private GComponent _comEff;
+        private GComponent _effFirst;
+
+        //当前章节索引
+        private int newIndex;
+        //y轴移动索引
+        private float indexY;
+        private GameObject gamey;
+        //特效类型数组,这里后面可以二维数组,放向左和向右的
+        private string[] effArray = new string[2] { "ZJ_JuQing", "ZJ_ZD" };
+
+        private int currentDifficulty;
+
+        public override void Dispose()
+        {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null;
+            if (_comEff != null)
+            {
+                _comEff.RemoveFromParent();
+                _comEff.Dispose();
+            }
+            if (_effFirst != null)
+            {
+                _effFirst.RemoveFromParent();
+                _effFirst.Dispose();
+            }
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+            base.Dispose();
+        }
+
+        protected override void Init()
+        {
+            base.Init();
+            _ui = UI_ActivityStoryChapterUI.Create();
+            viewCom = _ui.target;
+            isfullScreen = true;
+            isReturnView = true;
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
+            _ui.m_btnBack.onClick.Add(OnClickBtnBack);
+            _ui.m_chapter.m_compChapterScroll.m_imgBegin.onClick.Add(OnClickNext);
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zxian_bg3");
+
+            _effFirst = new GComponent();
+            _effFirst = UIPackage.CreateObject(UI_MainUI.PACKAGE_NAME, "ComEff").asCom;
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_bgEffect, "ui_zj", "ZX_BG_TX");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_chapter.m_compChapterScroll.m_nextEffect, "ui_zj", "ZX_Next_Boat");
+
+        }
+
+        protected override void OnShown()
+        {
+            base.OnShown();
+
+            GRoot.inst.touchable = false;
+            SuitFosterProxy.SendGetSuitInfos().Coroutine();
+            MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
+            
+            _activityID = (int)viewData;
+            _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(_activityID);
+            _chapterID = _activityCfg.params3Arr[0];
+
+            _ui.m_activityID.selectedPage = _activityID.ToString();
+            _valueBarController.OnShown();
+            _ui.m_t0.SetHook("canHit", () => { GRoot.inst.touchable = true; });
+            _ui.m_t0.Play();
+            UpdateView();
+            UpdateTime();
+            Timers.inst.Add(1, 0, UpdateTime);
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+            _unPasslevelItem = null;
+            _endLevelItem = null;
+            // _ui.m_chapter.RemoveChildren(0, 0, true);
+            GRoot.inst.touchable = true;
+            _valueBarController.OnHide();
+            Timers.inst.Remove(SetContainerY);
+            Timers.inst.Remove(UpdateTime);
+        }
+
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+        }
+        private void OnClickBtnBack()
+        {
+            ViewManager.GoBackFrom(typeof(StoryChapterView).FullName);
+            //GameController.GoBackToMainView();
+        }
+
+        private void UpdateView()
+        {
+            //由于这里会切换特效,所以切换界面时进行清空
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            if (_effFirst != null)
+            {
+                _effFirst.RemoveFromParent();
+            }
+
+            StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
+            newIndex = StoryUtil.GetChapterOrder(chapterCfg.id);
+            indexY = 111.0f * Mathf.Max(0, (float)StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id).Count - 5);
+            gamey = GameObject.Find("Stage/GRoot/Window - StoryChapterUI/ContentPane/CompChapter/Container/Container");
+            _ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = false;
+            _ui.m_chapter.m_compChapterScroll.m_nextEffect.visible = false;
+
+            Timers.inst.StartCoroutine(InitChapter());
+
+            //Timers.inst.Add(0.2f, 1, SetContainerY);
+            _ui.m_chapter.m_compChapterScroll.target.y = 1;
+
+            //招财进宝活动
+            if (chapterCfg.subType == 2)
+            {
+                UI_ComponentValueBar valueBar = UI_ComponentValueBar.Proxy(_ui.m_valueBar);
+                valueBar.m_c1.selectedIndex = 12;
+                UI_ComponentValueBar.ProxyEnd();
+                _valueBarController.UpdateList(new List<int>() { ConstItemID.DIAMOND_PURPLE, ConstItemID.DIAMOND_RED });
+                long timeActivity = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(17).EndTime - TimeHelper.ServerNow();
+            }
+            else
+            {
+                UI_ComponentValueBar valueBar = UI_ComponentValueBar.Proxy(_ui.m_valueBar);
+                valueBar.m_c1.selectedIndex = 1;
+                UI_ComponentValueBar.ProxyEnd();
+            }
+        }
+
+        private void OnClickNext()
+        {
+            StoryChapterCfg chapterSuitCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
+            if (MainStoryDataManager.CheckChapterUnlock(_chapterID + 1) && StoryController.CheckSuitGot(chapterSuitCfg.suitId))
+            {
+                Timers.inst.Remove(SetContainerY);
+                _chapterID += 1;
+                MainStoryDataManager.currentChapterCfgId = _chapterID;
+                //ViewManager.Show<StoryChapterView>(new object[] { (_chapterID+1), currentDifficulty });
+                UpdateView();
+            }
+            else
+            {
+                StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID + 1);
+                if (!StoryController.CheckSuitGot(chapterSuitCfg.suitId))
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("需集齐所需套装");
+                }
+                else if (GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) < chapterCfg.lvl)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("角色等级达到{0}级开启", chapterCfg.lvl));
+                }
+
+            }
+        }
+
+        private IEnumerator InitChapter()
+        {
+            ActivityFightCfg chapterCfg = ActivityFightCfgArray.Instance.GetCfg(_chapterID);
+            var list = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
+            int endLevel = 0;
+            int UnlockCount = 0;
+            _compChapter = _ui.m_chapter.m_compChapterScroll.target;
+            float starPosY = _ui.m_chapter.m_compChapterScroll.m_imgBegin.y;
+            int lineGap = 4500 / list.Count;
+
+            StoryLevelCfg lastLevelCfg = list[list.Count - 1];
+
+            //根据困难程度选择显示图片
+            currentDifficulty = chapterCfg.subType;
+            if (currentDifficulty == 1)
+            {
+                _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zhangjie_bg");
+            }
+            else
+            {
+                currentDifficulty = 0;
+                _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bg_zhuxian");
+            }
+            //_comEff.visible = false;
+            //_effFirst.visible = false;
+            for (int i = 0; i < 20; i++)
+            {
+                GObject obj = _ui.m_chapter.m_compChapterScroll.target.GetChild("g" + (19 - i + 1));
+                obj.SetPosition(obj.x, starPosY - lineGap * i - 300, 0); ;
+                StoryLevelCfg levelCfg = i < list.Count ? list[i] : null;
+                UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(obj);
+                levelItem.m_fightBg.visible = true;
+                levelItem.m_loaDialogBg.visible = true;
+                if (levelCfg != null && MainStoryDataManager.CheckLevelUnlock(levelCfg.id))
+                {
+                    UnlockCount++;
+                    levelItem.target.data = levelCfg.id;
+                    levelItem.target.visible = true;
+                    levelItem.target.onClick.Clear();
+                    levelItem.target.onClick.Add(OnClickLevelItem);
+                    string showId = StoryUtil.GetChapterOrder(_chapterID) + "-" + levelCfg.order;
+                    levelItem.m_txtDialogOrder.text = showId;
+                    levelItem.m_txtFightOrder.text = showId;
+
+                    levelItem.m_activityID.selectedPage = _activityID.ToString();
+                    levelItem.m_c1.selectedIndex = 1;
+                    int score = InstanceZonesDataManager.GetScoreHighest(levelCfg.id);
+                    if (score <= 0)
+                    {
+                        levelItem.m_flower.target.visible = false;
+                    }
+                    else
+                    {
+                        levelItem.m_flower.target.visible = true;
+                        int starCount = InstanceZonesDataManager.GetStarCountHistory(levelCfg.id);
+                        StoryUtil.UpdateStar(starCount, levelItem.m_flower.target, Mathf.Max(0, currentDifficulty));
+                    }
+
+                    //根据困难程度选择显示图片
+                    if (currentDifficulty == 1)
+                    {
+                        levelItem.m_loaDialogBg.url = "ui://Main/zxian_btn_jq_jy";
+                        levelItem.m_fightBg.url = "ui://Main/zxian_btn_zd_jy";
+                        levelItem.m_txtFightOrder.text = string.Format("{0}", StringUtil.GetColorText(showId.ToString(), "#E3F8FF"));
+                        levelItem.m_fightIconA.alpha = 0;
+                        levelItem.m_fightIconB.alpha = 0;
+                    }
+                    else
+                    {
+                        levelItem.m_loaDialogBg.url = "ui://Main/zxian_btn_jq";
+                        levelItem.m_fightBg.url = "ui://Main/zxian_btn_zd";
+                        levelItem.m_txtFightOrder.text = string.Format("{0}", StringUtil.GetColorText(showId.ToString(), "#FFEABF"));
+                        levelItem.m_fightIconA.alpha = 0;
+                        levelItem.m_fightIconB.alpha = 0;
+                    }
+
+                    levelItem.m_holder.visible = !InstanceZonesDataManager.CheckLevelPass(levelCfg.id);
+                    if (!InstanceZonesDataManager.CheckLevelPass(levelCfg.id))
+                    {
+                        //设置为解锁关卡
+                        MainStoryDataManager.currentLevelCfgId = levelCfg.id;
+                        _unPasslevelItem = levelItem.target;
+                        //levelItem.target.AddChild(_comEff);
+                        //_comEff.visible = true;
+
+                        //设置解锁特效
+                        string effName;
+                        if (currentDifficulty == 1)
+                        {
+                            effName = effArray[levelItem.m_c1.selectedIndex] + "_Bule";
+                        }
+                        else
+                        {
+                            effName = effArray[levelItem.m_c1.selectedIndex];
+                        }
+                        if (levelItem.m_c1.selectedIndex == 0)
+                        {
+                            if (levelItem.m_c2.selectedIndex == 0)
+                            {
+                                _effectUI2 = EffectUIPool.CreateEffectUI(_effFirst.GetChild("effect_jq_left").asGraph, "ui_zj", effName);
+                                _effFirst.GetChild("effect_jq_left").rotationY = 180;
+                            }
+                            else
+                            {
+                                _effectUI2 = EffectUIPool.CreateEffectUI(_effFirst.GetChild("effect_jq").asGraph, "ui_zj", effName);
+                                _effFirst.GetChild("effect_jq").rotationY = 0;
+                            }
+                        }
+                        else
+                        {
+                            _effectUI2 = EffectUIPool.CreateEffectUI(_effFirst.GetChild("effect_zd").asGraph, "ui_zj", effName);
+                            if (levelItem.m_c2.selectedIndex == 0)
+                            {
+                                _effFirst.GetChild("effect_zd").rotationY = 0;
+                            }
+                            else
+                            {
+                                _effFirst.GetChild("effect_zd").rotationY = 180;
+                            }
+                        }
+                        levelItem.target.AddChild(_effFirst);
+                        levelItem.m_fightBg.visible = false;
+                        levelItem.m_loaDialogBg.visible = false;
+                        levelItem.m_t0.Play();
+                        _effFirst.visible = true;
+                        //Timers.inst.Add(1.7f, 1, HideEffect, obj);
+                    }
+                    if (levelCfg.order > endLevel)
+                    {
+                        endLevel = levelCfg.order;
+                        _endLevelItem = levelItem.target;
+                    }
+                }
+                else
+                {
+                    levelItem.target.visible = false;
+                }
+                UI_CompStoryLevelItem.ProxyEnd();
+            }
+            yield return new WaitForEndOfFrame();
+
+            _ui.m_chapter.m_compChapterScroll.target.y = 0; //Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height);
+
+            if (gamey != null)
+                gamey.transform.position = new Vector3(0, indexY, 0);
+        }
+
+        private void SetContainerY(object param = null)
+        {
+            _ui.m_chapter.m_compChapterScroll.target.y = 1; //Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height - 1);
+        }
+
+        private void HideEffect(object param = null)
+        {
+            //_effFirst.visible = false;
+        }
+
+        private void OnClickLevelItem(EventContext context)
+        {
+            UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(context.sender as GObject);
+            int levelCfgId = (int)levelItem.target.data;
+            UI_CompStoryLevelItem.ProxyEnd();
+            StoryController.ShowLevelView(levelCfgId);
+            TryCompleteGuide();
+        }
+
+        private void UpdateTime(object param = null)
+        {
+            long endTime = TimeUtil.DateTimeToTimestamp(_activityCfg.endTime);
+            long curTime = TimeHelper.ServerNow();
+            if (endTime < curTime)
+            {
+                Timers.inst.Remove(UpdateTime);
+                return;
+            }
+            TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            string timeStr = TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
+            _ui.m_txtTime.text = timeStr;
+        }
+    }
+}
+

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/ActivityStoryChapterView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 337f4e76ceeaf97408094d084978a875
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -293,6 +293,13 @@ namespace GFGGame
     , RedDotDataManager.Instance.GetActivityFYJYRed(), "", -15, -1);
                     }
                 }
+
+                //RefreshBtnActivitySYJH();
+                //if (_ui.m_btnActivitySYJH.target.visible)
+                //{
+                //    RedDotController.Instance.SetComRedDot(_ui.m_btnActivitySYJH.target, RedDotDataManager.Instance.GetActivityLuckyBoxRed(3));
+                //}
+
             }
             // 后续活动按钮的刷新检测
             else
@@ -321,6 +328,12 @@ namespace GFGGame
                 = (ActivityDataManager.Instance.GetCurOpenActiveByType(ActivityType.AfternoonLeisure) > 0);
         }
 
+        private void RefreshBtnActivitySYJH()
+        {
+            _ui.m_btnActivitySYJH.target.visible
+                = (ActivityDataManager.Instance.GetCurOpenActiveByType(1) > 0);
+        }
+
         private void AddEffect()
         {
             _effectUIList.Add(EffectUIPool.CreateEffectUI(_ui.m_btnMain.m_holder, "ui_zjm", "ZJM_szl_down_3"));

BIN
GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/ActivityThemeLuckyBox/ActivityThemeLuckyBox_fui.bytes


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_10!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_10.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_4!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_4.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_5!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_5.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_6!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_6.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_7!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_7.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_8!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_8.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_9!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_9.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes