Kaynağa Gözat

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

zhaoyang 2 yıl önce
ebeveyn
işleme
257bc8f532

+ 20 - 11
FGUIProject/assets/EnduringGiftBox/RushSaleGiftBoxUI.xml

@@ -2,7 +2,6 @@
 <component size="1080,958">
   <displayList>
     <image id="n1_yjmk" name="n1" src="yjmk2j" fileName="images/xsqg_db.png" xy="1,-72" group="n22_droi"/>
-    <image id="n0_yjmk" name="n0" src="yjmk2l" fileName="images/xsqg_lihui.png" xy="44,23" group="n22_droi"/>
     <image id="n2_yjmk" name="n2" src="yjmk2i" fileName="images/wz_xsqg.png" xy="335,26" group="n22_droi"/>
     <component id="n19_droi" name="btnUp" src="droi3c" fileName="components/BtnUp.xml" xy="63,380" group="n22_droi"/>
     <component id="n20_droi" name="btnNext" src="droi3d" fileName="components/BtnNext.xml" xy="877,386" group="n22_droi"/>
@@ -19,12 +18,16 @@
     <image id="n12_yjmk" name="n12" src="yjmk2b" fileName="images/xsqg_zsx.png" xy="302,602" group="n23_droi"/>
     <text id="n13_yjmk" name="txtUrc" xy="453,623" size="224,68" group="n23_droi" fontSize="34" color="#b8857b" align="center" vAlign="middle" autoSize="shrink" text="今日限购0/1"/>
     <component id="n15_yjmk" name="btnBuyPink" src="yjmk2q" fileName="components/BtnBuyPink.xml" xy="408,693" group="n23_droi"/>
+    <graph id="n25_droi" name="holderBtnBy" xy="570,735" size="46,29" group="n23_droi"/>
+    <graph id="n27_droi" name="holderZheKouChiXu" xy="394,692" size="33,33" group="n23_droi"/>
     <component id="n14_yjmk" name="comDiscount" src="yjmk2r" fileName="components/ComDiscount2.xml" xy="333,642" group="n23_droi"/>
+    <graph id="n26_droi" name="holderZheKou" xy="399,697" size="19,18" group="n23_droi"/>
     <text id="n16_yjmk" name="txtLrc" xy="379,787" size="380,46" group="n23_droi" fontSize="34" color="#b8857b" align="center" autoSize="shrink" text="可获得60充值经验"/>
+    <graph id="n28_droi" name="holderStar" xy="554,470" size="43,38" group="n23_droi"/>
     <group id="n23_droi" name="n23" xy="193,207" size="746,626"/>
+    <graph id="n24_droi" name="holderPaoBaby" xy="263,282" size="86,77"/>
   </displayList>
   <transition name="t3">
-    <item time="0" type="Alpha" target="n0_yjmk" tween="true" startValue="0" endValue="1" duration="27" ease="Linear"/>
     <item time="0" type="Alpha" target="n11_yjmk" value="0"/>
     <item time="0" type="Alpha" target="n12_yjmk" value="0"/>
     <item time="0" type="Alpha" target="n13_yjmk" value="0"/>
@@ -34,27 +37,33 @@
     <item time="0" type="Alpha" target="n19_droi" tween="true" startValue="0" endValue="1" duration="27" ease="Linear"/>
     <item time="0" type="Alpha" target="n1_yjmk" tween="true" startValue="0" endValue="1" duration="27" ease="Linear"/>
     <item time="0" type="Alpha" target="n20_droi" tween="true" startValue="0" endValue="1" duration="27" ease="Linear"/>
-    <item time="0" type="Alpha" target="n21_droi" tween="true" startValue="0" endValue="1" duration="27" ease="Linear"/>
+    <item time="0" type="Alpha" target="n21_droi" tween="true" startValue="0" endValue="1" duration="27"/>
     <item time="0" type="Alpha" target="n2_yjmk" tween="true" startValue="0" endValue="1" duration="27" ease="Linear"/>
     <item time="0" type="Alpha" target="n4_yjmk" value="0"/>
     <item time="0" type="Alpha" target="n5_yjmk" value="0"/>
