zhaoyang 2 yıl önce
ebeveyn
işleme
8137bac2c3

+ 19 - 12
FGUIProject/assets/LuckyBox/LuckBoxBonusUI.xml

@@ -1,21 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
 <component size="1080,1920">
+  <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
   <displayList>
     <loader id="n17_gbqo" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
     <loader id="n17_gbqo" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </loader>
     </loader>
-    <component id="n1_ga16" name="item0" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="360,406" group="n15_ga16"/>
-    <component id="n5_ga16" name="item1" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="718,406" group="n15_ga16"/>
-    <component id="n6_ga16" name="item2" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="182,744" group="n15_ga16"/>
-    <component id="n7_ga16" name="item3" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="540,744" group="n15_ga16"/>
-    <component id="n8_ga16" name="item4" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="898,744" group="n15_ga16"/>
-    <component id="n9_ga16" name="item5" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="182,1082" group="n15_ga16"/>
-    <component id="n10_ga16" name="item6" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="540,1082" group="n15_ga16"/>
-    <component id="n11_ga16" name="item7" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="898,1082" group="n15_ga16"/>
-    <component id="n12_ga16" name="item8" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="360,1420" group="n15_ga16"/>
-    <component id="n13_ga16" name="item9" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="718,1420" group="n15_ga16"/>
-    <component id="n14_ga16" name="itemOne" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="539,932" group="n15_ga16"/>
-    <group id="n15_ga16" name="n15" xy="-10,213" size="1101,1399" advanced="true">
+    <loader id="n18_v95q" name="loaOpen" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
+      <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
+    </loader>
+    <component id="n14_ga16" name="itemOne" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="539,959">
+      <gearDisplay controller="c1" pages="0"/>
+    </component>
+    <component id="n1_ga16" name="item0" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="360,452" group="n15_ga16"/>
+    <component id="n5_ga16" name="item1" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="718,452" group="n15_ga16"/>
+    <component id="n6_ga16" name="item2" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="182,790" group="n15_ga16"/>
+    <component id="n7_ga16" name="item3" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="540,790" group="n15_ga16"/>
+    <component id="n8_ga16" name="item4" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="898,790" group="n15_ga16"/>
+    <component id="n9_ga16" name="item5" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="182,1128" group="n15_ga16"/>
+    <component id="n10_ga16" name="item6" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="540,1128" group="n15_ga16"/>
+    <component id="n11_ga16" name="item7" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="898,1128" group="n15_ga16"/>
+    <component id="n12_ga16" name="item8" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="360,1466" group="n15_ga16"/>
+    <component id="n13_ga16" name="item9" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="718,1466" group="n15_ga16"/>
+    <group id="n15_ga16" name="n15" xy="-10,259" size="1101,1399" advanced="true">
+      <gearDisplay controller="c1" pages="1"/>
       <relation target="" sidePair="center-center,middle-middle"/>
       <relation target="" sidePair="center-center,middle-middle"/>
     </group>
     </group>
   </displayList>
   </displayList>

+ 6 - 5
FGUIProject/assets/LuckyBox/components/Component2.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="385,385">
 <component size="385,385">
-  <controller name="c1" pages="0,,1,,2,,3,,4," selected="0"/>
+  <controller name="c1" pages="0,,1,,2,,3,,4," selected="4"/>
   <displayList>
   <displayList>
     <image id="n10_v95q" name="n10" src="v95q2u" fileName="images/cj_hd_hdh_1.png" xy="58,60" group="n9_v95q">
     <image id="n10_v95q" name="n10" src="v95q2u" fileName="images/cj_hd_hdh_1.png" xy="58,60" group="n9_v95q">
       <gearDisplay controller="c1" pages="0,4"/>
       <gearDisplay controller="c1" pages="0,4"/>
