Ver Fonte

滚动广告

zhaoyang há 2 anos atrás
pai
commit
b9dc0fbd62
34 ficheiros alterados com 327 adições e 15 exclusões
  1. BIN
      FGUIProject/assets/DailyWelfare/images/zjm_guanggao_kuang.png
  2. 0 1
      FGUIProject/assets/DailyWelfare/package.xml
  3. 7 4
      FGUIProject/assets/Main/MainUI.xml
  4. 20 0
      FGUIProject/assets/Main/components/ComAd.xml
  5. 15 0
      FGUIProject/assets/Main/components/ComAdSelectItem.xml
  6. 0 0
      FGUIProject/assets/Main/components/ComClick(1).xml
  7. 0 0
      FGUIProject/assets/Main/components/ComSkillTips.xml
  8. 6 0
      FGUIProject/assets/Main/components/ListAdItem.xml
  9. 0 0
      FGUIProject/assets/Main/imagesNew/guanggao_kqdnf.png
  10. 0 0
      FGUIProject/assets/Main/imagesNew/guanggao_wylh.png
  11. 0 0
      FGUIProject/assets/Main/imagesNew/guanggao_xslgt.png
  12. 10 7
      FGUIProject/assets/Main/package.xml
  13. 2 1
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  14. 74 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComAd.cs
  15. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComAd.cs.meta
  16. 71 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ListAdItem.cs
  17. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ListAdItem.cs.meta
  18. 4 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_MainUI.cs
  19. 96 2
      GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs
  20. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0!a.png
  21. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0.png
  22. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_1!a.png
  23. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_1.png
  24. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_2!a.png
  25. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_2.png
  26. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_3!a.png
  27. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_3.png
  28. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_4!a.png
  29. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_4.png
  30. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_5!a.png
  31. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_5.png
  32. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_7!a.png
  33. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_7.png
  34. BIN
      GameClient/Assets/ResIn/UI/Main/Main_fui.bytes

BIN
FGUIProject/assets/DailyWelfare/images/zjm_guanggao_kuang.png


+ 0 - 1
FGUIProject/assets/DailyWelfare/package.xml

@@ -68,7 +68,6 @@
     <image id="vols1r" name="hdbn_zsx.png" path="/images/"/>
     <image id="vols1s" name="hdrk_biaotz.png" path="/images/"/>
     <image id="vols1t" name="hdrk_zz.png" path="/images/"/>
-    <image id="vols1u" name="zjm_guanggao_kuang.png" path="/images/"/>
     <image id="vols1v" name="hd_sj_dkuang.png" path="/images/"/>
     <image id="vols1w" name="hdbn_db.png" path="/images/"/>
     <image id="vols1x" name="hdbn_mrbj.png" path="/images/"/>

+ 7 - 4
FGUIProject/assets/Main/MainUI.xml

@@ -64,17 +64,20 @@
       <relation target="n41_wg7t" sidePair="center-center,bottom-bottom"/>
     </component>
     <group id="n57_oju1" name="grpList" xy="942,321" size="108,1397" group="n52_qqat" advanced="true"/>
-    <component id="n74_fqor" name="btnDailyWelfare" src="volsoq" fileName="components/BtnModle1.xml" xy="22,457" group="n89_vols">
+    <component id="n90_vols" name="comListAd" src="volsos" fileName="components/ComAd.xml" xy="0,314" size="411,145" group="n89_vols"/>
+    <component id="n74_fqor" name="btnDailyWelfare" src="volsoq" fileName="components/BtnModle1.xml" xy="22,469" group="n89_vols">
       <relation target="" sidePair="left-left,top-top"/>
       <Button title="活动" icon="ui://mfvz4q8kvolsof"/>
     </component>
-    <component id="n78_bhmm" name="btnActivityDay7" src="volsoq" fileName="components/BtnModle1.xml" xy="22,596" group="n89_vols" controller="c1,1">
+    <component id="n78_bhmm" name="btnActivityDay7" src="volsoq" fileName="components/BtnModle1.xml" xy="22,608" group="n89_vols" controller="c1,1">
       <Button title="七日活动" icon="ui://mfvz4q8kvolsoh"/>
     </component>