-    <item time="0" type="Alpha" target="n6_yjmk" value="1"/>
     <item time="0" type="Alpha" target="n6_yjmk" value="0"/>
-    <item time="0" type="Alpha" target="n8_yjmk" value="1"/>
+    <item time="0" type="Alpha" target="n6_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n8_yjmk" value="0"/>
     <item time="0" type="Alpha" target="n8_yjmk" value="0"/>
-    <item time="0" type="Scale" target="n0_yjmk" tween="true" startValue="0.95,0.95" endValue="1,1" duration="10" ease="Linear"/>
-    <item time="0" type="XY" target="n0_yjmk" tween="true" startValue="55,20" endValue="44,23" duration="10" ease="Linear"/>
+    <item time="0" type="Scale" target="n24_droi" tween="true" startValue="0.95,0.95" endValue="1,1" duration="12" ease="Linear"/>
+    <item time="0" type="Visible" target="n24_droi" value="false"/>
+    <item time="0" type="Visible" target="n27_droi" value="false"/>
     <item time="0" type="XY" target="n19_droi" tween="true" startValue="70,380" endValue="63,380" duration="10" ease="Linear"/>
+    <item time="0" type="XY" target="n20_droi" tween="true" startValue="863,386" endValue="877,386" duration="12" ease="Linear"/>
+    <item time="0" type="XY" target="n24_droi" tween="true" startValue="274,290" endValue="263,282" duration="12" ease="Linear"/>
     <item time="0" type="XY" target="n2_yjmk" tween="true" startValue="335,20" endValue="335,26" duration="11" ease="Linear"/>
+    <item time="6" type="Visible" target="n24_droi" value="true"/>
+    <item time="12" type="Visible" target="n27_droi" value="true"/>
     <item time="15" type="Alpha" target="n11_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
     <item time="15" type="Alpha" target="n12_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
     <item time="15" type="Alpha" target="n13_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
     <item time="15" type="Alpha" target="n14_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
+    <item time="15" type="Alpha" target="n15_yjmk" tween="true" startValue="0.2" endValue="1" duration="16" ease="Linear"/>
     <item time="15" type="Alpha" target="n16_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
+    <item time="15" type="Alpha" target="n24_droi" tween="true" startValue="0" endValue="1" duration="19" ease="Linear"/>
     <item time="15" type="Alpha" target="n4_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
-    <item time="15" type="Alpha" target="n5_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
-    <item time="15" type="Alpha" target="n6_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
-    <item time="15" type="Alpha" target="n8_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
-    <item time="18" type="Alpha" target="n15_yjmk" tween="true" startValue="0.2" endValue="1" duration="16" ease="Linear"/>
+    <item time="15" type="Alpha" target="n5_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Quart.Out"/>
+    <item time="15" type="Alpha" target="n6_yjmk" tween="true" startValue="0" endValue="1" duration="14" ease="Quint.Out"/>
+    <item time="15" type="Alpha" target="n8_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Quint.Out"/>
   </transition>
 </component>

+ 1 - 1
FGUIProject/assets/EnduringGiftBox/components/ComCurSupplyItem.xml

@@ -10,9 +10,9 @@
     <component id="n28_qqhz" name="comLeftGiftBox" src="qqhz1q" fileName="components/ComLeftGiftBox.xml" xy="25,22"/>
     <text id="n15_qqhz" name="txtTitle" xy="290,15" size="275,47" font="ui://eg2y0ldpa0cftkz" fontSize="28" color="#cc9974" align="center" autoSize="none" text="体力超值返利包"/>
     <text id="n22_qqhz" name="txtWeekPrompt" xy="294,46" size="266,39" font="ui://eg2y0ldpa0cftks" fontSize="26" color="#bda5a8" align="center" autoSize="none" text="连续七天每日获得"/>
-    <component id="n29_droi" name="btnIcoWeekPromptTag" src="droi3e" fileName="components/BtnIcoWeekPromptTag.xml" xy="530,48"/>
     <list id="n18_qqhz" name="list" xy="231,83" size="402,132" layout="flow_vt" overflow="scroll" scroll="horizontal" scrollBarFlags="32" colGap="35" defaultItem="ui://bdi1qe15qqhz1g" align="center" autoClearItems="true">
       <item/>
     </list>