@@ -23,14 +23,15 @@
     <image id="n16_v95q" name="n16" src="v95q35" fileName="images/cj_hd_zik_3.png" xy="100,270" group="n9_v95q">
     <image id="n16_v95q" name="n16" src="v95q35" fileName="images/cj_hd_zik_3.png" xy="100,270" group="n9_v95q">
       <gearDisplay controller="c1" pages="2"/>
       <gearDisplay controller="c1" pages="2"/>
     </image>
     </image>
+    <loader id="n3_ga16" name="icon" xy="115,120" size="158,158" group="n9_v95q" aspect="true" align="center" vAlign="middle" fill="scale" shrinkOnly="true"/>
+    <loader id="n4_ga16" name="rarity" xy="272,68" size="42,96" group="n9_v95q" url="ui://eg2y0ldpd4iw52"/>
+    <image id="n7_pzq1" name="imgNew" src="r9ril" fileName="imagesExport/grxx_xinxin.png" pkg="eg2y0ldp" xy="76,99" group="n9_v95q" visible="false"/>
     <image id="n17_v95q" name="n17" src="v95q36" fileName="images/cj_hd_zik_4.png" xy="100,270" group="n9_v95q">
     <image id="n17_v95q" name="n17" src="v95q36" fileName="images/cj_hd_zik_4.png" xy="100,270" group="n9_v95q">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay controller="c1" pages="1"/>
     </image>
     </image>
-    <image id="n7_pzq1" name="imgNew" src="r9ril" fileName="imagesExport/grxx_xinxin.png" pkg="eg2y0ldp" xy="71,88" group="n9_v95q" visible="false"/>
-    <loader id="n3_ga16" name="icon" xy="115,120" size="158,158" group="n9_v95q" aspect="true" align="center" vAlign="middle" fill="scale" shrinkOnly="true"/>
-    <loader id="n4_ga16" name="rarity" xy="278,62" size="42,96" group="n9_v95q" url="ui://eg2y0ldpd4iw52"/>
-    <text id="n2_ga16" name="txtName" xy="163,267" size="60,39" group="n9_v95q" fontSize="28" color="#bf9e73" align="center" text="物品">
+    <text id="n2_ga16" name="txtName" xy="106,267" pivot="0.5,0" size="172,39" group="n9_v95q" fontSize="28" color="#bf9e73" align="center" text="岭南荔夏·闲">
       <gearColor controller="c1" pages="0,1,2,3,4" values="#bf9e73,#000000|#b0967d,#000000|#939b89,#000000|#89a2b0,#000000|#bf9e73,#000000"/>
       <gearColor controller="c1" pages="0,1,2,3,4" values="#bf9e73,#000000|#b0967d,#000000|#939b89,#000000|#89a2b0,#000000|#bf9e73,#000000"/>
+      <relation target="" sidePair="center-center"/>
     </text>
     </text>
     <group id="n9_v95q" name="n9" xy="58,60" size="270,270"/>
     <group id="n9_v95q" name="n9" xy="58,60" size="270,270"/>
   </displayList>
   </displayList>

+ 24 - 6
FGUIProject/assets/LuckyBox/components/LuckyBoxBonusItem.xml

@@ -1,22 +1,40 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="385,385" pivot="0.5,0.5" anchor="true">
 <component size="385,385" pivot="0.5,0.5" anchor="true">
-  <controller name="c1" pages="0,,1,,2,,3,,4," selected="4"/>
+  <controller name="c1" pages="0,,1,,2,,3,,4," selected="2"/>
   <displayList>
   <displayList>
     <image id="n13_v95q" name="n13" src="v95q2t" fileName="images/cj_glglgl.png" xy="0,0"/>
     <image id="n13_v95q" name="n13" src="v95q2t" fileName="images/cj_glglgl.png" xy="0,0"/>
-    <image id="n9_v95q" name="n9" src="v95q2y" fileName="images/cj_hd_kdi_1.png" xy="58,60">
+    <image id="n9_v95q" name="n9" src="v95q2y" fileName="images/cj_hd_kdi_1.png" xy="58,60" pivot="0.5,0.5">
       <gearDisplay controller="c1" pages="0,4"/>
       <gearDisplay controller="c1" pages="0,4"/>
     </image>
     </image>