-    <component id="n75_mbf1" name="btnActivityLuckyBox" src="volsoq" fileName="components/BtnModle1.xml" xy="22,763" group="n89_vols" controller="c1,1">
+    <component id="n75_mbf1" name="btnActivityLuckyBox" src="volsoq" fileName="components/BtnModle1.xml" xy="22,775" group="n89_vols" controller="c1,1">
       <Button title="镜花水月" icon="ui://mfvz4q8kvolsog"/>
     </component>
-    <group id="n89_vols" name="n89" xy="22,457" size="141,463" group="n52_qqat" advanced="true" layout="vt" lineGap="10" excludeInvisibles="true"/>
+    <group id="n89_vols" name="n89" xy="0,314" size="411,618" group="n52_qqat" advanced="true" layout="vt" lineGap="10" excludeInvisibles="true">
+      <relation target="" sidePair="left-left,top-top"/>
+    </group>
     <group id="n52_qqat" name="grpLeft" xy="0,160" size="1130,1760" group="n59_oju1" advanced="true"/>
     <component id="n73_mzf8" name="btnArena" src="mzf8it" fileName="components/ButtonModle6.xml" xy="71,447" group="n58_oju1">
       <Button icon="ui://mfvz4q8kmzf8in"/>

+ 20 - 0
FGUIProject/assets/Main/components/ComAd.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="381,145">
+  <displayList>
+    <image id="n95_vols" name="n95" src="volsop" fileName="imagesNew/zjm_guanggao_zsx.png" xy="-4,21" group="n98_vols"/>
+    <list id="n90_vols" name="listAd" xy="0,0" size="381,131" group="n98_vols" layout="row" overflow="scroll" scroll="horizontal" scrollBarFlags="8" defaultItem="ui://mfvz4q8kvolsot">
+      <item/>
+      <item/>
+      <item/>
+    </list>
+    <list id="n94_vols" name="listAdSelect" xy="179,106" pivot="1,0" size="187,14" group="n98_vols" layout="row" scroll="horizontal" colGap="10" defaultItem="ui://mfvz4q8kvolsou" align="right">
+      <item/>
+      <item/>
+      <item/>
+    </list>
+    <image id="n96_vols" name="n96" src="volsom" fileName="imagesNew/zjm_guanggao_kuang.png" xy="0,0" group="n98_vols"/>
+    <group id="n98_vols" name="n98" xy="-4,0" size="385,135" advanced="true">
+      <relation target="" sidePair="right-right,top-top"/>
+    </group>
+  </displayList>
+</component>

+ 15 - 0
FGUIProject/assets/Main/components/ComAdSelectItem.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="14,14" extention="Button">
+  <controller name="button" pages="0,up,1,down" selected="0"/>
+  <displayList>
+    <image id="n0_vols" name="n0" src="volsoo" fileName="imagesNew/zjm_guanggao_point_2.png" xy="0,0">
+      <gearDisplay controller="button" pages="0,2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+    <image id="n1_vols" name="n1" src="volson" fileName="imagesNew/zjm_guanggao_point_1.png" xy="0,0">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+  </displayList>
+  <Button mode="Radio"/>
+</component>

+ 0 - 0
FGUIProject/assets/Main/ComClick.xml → FGUIProject/assets/Main/components/ComClick(1).xml


+ 0 - 0
FGUIProject/assets/Main/ComSkillTips.xml → FGUIProject/assets/Main/components/ComSkillTips.xml


+ 6 - 0
FGUIProject/assets/Main/components/ListAdItem.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="381,131">
+  <displayList>
+    <loader id="n91_vols" name="loaRes" xy="0,0" size="381,131" url="ui://mfvz4q8kvolsoi" autoSize="true"/>
+  </displayList>
+</component>

+ 0 - 0
FGUIProject/assets/Main/imagesNew/guanggao_xsgl_kqdnf.png → FGUIProject/assets/Main/imagesNew/guanggao_kqdnf.png