+    <component id="n30_fwtw" name="btnIcoWeekPromptTag" src="droi3g" fileName="components/BtnIcoWeekPromptTag.xml" xy="541,49"/>
   </displayList>
 </component>

+ 5 - 0
FGUIProject/assets/EnduringGiftBox/components/ComRsGifBoxIconItem.xml

@@ -3,5 +3,10 @@
   <displayList>
     <component id="n3_yjmk" name="comRewardIconItem" src="qqhz1g" fileName="components/ComRewardIconItem.xml" xy="3,2" size="132,132" aspect="true" scale="1.09,1.09"/>
     <text id="n1_yjmk" name="txtItemName" xy="6,138" size="143,56" fontSize="39" color="#a47e49" align="center" autoSize="none" text="体力"/>
+    <graph id="n4_droi" name="holderItem" xy="77,71" size="46,42"/>
   </displayList>
+  <transition name="t1">
+    <item time="0" type="Visible" target="n4_droi" value="false"/>
+    <item time="12" type="Visible" target="n4_droi" value="true"/>
+  </transition>
 </component>

+ 1 - 2
FGUIProject/assets/EnduringGiftBox/components/ComSpecialOfferGiftBoxItem.xml

@@ -8,8 +8,7 @@
     <text id="n5_yjmk" name="txtUrc" xy="714,13" size="216,42" group="n8_yjmk" rotation="-0.6" fontSize="28" color="#cc6960" align="center" leading="0" autoSize="none" text="今日限购1/1"/>
     <text id="n6_yjmk" name="txtGetJf" xy="660,165" size="269,33" group="n8_yjmk" fontSize="28" color="#c69652" align="center" autoSize="none" text="可获得120会员积分"/>
     <component id="n7_yjmk" name="comDiscount" src="qqhz1o" fileName="components/ComDiscount.xml" xy="629,59" size="78,66" group="n8_yjmk"/>
-    <list id="n9_yjmk" name="list" xy="57,58" size="439,133" group="n8_yjmk" scale="1.05,1.05" layout="flow_vt" overflow="scroll" scroll="horizontal" scrollBarFlags="32" colGap="16" defaultItem="ui://bdi1qe15qqhz1g" align="center" autoClearItems="true">
-      <item/>
+    <list id="n9_yjmk" name="list" xy="57,58" size="439,133" group="n8_yjmk" scale="1.05,1.05" layout="flow_vt" overflow="scroll" scroll="horizontal" scrollBarFlags="32" colGap="16" defaultItem="ui://bdi1qe15qqhz1g" autoClearItems="true">
       <item/>
       <item/>
     </list>

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComCurSupplyItem.cs

@@ -14,8 +14,8 @@ namespace UI.EnduringGiftBox
         public UI_ComLeftGiftBox m_comLeftGiftBox;
         public GTextField m_txtTitle;
         public GTextField m_txtWeekPrompt;
-        public GComponent m_btnIcoWeekPromptTag;
         public GList m_list;
+        public GComponent m_btnIcoWeekPromptTag;
         public const string URL = "ui://bdi1qe15qqhz11";
         public const string PACKAGE_NAME = "EnduringGiftBox";
         public const string RES_NAME = "ComCurSupplyItem";
@@ -70,8 +70,8 @@ namespace UI.EnduringGiftBox
             m_comLeftGiftBox = (UI_ComLeftGiftBox)UI_ComLeftGiftBox.Create(comp.GetChild("comLeftGiftBox"));
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
             m_txtWeekPrompt = (GTextField)comp.GetChild("txtWeekPrompt");
-            m_btnIcoWeekPromptTag = (GComponent)comp.GetChild("btnIcoWeekPromptTag");
             m_list = (GList)comp.GetChild("list");
+            m_btnIcoWeekPromptTag = (GComponent)comp.GetChild("btnIcoWeekPromptTag");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -85,8 +85,8 @@ namespace UI.EnduringGiftBox
             m_comLeftGiftBox = null;
             m_txtTitle = null;
             m_txtWeekPrompt = null;