-    <image id="n10_v95q" name="n10" src="v95q2z" fileName="images/cj_hd_kdi_2.png" xy="58,60">
+    <image id="n10_v95q" name="n10" src="v95q2z" fileName="images/cj_hd_kdi_2.png" xy="58,60" pivot="0.5,0.5">
       <gearDisplay controller="c1" pages="3"/>
       <gearDisplay controller="c1" pages="3"/>
     </image>
     </image>
-    <image id="n11_v95q" name="n11" src="v95q30" fileName="images/cj_hd_kdi_3.png" xy="58,60">
+    <image id="n11_v95q" name="n11" src="v95q30" fileName="images/cj_hd_kdi_3.png" xy="58,60" pivot="0.5,0.5">
       <gearDisplay controller="c1" pages="2"/>
       <gearDisplay controller="c1" pages="2"/>
     </image>
     </image>
-    <image id="n12_v95q" name="n12" src="v95q31" fileName="images/cj_hd_kdi_4.png" xy="58,60">
+    <image id="n12_v95q" name="n12" src="v95q31" fileName="images/cj_hd_kdi_4.png" xy="58,60" pivot="0.5,0.5">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay controller="c1" pages="1"/>
     </image>
     </image>
     <component id="n1_ga16" name="comIcon" src="dcrotaa" fileName="components/Component2.xml" xy="192,192" pivot="0.5,0.5" anchor="true"/>
     <component id="n1_ga16" name="comIcon" src="dcrotaa" fileName="components/Component2.xml" xy="192,192" pivot="0.5,0.5" anchor="true"/>
     <graph id="n8_dcro" name="holder" xy="144,146" size="1,1" visible="false" touchable="false" type="rect"/>
     <graph id="n8_dcro" name="holder" xy="144,146" size="1,1" visible="false" touchable="false" type="rect"/>
   </displayList>
   </displayList>
-  <transition name="t0"/>
+  <transition name="t0">
+    <item time="0" type="Skew" target="n10_v95q" value="0,0"/>
+    <item time="0" type="Skew" target="n11_v95q" value="0,0"/>
+    <item time="0" type="Skew" target="n12_v95q" value="0,0"/>
+    <item time="0" type="Skew" target="n1_ga16" value="0,-90"/>
+    <item time="0" type="Skew" target="n9_v95q" value="0,0"/>
+  </transition>
+  <transition name="t1">
+    <item time="0" type="Skew" target="n10_v95q" tween="true" startValue="0,-180" endValue="0,-90" duration="11" ease="Linear"/>
+    <item time="0" type="Skew" target="n11_v95q" tween="true" startValue="0,-180" endValue="0,-90" duration="11" ease="Linear"/>
+    <item time="0" type="Skew" target="n12_v95q" tween="true" startValue="0,-180" endValue="0,-90" duration="11" ease="Linear"/>
+    <item time="0" type="Skew" target="n1_ga16" value="0,-90"/>
+    <item time="0" type="Skew" target="n9_v95q" tween="true" startValue="0,-180" endValue="0,-90" duration="11" ease="Linear"/>
+    <item time="11" type="Skew" target="n10_v95q" value="0,-90"/>
+    <item time="11" type="Skew" target="n11_v95q" value="0,-90"/>
+    <item time="11" type="Skew" target="n12_v95q" value="0,-90"/>
+    <item time="11" type="Skew" target="n9_v95q" value="0,-90"/>
+    <item time="12" type="Skew" target="n1_ga16" tween="true" startValue="0,-90" endValue="0,0" duration="11" ease="Linear"/>
+  </transition>
 </component>
 </component>

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