+ 0 - 0
FGUIProject/assets/Main/imagesNew/guanggao_xslc_wylh.png → FGUIProject/assets/Main/imagesNew/guanggao_wylh.png


+ 0 - 0
FGUIProject/assets/Main/imagesNew/guanggao_xslc_xslgt.png → FGUIProject/assets/Main/imagesNew/guanggao_xslgt.png


+ 10 - 7
FGUIProject/assets/Main/package.xml

@@ -452,8 +452,8 @@
     <component id="psphix" name="ComDeduction.xml" path="/components/"/>
     <component id="psphiy" name="ComSkillShow.xml" path="/components/"/>
     <component id="psphiz" name="ComTargetCard.xml" path="/components/"/>
-    <component id="psphj0" name="ComClick.xml" path="/"/>
-    <component id="psphj1" name="ComSkillTips.xml" path="/"/>
+    <component id="psphj0" name="ComClick(1).xml" path="/components/"/>
+    <component id="psphj1" name="ComSkillTips.xml" path="/components/"/>
     <component id="psphj2" name="ComAllCircle.xml" path="/components/"/>
     <component id="psphj4" name="ComAllPerfect.xml" path="/components/"/>
     <component id="psphj5" name="ComClick.xml" path="/components/"/>
@@ -628,18 +628,21 @@
     <image id="volsod" name="zjm_tb_cz_xsqg.png" path="/imagesNew/"/>
     <image id="volsoe" name="zjm_tb_db_hd.png" path="/imagesNew/" scale="9grid" scale9grid="35,7,70,14"/>
     <image id="volsof" name="zjm_tb_hd.png" path="/imagesNew/"/>
-    <image id="volsog" name="zjm_tb_jhsy.png" path="/imagesNew/"/>
+    <image id="volsog" name="zjm_tb_jhsy.png" path="/imagesNew/" exported="true"/>
     <image id="volsoh" name="zjm_tb_qrhd.png" path="/imagesNew/"/>
-    <image id="volsoi" name="guanggao_mrqd.png" path="/imagesNew/"/>
-    <image id="volsoj" name="guanggao_xsgl_kqdnf.png" path="/imagesNew/"/>
-    <image id="volsok" name="guanggao_xslc_wylh.png" path="/imagesNew/"/>
-    <image id="volsol" name="guanggao_xslc_xslgt.png" path="/imagesNew/"/>
+    <image id="volsoi" name="guanggao_mrqd.png" path="/imagesNew/" exported="true"/>
+    <image id="volsoj" name="guanggao_kqdnf.png" path="/imagesNew/" exported="true"/>
+    <image id="volsok" name="guanggao_wylh.png" path="/imagesNew/" exported="true"/>
+    <image id="volsol" name="guanggao_xslgt.png" path="/imagesNew/" exported="true"/>
     <image id="volsom" name="zjm_guanggao_kuang.png" path="/imagesNew/"/>
     <image id="volson" name="zjm_guanggao_point_1.png" path="/imagesNew/"/>
     <image id="volsoo" name="zjm_guanggao_point_2.png" path="/imagesNew/"/>
     <image id="volsop" name="zjm_guanggao_zsx.png" path="/imagesNew/"/>
     <component id="volsoq" name="BtnModle1.xml" path="/components/"/>
     <image id="volsor" name="zjm_gn_yj.png" path="/images/"/>
+    <component id="volsos" name="ComAd.xml" path="/components/"/>
+    <component id="volsot" name="ListAdItem.xml" path="/components/"/>
+    <component id="volsou" name="ComAdSelectItem.xml" path="/components/"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/Main" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

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

@@ -111,6 +111,8 @@ namespace GFGGame
             await ShopSProxy.ReqShopInfo();
             await StudioSProxy.ReqStudioInfos();
             await RoleInfoSProxy.ReqPersonalInfo();
+            await ActivityGlobalSProxy.GetActivityInfo();
+
 
             GameGlobal.lastLoginTime = StorageDataManager.Instance.GetStorageValue(ConstStorageId.LAST_LOGIN_TIME);
             long lastTime = GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);