-            m_btnIcoWeekPromptTag = null;
             m_list = null;
+            m_btnIcoWeekPromptTag = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRsGifBoxIconItem.cs

@@ -9,6 +9,8 @@ namespace UI.EnduringGiftBox
         public GComponent target;
         public UI_ComRewardIconItem m_comRewardIconItem;
         public GTextField m_txtItemName;
+        public GGraph m_holderItem;
+        public Transition m_t1;
         public const string URL = "ui://bdi1qe15yjmk2p";
         public const string PACKAGE_NAME = "EnduringGiftBox";
         public const string RES_NAME = "ComRsGifBoxIconItem";
@@ -58,12 +60,16 @@ namespace UI.EnduringGiftBox
         {
             m_comRewardIconItem = (UI_ComRewardIconItem)UI_ComRewardIconItem.Create(comp.GetChild("comRewardIconItem"));
             m_txtItemName = (GTextField)comp.GetChild("txtItemName");
+            m_holderItem = (GGraph)comp.GetChild("holderItem");
+            m_t1 = comp.GetTransition("t1");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_comRewardIconItem.Dispose();
             m_comRewardIconItem = null;
             m_txtItemName = null;
+            m_holderItem = null;
+            m_t1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 15 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_RushSaleGiftBoxUI.cs

@@ -15,8 +15,13 @@ namespace UI.EnduringGiftBox
         public GList m_list;
         public GTextField m_txtUrc;
         public UI_BtnBuyPink m_btnBuyPink;
+        public GGraph m_holderBtnBy;
+        public GGraph m_holderZheKouChiXu;
         public UI_ComDiscount2 m_comDiscount;
+        public GGraph m_holderZheKou;
         public GTextField m_txtLrc;
+        public GGraph m_holderStar;
+        public GGraph m_holderPaoBaby;
         public Transition m_t3;
         public const string URL = "ui://bdi1qe15yjmk29";
         public const string PACKAGE_NAME = "EnduringGiftBox";
@@ -73,8 +78,13 @@ namespace UI.EnduringGiftBox
             m_list = (GList)comp.GetChild("list");
             m_txtUrc = (GTextField)comp.GetChild("txtUrc");
             m_btnBuyPink = (UI_BtnBuyPink)UI_BtnBuyPink.Create(comp.GetChild("btnBuyPink"));
+            m_holderBtnBy = (GGraph)comp.GetChild("holderBtnBy");
+            m_holderZheKouChiXu = (GGraph)comp.GetChild("holderZheKouChiXu");
             m_comDiscount = (UI_ComDiscount2)UI_ComDiscount2.Create(comp.GetChild("comDiscount"));
+            m_holderZheKou = (GGraph)comp.GetChild("holderZheKou");
             m_txtLrc = (GTextField)comp.GetChild("txtLrc");
+            m_holderStar = (GGraph)comp.GetChild("holderStar");
+            m_holderPaoBaby = (GGraph)comp.GetChild("holderPaoBaby");
             m_t3 = comp.GetTransition("t3");
         }
         public void Dispose(bool disposeTarget = false)
@@ -88,9 +98,14 @@ namespace UI.EnduringGiftBox
             m_txtUrc = null;
             m_btnBuyPink.Dispose();
             m_btnBuyPink = null;
+            m_holderBtnBy = null;
+            m_holderZheKouChiXu = null;
             m_comDiscount.Dispose();
             m_comDiscount = null;
+            m_holderZheKou = null;
             m_txtLrc = null;