@@ -8,9 +8,9 @@ namespace UI.LuckyBox
     {
     {
         public GComponent target;
         public GComponent target;
         public Controller m_c1;
         public Controller m_c1;
-        public GImage m_imgNew;
         public GLoader m_icon;
         public GLoader m_icon;
         public GLoader m_rarity;
         public GLoader m_rarity;
+        public GImage m_imgNew;
         public GTextField m_txtName;
         public GTextField m_txtName;
         public const string URL = "ui://drx9d1usdcrotaa";
         public const string URL = "ui://drx9d1usdcrotaa";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string PACKAGE_NAME = "LuckyBox";
@@ -60,17 +60,17 @@ namespace UI.LuckyBox
         private void Init(GComponent comp)
         private void Init(GComponent comp)
         {
         {
             m_c1 = comp.GetController("c1");
             m_c1 = comp.GetController("c1");
-            m_imgNew = (GImage)comp.GetChild("imgNew");
             m_icon = (GLoader)comp.GetChild("icon");
             m_icon = (GLoader)comp.GetChild("icon");
             m_rarity = (GLoader)comp.GetChild("rarity");
             m_rarity = (GLoader)comp.GetChild("rarity");
+            m_imgNew = (GImage)comp.GetChild("imgNew");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_txtName = (GTextField)comp.GetChild("txtName");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
             m_c1 = null;
             m_c1 = null;
-            m_imgNew = null;
             m_icon = null;
             m_icon = null;
             m_rarity = null;
             m_rarity = null;
+            m_imgNew = null;
             m_txtName = null;
             m_txtName = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {

+ 10 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckBoxBonusUI.cs

@@ -7,7 +7,10 @@ namespace UI.LuckyBox
     public partial class UI_LuckBoxBonusUI
     public partial class UI_LuckBoxBonusUI
     {
     {
         public GComponent target;
         public GComponent target;
+        public Controller m_c1;
         public GLoader m_loaBg;
         public GLoader m_loaBg;
+        public GLoader m_loaOpen;
+        public UI_LuckyBoxBonusItem m_itemOne;
         public UI_LuckyBoxBonusItem m_item0;
         public UI_LuckyBoxBonusItem m_item0;
         public UI_LuckyBoxBonusItem m_item1;
         public UI_LuckyBoxBonusItem m_item1;
         public UI_LuckyBoxBonusItem m_item2;
         public UI_LuckyBoxBonusItem m_item2;
@@ -18,7 +21,6 @@ namespace UI.LuckyBox
         public UI_LuckyBoxBonusItem m_item7;
         public UI_LuckyBoxBonusItem m_item7;
         public UI_LuckyBoxBonusItem m_item8;
         public UI_LuckyBoxBonusItem m_item8;
         public UI_LuckyBoxBonusItem m_item9;
         public UI_LuckyBoxBonusItem m_item9;
-        public UI_LuckyBoxBonusItem m_itemOne;
         public const string URL = "ui://drx9d1usfka7a";
         public const string URL = "ui://drx9d1usfka7a";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckBoxBonusUI";
         public const string RES_NAME = "LuckBoxBonusUI";
@@ -66,7 +68,10 @@ namespace UI.LuckyBox
 
 
         private void Init(GComponent comp)
         private void Init(GComponent comp)
         {
         {
+            m_c1 = comp.GetController("c1");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_loaOpen = (GLoader)comp.GetChild("loaOpen");
+            m_itemOne = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("itemOne"));
             m_item0 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item0"));
             m_item0 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item0"));
             m_item1 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item1"));
             m_item1 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item1"));
             m_item2 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item2"));
             m_item2 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item2"));
@@ -77,11 +82,14 @@ namespace UI.LuckyBox
             m_item7 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item7"));
             m_item7 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item7"));
             m_item8 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item8"));
             m_item8 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item8"));
             m_item9 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item9"));
             m_item9 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item9"));
-            m_itemOne = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("itemOne"));
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
+            m_c1 = null;
             m_loaBg = null;
             m_loaBg = null;
+            m_loaOpen = null;
+            m_itemOne.Dispose();
+            m_itemOne = null;
             m_item0.Dispose();
             m_item0.Dispose();
             m_item0 = null;
             m_item0 = null;
             m_item1.Dispose();
             m_item1.Dispose();
@@ -102,8 +110,6 @@ namespace UI.LuckyBox
             m_item8 = null;
             m_item8 = null;
             m_item9.Dispose();
             m_item9.Dispose();
             m_item9 = null;
             m_item9 = null;
-            m_itemOne.Dispose();
-            m_itemOne = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {
                 target.RemoveFromParent();
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckyBoxBonusItem.cs

@@ -11,6 +11,7 @@ namespace UI.LuckyBox
         public UI_Component2 m_comIcon;
         public UI_Component2 m_comIcon;
         public GGraph m_holder;
         public GGraph m_holder;
         public Transition m_t0;
         public Transition m_t0;
+        public Transition m_t1;
         public const string URL = "ui://drx9d1usga16g";
         public const string URL = "ui://drx9d1usga16g";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckyBoxBonusItem";
         public const string RES_NAME = "LuckyBoxBonusItem";
@@ -62,6 +63,7 @@ namespace UI.LuckyBox
             m_comIcon = (UI_Component2)UI_Component2.Create(comp.GetChild("comIcon"));
             m_comIcon = (UI_Component2)UI_Component2.Create(comp.GetChild("comIcon"));
             m_holder = (GGraph)comp.GetChild("holder");
             m_holder = (GGraph)comp.GetChild("holder");
             m_t0 = comp.GetTransition("t0");
             m_t0 = comp.GetTransition("t0");
+            m_t1 = comp.GetTransition("t1");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
@@ -70,6 +72,7 @@ namespace UI.LuckyBox
             m_comIcon = null;
             m_comIcon = null;
             m_holder = null;
             m_holder = null;
             m_t0 = null;
             m_t0 = null;
+            m_t1 = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {
                 target.RemoveFromParent();
                 target.RemoveFromParent();

+ 72 - 63
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusView.cs

@@ -10,6 +10,8 @@ namespace GFGGame
         private UI_LuckBoxBonusUI _ui;
         private UI_LuckBoxBonusUI _ui;
         private List<ItemData> itemList;
         private List<ItemData> itemList;
 
 
+        private int openCount = 0;
+
         private List<GameObject> _effects = new List<GameObject>();
         private List<GameObject> _effects = new List<GameObject>();
         private List<GoWrapper> _wrappers = new List<GoWrapper>();
         private List<GoWrapper> _wrappers = new List<GoWrapper>();
 
 
@@ -41,51 +43,33 @@ namespace GFGGame
             isfullScreen = true;
             isfullScreen = true;
 
 
             InitAllItem();
             InitAllItem();
-            _ui.m_loaBg.touchable = false;
             _ui.m_loaBg.onClick.Add(OnClickBg);
             _ui.m_loaBg.onClick.Add(OnClickBg);
-
-            string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_zl");
-            for (int i = 0; i < 10; i++)
-            {
-                GameObject gameObject0;
-                GoWrapper wrapper0;
-                GGraph holder = _ui.target.GetChild("item" + i).asCom.GetChild("holder").asGraph;
-                SceneController.AddObjectToView(null, null, holder, resPath, out gameObject0, out wrapper0);
-                _effects.Add(gameObject0);
-                _wrappers.Add(wrapper0);
-            }
-            GGraph holder1 = _ui.target.GetChild("itemOne").asCom.GetChild("holder").asGraph;
-            SceneController.AddObjectToView(null, null, holder1, resPath, out _effect, out _wrapper);
-
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bj_ckzxin");
+            _ui.m_loaOpen.onClick.Add(OnClickOpen);
         }
         }
 
 
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gxhd_bjbj");
 
 
             itemList = (viewData as object[])[0] as List<ItemData>;
             itemList = (viewData as object[])[0] as List<ItemData>;
             if (itemList != null)
             if (itemList != null)
             {
             {
-                _ui.m_loaBg.touchable = false;
+                _ui.m_loaOpen.visible = true;
                 int count = itemList.Count;
                 int count = itemList.Count;
                 if (count == 10)
                 if (count == 10)
                 {
                 {
-                    ShowBonusList(itemList);
+                    _ui.m_c1.selectedIndex = 1;
                 }
                 }
                 else if (count > 0)
                 else if (count > 0)
                 {
                 {
-                    ShowBonus(itemList[0]);
+                    _ui.m_c1.selectedIndex = 0;
                 }
                 }
-                else
-                {
-                    _ui.m_loaBg.touchable = true;
-                }
-
+                ShowBonusList();
             }
             }
             else
             else
             {
             {
-                _ui.m_loaBg.touchable = true;
+                _ui.m_loaOpen.visible = false;
             }
             }
         }
         }
 
 
@@ -101,41 +85,23 @@ namespace GFGGame
             GetSuitItemController.TryShow(0);
             GetSuitItemController.TryShow(0);
         }
         }
 
 
-        private void ShowBonusList(List<ItemData> itemList)
+        private void ShowBonusList()
         {
         {
-            HideAllItem();
-            for (int i = 0; i < 10; i++)
+            if (itemList.Count > 1)
             {
             {
-                ItemData itemData = itemList[i];
-                GObject itemObject = _ui.target.GetChild("item" + i);
-                if (itemObject != null)
+                for (int i = 0; i < itemList.Count; i++)
                 {
                 {
-                    UI_LuckyBoxBonusItem itemUI = UI_LuckyBoxBonusItem.Proxy(itemObject);
-                    UpdateItem(itemUI, itemData, i);
-                    UI_LuckyBoxBonusItem.ProxyEnd();
-                    Timers.inst.Add(0.3f * i, 1, (object param) =>
+                    GObject itemObject = _ui.target.GetChild("item" + i);
+                    if (itemObject != null)
                     {
                     {
-                        itemObject.visible = true;
-                        if ((int)param == 9)
-                        {
-                            Timers.inst.Add(0.1f, 1, (object param) =>
-                            {
-                                _ui.m_loaBg.touchable = true;
-                            });
-                        }
-                    }, i);
+                        UpdateItem(i, itemObject);
+                    }
                 }
                 }
             }
             }
-        }
-
-        private void ShowBonus(ItemData itemData)
-        {
-            HideAllItem();
-            _ui.m_itemOne.target.visible = true;
-            UI_LuckyBoxBonusItem itemUI = UI_LuckyBoxBonusItem.Proxy(_ui.m_itemOne.target);
-            UpdateItem(itemUI, itemData, 0);
-            UI_LuckyBoxBonusItem.ProxyEnd();
-            _ui.m_loaBg.touchable = true;
+            else
+            {
+                UpdateItem(0, _ui.m_itemOne.target);
+            }
         }
         }
 
 
         private void HideAllItem()
         private void HideAllItem()
@@ -151,10 +117,11 @@ namespace GFGGame
             }
             }
         }
         }
 
 