@@ -258,7 +260,6 @@ namespace GFGGame
             EnduringGiftBoxSProxy.ReqGetAllGiftBagRebateStatus().Coroutine();
             ChatSProxy.ReqQueryChatMsg(ChatType.League).Coroutine();
             ChatSProxy.ReqQueryChatMsg(ChatType.LeagueQuestion).Coroutine();
-            ActivityGlobalSProxy.GetActivityInfo().Coroutine();
 
             int storageAutoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY);
             FightDataManager.Instance.autoPlay = storageAutoPlay <= 0 ? false : true;

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComAd.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Main
+{
+    public partial class UI_ComAd
+    {
+        public GComponent target;
+        public GList m_listAd;
+        public GList m_listAdSelect;
+        public const string URL = "ui://mfvz4q8kvolsos";
+        public const string PACKAGE_NAME = "Main";
+        public const string RES_NAME = "ComAd";
+        private static UI_ComAd _proxy;
+
+        public static UI_ComAd Create(GObject gObject = null)
+        {
+            var ui = new UI_ComAd();
+            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_ComAd Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComAd();
+            }
+            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_listAd = (GList)comp.GetChild("listAd");
+            m_listAdSelect = (GList)comp.GetChild("listAdSelect");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_listAd = null;
+            m_listAdSelect = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

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

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

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ListAdItem.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Main
+{
+    public partial class UI_ListAdItem
+    {
+        public GComponent target;
+        public GLoader m_loaRes;
+        public const string URL = "ui://mfvz4q8kvolsot";
+        public const string PACKAGE_NAME = "Main";
+        public const string RES_NAME = "ListAdItem";
+        private static UI_ListAdItem _proxy;
+
+        public static UI_ListAdItem Create(GObject gObject = null)
+        {
+            var ui = new UI_ListAdItem();
+            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_ListAdItem Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ListAdItem();
+            }
+            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_loaRes = (GLoader)comp.GetChild("loaRes");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaRes = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

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

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

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

@@ -21,6 +21,7 @@ namespace UI.Main
         public GList m_list;
         public UI_ButtonChange m_btnChange;
         public GGroup m_grpList;
+        public UI_ComAd m_comListAd;
         public UI_BtnModle1 m_btnDailyWelfare;
         public UI_BtnModle1 m_btnActivityDay7;
         public UI_BtnModle1 m_btnActivityLuckyBox;
@@ -100,6 +101,7 @@ namespace UI.Main
             m_list = (GList)comp.GetChild("list");
             m_btnChange = (UI_ButtonChange)UI_ButtonChange.Create(comp.GetChild("btnChange"));
             m_grpList = (GGroup)comp.GetChild("grpList");
+            m_comListAd = (UI_ComAd)UI_ComAd.Create(comp.GetChild("comListAd"));
             m_btnDailyWelfare = (UI_BtnModle1)UI_BtnModle1.Create(comp.GetChild("btnDailyWelfare"));
             m_btnActivityDay7 = (UI_BtnModle1)UI_BtnModle1.Create(comp.GetChild("btnActivityDay7"));
             m_btnActivityLuckyBox = (UI_BtnModle1)UI_BtnModle1.Create(comp.GetChild("btnActivityLuckyBox"));
@@ -146,6 +148,8 @@ namespace UI.Main
             m_btnChange.Dispose();
             m_btnChange = null;
             m_grpList = null;
+            m_comListAd.Dispose();
+            m_comListAd = null;
             m_btnDailyWelfare.Dispose();
             m_btnDailyWelfare = null;
             m_btnActivityDay7.Dispose();

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

@@ -20,6 +20,9 @@ namespace GFGGame
         private bool isOpen = false;
         private int _actLuckyBoxId = 0;
         private int _actLimitChargeId = 0;
+        private List<AdCfg> _adIds = new List<AdCfg>();
+        private Vector2 _startPos;
+        private Vector2 _endPos;
         private GButton _btnGongGao;
         private GButton _btnHaoYou;
         private GButton _btnYouJian;
@@ -160,8 +163,15 @@ namespace GFGGame
             _ui.m_loaRight.target.onClick.Add(MoveLeft);
             _ui.m_loaLeft.target.onClick.Add(MoveRight);
 
+            _ui.m_comListAd.m_listAd.itemRenderer = RenderListAdItem;
+            _ui.m_comListAd.m_listAd.SetVirtualAndLoop();
+            _ui.m_comListAd.m_listAd.scrollPane.onScrollEnd.Add(OnListAdScrollEnd);
+            _ui.m_comListAd.m_listAd.scrollPane.decelerationRate = 0.8f;
+
             swipeGesture = new SwipeGesture(_ui.target);
             swipeGesture.onAction.Add(OnSwipe);
+            swipeGesture.onBegin.Add(OnSwipeBegin);
+            swipeGesture.onEnd.Add(OnSwipeEnd);
             swipeGesture.actionDistance = swipeDistance;
             _ui.m_list.ResizeToFit();
             _ui.m_btnChange.target.onClick.Add(OnBtnChangClick);
@@ -215,7 +225,15 @@ namespace GFGGame
                 GameGlobal.lastLoginTime = GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);
             }
             SetPos();
-
+            GetAdIds();
+            _ui.m_comListAd.target.visible = _ui.m_comListAd.m_listAd.numItems > 0;
+            if (_ui.m_comListAd.target.visible)
+            {
+                Timers.inst.Remove(UpdateAdListTime);
+                Timers.inst.Add(3, 0, UpdateAdListTime);
+            }
+            Timers.inst.Remove(Update);
+            Timers.inst.Remove(CheckGuide);
             Timers.inst.AddUpdate(CheckGuide);
             Timers.inst.AddUpdate(Update);
         }
@@ -228,9 +246,11 @@ namespace GFGGame
                 GameObject.Destroy(_sceneObject);
                 _sceneObject = null;
             }