+            m_holderStar = null;
+            m_holderPaoBaby = null;
             m_t3 = null;
             if(disposeTarget && target != null)
             {

+ 80 - 2
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs

@@ -20,6 +20,21 @@ namespace GFGGame
 
         private int _pageIndex; //当前页码,需要显示的数据的索引
 
+        private List<GGraph> _graphList = new List<GGraph>();
+        private List<GameObject> _gameObjectList = new List<GameObject>();
+        private GameObject _gameObject1;
+        private GameObject _gameObject2;
+        private GameObject _gameObject3;
+        private GameObject _gameObject4;
+        private GameObject _gameObject5;
+
+        private List<GoWrapper> _wrapperList = new List<GoWrapper>();
+        private GoWrapper _wrapper1;
+        private GoWrapper _wrapper2;
+        private GoWrapper _wrapper3;
+        private GoWrapper _wrapper4;
+        private GoWrapper _wrapper5;
+
         protected override void OnInit()
         {
             base.OnInit();
@@ -36,12 +51,13 @@ namespace GFGGame
             _ui.m_btnBack.onClick.Add(OnBtnCancelClick);
             _ui.m_btnBuyPink.target.onClick.Add(OnBtnBuyClick);
         }
-        
+
         protected override void OnShown()
         {
             base.OnShown();
             _type = (int)(this.viewData as object[])[0]; //ConstActivityType
             AddEffect();
+            _ui.m_t3.Play();
             LimitedTimeGiftBoxDataManager.Instance.UpLtgGbItemData4();
             LimitedTimeGiftBoxDataManager.Instance.UpLtgGbItemData5();
             InitPageInex();
@@ -66,6 +82,28 @@ namespace GFGGame
 
         private void AddEffect()
         {
+            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_pepole");
+            SceneController.AddObjectToView(null, null, _ui.m_holderPaoBaby, resPath1,
+                out _gameObject1, out _wrapper1);
+
+            string resPath3 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_discount_chixu");
+            SceneController.AddObjectToView(null, null, _ui.m_holderZheKouChiXu, resPath3,
+                out _gameObject3, out _wrapper3);
+
+            Timers.inst.Add(0.8f, 1, (obj) =>
+                {
+                    string resPath4 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_discount_baofa");
+                    SceneController.AddObjectToView(null, null, _ui.m_holderZheKou, resPath4,
+                        out _gameObject4, out _wrapper4);
+
+                    string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_button");
+                    SceneController.AddObjectToView(null, null, _ui.m_holderBtnBy, resPath2,
+                        out _gameObject2, out _wrapper2);
+                }
+            );
+            string resPath5 = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_star");
+            SceneController.AddObjectToView(null, null, _ui.m_holderStar, resPath5,
+                out _gameObject5, out _wrapper5);
         }
 
         //实例化索引
@@ -233,6 +271,16 @@ namespace GFGGame
             uiItem.m_comRewardIconItem.m_num.text = itemKv[1].ToString();
             uiItem.m_comRewardIconItem.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             uiItem.m_comRewardIconItem.target.onClick.Add(OnListSelectorItemClick);
+
+            if (!_graphList.Contains(uiItem.m_holderItem))
+            {
+                string resPath = ResPathUtil.GetViewEffectPath("ui_Activity", "Limite_kuang");
+                SceneController.AddObjectToView(null, null, uiItem.m_holderItem, resPath, out var gameObject,
+                    out var wrapper);
+                _graphList.Add(uiItem.m_holderItem);
+                _gameObjectList.Add(gameObject);
+                _wrapperList.Add(wrapper);
+            }
         }
 
         private void UpViewNone()
@@ -284,8 +332,38 @@ namespace GFGGame
             }
         }
 
+        private void DestroyObjectFromView()
+        {
+            foreach (var itemGameObject in _gameObjectList)
+            {
+                if (itemGameObject != null)
+                {
+                    GameObject.DestroyImmediate(itemGameObject);
+                }
+            }
+            
+            _gameObjectList.Clear();
+
+            foreach (var itemWrapper in _wrapperList)
+            {
+                if (itemWrapper != null)
+                {
+                    itemWrapper.Dispose();
+                }
+            }
+
+            _wrapperList.Clear();
+            _graphList.Clear();
+        }
+
         protected override void OnHide()
         {
+            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
+            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
+            SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
+            SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
+            SceneController.DestroyObjectFromView(_gameObject5, _wrapper5);
+            DestroyObjectFromView();
             this.RemoveEventListener();
             //Dispose();
             base.Hide();
@@ -295,7 +373,7 @@ namespace GFGGame
         {
             this.Hide();
         }
-        
+
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {

BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_fui.bytes