-        private void UpdateItem(UI_LuckyBoxBonusItem itemUI, ItemData itemData, int index)
+        private void UpdateItem(int index, GObject obj)
         {
         {
+            ItemData itemData = itemList[index];
+            UI_LuckyBoxBonusItem itemUI = UI_LuckyBoxBonusItem.Proxy(obj);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
-            itemUI.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
             bool isFirst = true;
             bool isFirst = true;
             int count = 0;
             int count = 0;
             for (int i = 0; i < itemList.Count; i++)
             for (int i = 0; i < itemList.Count; i++)
@@ -169,6 +136,7 @@ namespace GFGGame
                 }
                 }
             }
             }
 
 
+            itemUI.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
             itemUI.m_comIcon.m_imgNew.visible = ItemDataManager.GetItemNum(itemData.id) == count && isFirst ? true : false;
             itemUI.m_comIcon.m_imgNew.visible = ItemDataManager.GetItemNum(itemData.id) == count && isFirst ? true : false;
             string itemName = itemCfg.name;
             string itemName = itemCfg.name;
             if (itemData.num > 1)
             if (itemData.num > 1)
@@ -179,28 +147,69 @@ namespace GFGGame
             itemUI.m_c1.selectedIndex = itemCfg.rarity;
             itemUI.m_c1.selectedIndex = itemCfg.rarity;
             itemUI.m_comIcon.m_c1.selectedIndex = itemCfg.rarity;
             itemUI.m_comIcon.m_c1.selectedIndex = itemCfg.rarity;
             RarityIconController.UpdateRarityIcon(itemUI.m_comIcon.m_rarity, itemData.id, false);
             RarityIconController.UpdateRarityIcon(itemUI.m_comIcon.m_rarity, itemData.id, false);
