zhaoyang 2 anni fa
parent
commit
60e7aea556

+ 3 - 6
FGUIProject/assets/LuckyBox/LuckBoxBonusUI.xml

@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
-  <controller name="c1" pages="0,,1," selected="1"/>
+  <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
     <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"/>
     </loader>
-    <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>
@@ -33,8 +30,8 @@
     </loader>
   </displayList>
   <transition name="t0">
-    <item time="0" type="Alpha" target="n14_ga16" tween="true" startValue="0" endValue="1" duration="12" ease="Linear"/>
-    <item time="0" type="Alpha" target="n15_ga16" tween="true" startValue="0" endValue="1" duration="12" ease="Linear"/>
+    <item time="0" type="Alpha" target="n14_ga16" tween="true" startValue="0" endValue="1" duration="18" ease="Linear"/>
+    <item time="0" type="Alpha" target="n15_ga16" tween="true" startValue="0" endValue="1" duration="18" ease="Linear"/>
   </transition>
   <transition name="t1">
     <item time="0" type="Alpha" target="n14_ga16" value="0"/>

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

@@ -9,7 +9,6 @@ namespace UI.LuckyBox
         public GComponent target;
         public Controller m_c1;
         public GLoader m_loaBg;
-        public GLoader m_loaOpen;
         public UI_LuckyBoxBonusItem m_itemOne;
         public UI_LuckyBoxBonusItem m_item0;
         public UI_LuckyBoxBonusItem m_item1;
@@ -75,7 +74,6 @@ namespace UI.LuckyBox
         {
             m_c1 = comp.GetController("c1");
             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_item1 = (UI_LuckyBoxBonusItem)UI_LuckyBoxBonusItem.Create(comp.GetChild("item1"));
@@ -97,7 +95,6 @@ namespace UI.LuckyBox
         {
             m_c1 = null;
             m_loaBg = null;
-            m_loaOpen = null;
             m_itemOne.Dispose();
             m_itemOne = null;
             m_item0.Dispose();

+ 21 - 26
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusView.cs

@@ -50,7 +50,6 @@ namespace GFGGame
             InitAllItem();
             _ui.m_loaBg.onClick.Add(OnClickBg);
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bj_ckzxin");
-            _ui.m_loaOpen.onClick.Add(OnClickOpen);
             _ui.m_btnPass.onClick.Add(OnBtnPassClick);
 
         }
@@ -61,25 +60,19 @@ namespace GFGGame
 
             itemList = (viewData as object[])[0] as List<ItemData>;
             itemListAni = new List<ItemData>(itemList.ToArray());
-            _ui.m_loaOpen.visible = true;
             _ui.m_loaMask.visible = true;
-            if (itemList != null)
+
+            int count = itemList.Count;
+            if (count == 10)
             {
-                int count = itemList.Count;
-                if (count == 10)
-                {
-                    _ui.m_c1.selectedIndex = 1;
-                }
-                else if (count > 0)
-                {
-                    _ui.m_c1.selectedIndex = 0;
-                }
-                ShowBonusList();
+                _ui.m_c1.selectedIndex = 1;
             }
-            else
+            else if (count > 0)
             {
-                _ui.m_loaOpen.visible = false;
+                _ui.m_c1.selectedIndex = 0;
             }
+            ShowBonusList();
+
             _ui.m_t0.Play(UpdateView);
         }
 
@@ -123,10 +116,17 @@ namespace GFGGame
         }
         private void OnClickBg()
         {
-            this.Hide();
-            ViewManager.Show(ViewName.LUCKY_BOX_VIEW, ViewManager.GetGoBackDatas(ViewName.LUCKY_BOX_STAR_VIEW));
-            GetSuitItemController.TryShow(0);
-            _ui.m_t0.Stop(true, false);
+            if (openCount < itemList.Count)
+            {
+                OnClickOpen();
+            }
+            else
+            {
+                this.Hide();
+                ViewManager.Show(ViewName.LUCKY_BOX_VIEW, ViewManager.GetGoBackDatas(ViewName.LUCKY_BOX_STAR_VIEW));
+                GetSuitItemController.TryShow(0);
+                _ui.m_t0.Stop(true, false);
+            }
         }
         private void UpdateView()
         {
@@ -262,10 +262,7 @@ namespace GFGGame
             openCount++;
             openState[index] = true;
             _ui.m_loaMask.visible = false;
-            if (openCount == itemList.Count)
-            {
-                _ui.m_loaOpen.visible = false;
-            }
+
         }
         private void OnClickItemTips(EventContext context)
         {
@@ -303,6 +300,7 @@ namespace GFGGame
                     yield return UpdateTime(i);
                 }
             }
+            _ui.m_loaMask.visible = false;
         }
         private IEnumerator UpdateTime(int index)
         {
@@ -340,9 +338,6 @@ namespace GFGGame
         }
         private void PlayComplete()
         {
-            _ui.m_loaMask.visible = false;
-            _ui.m_loaOpen.visible = false;
-
             if (newCardList.Count > 0)
             {
                 ViewManager.Show<LuckyBoxNewCardView>(new object[] { newCardList, newItemList });

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