+            _adIds.Clear();
             _valueBarController.OnHide();
             Timers.inst.Remove(Update);
             Timers.inst.Remove(CheckGuide);
+            Timers.inst.Remove(UpdateAdListTime);
         }
 
         protected override void RemoveEventListener()
@@ -300,12 +320,31 @@ namespace GFGGame
                 // _sceneObject.transform.position = new Vector2(-GRoot.inst.width / 100f, 0);
             }
         }
+        private void OnSwipeBegin()
+        {
+            Vector2 pos = Input.mousePosition;
+            pos.y = Screen.height - pos.y;
+
+            _startPos = _ui.target.GlobalToLocal(pos);
+        }
+        private void OnSwipeEnd()
+        {
+            Vector2 pos = Input.mousePosition;
+            pos.y = Screen.height - pos.y;
 
+            _endPos = _ui.target.GlobalToLocal(pos);
+        }
         private void OnSwipe(EventContext context)
         {
             if (!MainDataManager.Instance.CanSwipe) return;
             if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.MAIN_SECOND_VIEW, false)) return;
 
+            if (_ui.m_comListAd.m_listAd.numItems > 0//滚动广告区域不可切换页面
+            && _startPos.x > _ui.m_comListAd.target.x && _startPos.x < (_ui.m_comListAd.target.x + _ui.m_comListAd.target.width)
+            && _startPos.y > _ui.m_comListAd.target.y && _startPos.y < (_ui.m_comListAd.target.y + _ui.m_comListAd.target.height)
+            && _endPos.x < (_ui.m_comListAd.target.x + _ui.m_comListAd.target.width)
+            && _endPos.y > _ui.m_comListAd.target.y && _endPos.y < (_ui.m_comListAd.target.y + _ui.m_comListAd.target.height)) return;
+
             SwipeGesture swipeture = (SwipeGesture)context.sender;
             if (MainDataManager.Instance.ViewType == 0 && swipeture.position.x < 0 &&
                 swipeture.position.y < -swipeture.position.x && swipeture.position.y > swipeture.position.x)