-            itemUI.target.data = itemData.id;
-            itemUI.m_comIcon.target.SetScale(0, 0);
+            itemUI.m_comIcon.m_icon.data = itemData.id;
+
+            // itemUI.m_comIcon.target.SetScale(0, 0);
             itemUI.m_t0.Play();
             itemUI.m_t0.Play();
-            // GTween.To(0, 1, 0.2f).SetTarget(itemUI).OnUpdate((GTweener t) => { itemUI.target.SetScale(t.value.x, t.value.x); });
+            UI_LuckyBoxBonusItem.ProxyEnd();
         }
         }
 
 
         private void InitAllItem()
         private void InitAllItem()
         {
         {
-            _ui.m_itemOne.target.onClick.Add(OnClickItemUI);
+            UI_LuckyBoxBonusItem itemUI = UI_LuckyBoxBonusItem.Proxy(_ui.m_itemOne.target);
+            itemUI.target.onClick.Add(OnClickItem);
+            itemUI.m_comIcon.m_icon.onClick.Add(OnClickItemTips);
+            UI_LuckyBoxBonusItem.ProxyEnd();
             for (int i = 0; i < 10; i++)
             for (int i = 0; i < 10; i++)
             {
             {
                 GObject itemObject = _ui.target.GetChild("item" + i);
                 GObject itemObject = _ui.target.GetChild("item" + i);
                 if (itemObject != null)
                 if (itemObject != null)
                 {
                 {
-                    itemObject.onClick.Add(OnClickItemUI);
+                    UI_LuckyBoxBonusItem itemUITen = UI_LuckyBoxBonusItem.Proxy(itemObject);
+                    itemUITen.target.onClick.Add(OnClickItem);
+                    itemUITen.m_comIcon.m_icon.onClick.Add(OnClickItemTips);
+                    UI_LuckyBoxBonusItem.ProxyEnd();
                 }
                 }
             }
             }
-        }
 
 
-        private void OnClickItemUI(EventContext context)
+        }
+        private void OnClickItem(EventContext context)
         {
         {
             GComponent item = context.sender as GComponent;
             GComponent item = context.sender as GComponent;
+            PlayOpenAni(item);
+        }
+        private void OnClickOpen()
+        {
+            for (int i = 0; i < itemList.Count; i++)
+            {
+                GComponent component = _ui.target.GetChild("item" + i).asCom;
+                if (component != null)
+                {
+                    bool playing = PlayOpenAni(component);
+                    if (!playing) continue;
+                    if (playing) break;
+                }
+            }
+        }
+        private bool PlayOpenAni(GComponent component)
+        {
+            Transition transition = component.GetTransition("t1");
+            GComponent comIcon = component.GetChild("comIcon").asCom;
+            if (transition.playing || comIcon.skew == Vector2.zero) return false;
+            transition.Play(UpdateOpenCount);
+            return true;
+        }
+        private void UpdateOpenCount()
+        {
+            openCount++;
+            if (openCount == itemList.Count)
+            {
+                _ui.m_loaOpen.visible = false;
+            }
+        }
+        private void OnClickItemTips(EventContext context)
+        {
+            GLoader item = context.sender as GLoader;
             int itemID = (int)item.data;
             int itemID = (int)item.data;
             GoodsItemTipsController.ShowItemTips(itemID);
             GoodsItemTipsController.ShowItemTips(itemID);
         }
         }

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