@@ -723,7 +762,7 @@ namespace GFGGame
                 }
                 ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(actLuckyBoxId);
                 _ui.m_btnActivityLuckyBox.target.title = activityOpenCfg.themeName;
-
+                _ui.m_btnActivityLuckyBox.target.icon = "ui://Main/zjm_tb_" + activityOpenCfg.res;
                 long time = TimeUtil.DateTimeToTimestamp(activityOpenCfg.endTime) - TimeHelper.ServerNow();
                 _ui.m_btnActivityLuckyBox.m_txtTime.text = time > TimeUtil.SECOND_PER_DAY * 100 ? TimeUtil.FormattingTimeTo_DDHHmm(time) : TimeUtil.FormattingTimeTo_HHmmss(time);
             }
@@ -806,7 +845,62 @@ namespace GFGGame
             RoleInfoManager.Instance.UpdateHead(_ui.m_headBar.m_comHead, RoleDataManager.headId,
                 RoleDataManager.headBorderId);
         }
+        /// <summary>
+        /// 获取当前开启的滚动广告列表
+        /// </summary>
+        private void GetAdIds()
+        {
+            _adIds.Clear();
+            for (int i = 0; i < AdCfgArray.Instance.dataArray.Length; i++)
+            {
+                AdCfg adCfg = AdCfgArray.Instance.dataArray[i];
+                if (adCfg.activityId > 0 && ActivityGlobalDataManager.Instance.GetActivityInfo(adCfg.activityId) == null) continue;
+                if (!string.IsNullOrEmpty(adCfg.startTime) && !string.IsNullOrEmpty(adCfg.endTime))
+                {
+                    long startTime = TimeUtil.DateTimeToTimestamp(adCfg.startTime);
+                    long endTime = TimeUtil.DateTimeToTimestamp(adCfg.endTime);
+                    if (TimeHelper.ServerNow() < startTime || TimeHelper.ServerNow() > endTime) continue;
+                }
+                _adIds.Add(adCfg);
+            }
+            _ui.m_comListAd.m_listAd.numItems = _adIds.Count;
+            _ui.m_comListAd.m_listAdSelect.numItems = _adIds.Count;
+            if (_ui.m_comListAd.m_listAd.numItems > 0)
+            {
+                _ui.m_comListAd.m_listAd.ScrollToView(0);
+                _ui.m_comListAd.m_listAdSelect.selectedIndex = 0;
+            }
+        }
+        private void UpdateAdListTime(object param)
+        {
+            int itemIndex = _ui.m_comListAd.m_listAd.ChildIndexToItemIndex(0) + 1;
+            itemIndex = itemIndex == _ui.m_comListAd.m_listAd.numItems ? 0 : itemIndex;
+            _ui.m_comListAd.m_listAdSelect.selectedIndex = itemIndex;
+            _ui.m_comListAd.m_listAd.scrollPane.ScrollRight(0.8f, true);
+        }
+        private void RenderListAdItem(int index, GObject obj)
+        {
+            UI_ListAdItem item = UI_ListAdItem.Proxy(obj);
 
+            item.m_loaRes.url = "ui://Main/guanggao_" + _adIds[index].res;
+            if (item.m_loaRes.data == null)
+            {
+                item.m_loaRes.onClick.Add(OnBtnAdJump);
+            }
+            item.m_loaRes.data = _adIds[index].jumpId;
+
+            UI_ListAdItem.ProxyEnd();
+        }
+        private void OnBtnAdJump(EventContext context)
+        {
+            string jumpId = (context.sender as GObject).data.ToString();
+            ViewManager.Show($"GFGGame.{jumpId}");
+        }
+        private void OnListAdScrollEnd()
+        {
+            int itemIndex = _ui.m_comListAd.m_listAd.ChildIndexToItemIndex(0);
+            _ui.m_comListAd.m_listAdSelect.selectedIndex = itemIndex;
+        }
         private void CheckFunOpen()
         {
             _ui.m_btnXiuFang.m_loaLockIcon.visible = !FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(XiuFangView).Name, false);

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_2!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_2.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_7!a.png


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


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