zhaoyang 2 years ago
parent
commit
6aa28042bd

+ 8 - 10
FGUIProject/assets/LuckyBox/components/ComCard.xml

@@ -1,14 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1020,736">
+<component size="948,970">
   <displayList>
   <displayList>
-    <loader id="n0_qdrt" name="bg" xy="0,0" size="1020,739" url="ui://drx9d1usqdrt14" autoSize="true"/>
-    <loader id="n1_qdrt" name="loaType" xy="630,234" size="43,168" aspect="true" url="ui://eg2y0ldpqdrt15" fill="scaleMatchWidth"/>
-    <loader id="n2_qdrt" name="loaIcon" xy="402,238" size="216,216" aspect="true" url="ui://eg2y0ldpkubi7e" fill="scaleMatchWidth"/>
-    <loader id="n3_qdrt" name="loaProperty" xy="356,257" size="50,50" aspect="true" url="ui://eg2y0ldp842s6k" fill="scaleMatchWidth"/>
-    <text id="n5_qdrt" name="txtDiscribe" xy="510,550" pivot="0.5,0" anchor="true" size="602,101" fontSize="34" color="#b4a188" autoSize="none" text="赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王"/>
-    <graph id="n6_dcro" name="holder" xy="509,363" size="1,1" touchable="false" type="rect"/>
-    <image id="n7_v95q" name="n7" src="v95q2r" fileName="images/hd_kkbt_1.png" xy="307,80" group="n8_v95q"/>
-    <text id="n4_qdrt" name="txtName" xy="510,115" pivot="0.5,0.5" anchor="true" size="100,64" group="n8_v95q" font="ui://eg2y0ldpwonotja" fontSize="48" color="#ac854e" text="服装"/>
-    <group id="n8_v95q" name="n8" xy="307,80" size="406,68"/>
+    <loader id="n0_qdrt" name="bg" xy="0,0" size="948,970" url="ui://drx9d1usqdrt14" autoSize="true"/>
+    <loader id="n1_qdrt" name="loaType" xy="693,211" size="54,224" url="ui://eg2y0ldpqdrt15" fill="scaleMatchWidth"/>
+    <loader id="n2_qdrt" name="loaIcon" xy="295,197" size="358,358" aspect="true" url="ui://eg2y0ldpkubi7e" fill="scaleMatchWidth"/>
+    <loader id="n3_qdrt" name="loaProperty" xy="256,234" size="60,60" aspect="true" url="ui://eg2y0ldp842s6k" fill="scaleMatchWidth"/>
+    <text id="n5_qdrt" name="txtDiscribe" xy="474,697" pivot="0.5,0" anchor="true" size="406,101" fontSize="30" color="#c2a773" autoSize="none" text="赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王"/>
+    <graph id="n6_dcro" name="holder" xy="467,473" size="1,1" touchable="false" type="rect"/>
+    <text id="n4_qdrt" name="txtName" xy="469,72" pivot="0.5,0.5" anchor="true" size="100,64" fontSize="48" color="#feeac2" text="服装"/>
   </displayList>
   </displayList>
 </component>
 </component>

BIN
FGUIProject/assets/LuckyBox/images/hd_dkdk_1.png


+ 11 - 8
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusView.cs

@@ -104,7 +104,7 @@ namespace GFGGame
             _ui.m_loaMask.visible = false;
             _ui.m_loaMask.visible = false;
             int[][] bonus = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.luckyBoxId).bonusArr;
             int[][] bonus = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.luckyBoxId).bonusArr;
             List<ItemData> itemDatas = ItemUtil.CreateItemDataList(bonus, LuckyBoxDataManager.Instance.times);
             List<ItemData> itemDatas = ItemUtil.CreateItemDataList(bonus, LuckyBoxDataManager.Instance.times);
-            ViewManager.Show<LuckyBoxNewDressView>(new object[] { itemDatas });
+            ViewManager.Show<LuckyBoxNewDressView>(itemDatas);
         }
         }
         private void ShowBonusList()
         private void ShowBonusList()
         {
         {
@@ -232,11 +232,13 @@ namespace GFGGame
                 if (cfg.itemType == ConstItemType.DRESS_UP)
                 if (cfg.itemType == ConstItemType.DRESS_UP)
                 {
                 {
                     List<ItemData> itemDatas = ItemUtil.CreateItemDataList(itemData.id, itemData.num);
                     List<ItemData> itemDatas = ItemUtil.CreateItemDataList(itemData.id, itemData.num);
-                    ViewManager.Show<LuckyBoxNewDressView>(new object[] { itemDatas });
+                    ViewManager.Show<LuckyBoxNewDressView>(itemDatas);
                 }
                 }
                 else if (cfg.itemType == ConstItemType.CARD)
                 else if (cfg.itemType == ConstItemType.CARD)
                 {
                 {
-                    ViewManager.Show<LuckyBoxNewCardView>(new object[] { itemData.id });
+                    List<int> list = new List<int>();
+                    list.Add(itemData.id);
+                    ViewManager.Show<LuckyBoxNewCardView>(new object[] { list, new List<ItemData>() });
                 }
                 }
             }
             }
             openCount++;
             openCount++;
@@ -309,15 +311,16 @@ namespace GFGGame
         {
         {
             _ui.m_loaMask.visible = false;
             _ui.m_loaMask.visible = false;
             _ui.m_loaOpen.visible = false;
             _ui.m_loaOpen.visible = false;
-            if (newItemList.Count > 0)
+
+            if (newCardList.Count > 0)
             {
             {
-                ViewManager.Show<LuckyBoxNewDressView>(new object[] { newItemList });
+                ViewManager.Show<LuckyBoxNewCardView>(new object[] { newCardList, newItemList }
+                );
             }
             }
-            if (newCardList.Count > 0)
+            else if (newItemList.Count > 0)
             {
             {
-                ViewManager.Show<LuckyBoxNewCardView>(newCardList);
+                ViewManager.Show<LuckyBoxNewDressView>(newItemList);
             }
             }
-
         }
         }
     }
     }
 }
 }

+ 12 - 7
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewCardView.cs

@@ -10,6 +10,7 @@ namespace GFGGame
     {
     {
         private UI_LuckyBoxNewCardUI _ui;
         private UI_LuckyBoxNewCardUI _ui;
         private List<int> _newCardList = new List<int>();
         private List<int> _newCardList = new List<int>();
+        private List<ItemData> _newDressList = new List<ItemData>();
         public override void Dispose()
         public override void Dispose()
         {
         {
             if (_ui != null)
             if (_ui != null)
@@ -38,9 +39,10 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            _newCardList = this.viewData as List<int>;
-
 
 
+            _newCardList = new List<int>((this.viewData as object[])[0] as List<int>);
+            _newDressList = new List<ItemData>((this.viewData as object[])[1] as List<ItemData>);
+            updateView();
 
 
         }
         }
         private void updateView()
         private void updateView()
@@ -63,14 +65,17 @@ namespace GFGGame
 
 
         private void OnClickBtnBg()
         private void OnClickBtnBg()
         {
         {
-            if (_newCardList.Count > 0)
-            {
-                updateView();
-            }
-            else
+            if (_newCardList.Count == 0)
             {
             {
                 this.Hide();
                 this.Hide();
+                if (_newDressList.Count > 0)
+                {
+                    ViewManager.Show<LuckyBoxNewDressView>(_newDressList);
+                }
+                return;
             }
             }
+            updateView();
+
         }
         }
     }
     }
 }
 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewDressView.cs

@@ -47,12 +47,12 @@ namespace GFGGame
 
 
 
 
             string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_zs");
             string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_zs");
-            // SceneController.AddObjectToView(gameObject, null, _ui.m_comCard.m_holder, resPath, out gameObject, out wrapper);
+            SceneController.AddObjectToView(gameObject, null, _ui.m_comCard.m_holder, resPath, out gameObject, out wrapper);
         }
         }
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            List<ItemData> rewardList = (this.viewData as object[])[0] as List<ItemData>;
+            List<ItemData> rewardList = this.viewData as List<ItemData>;
             if (_rewardList.Count > 0)
             if (_rewardList.Count > 0)
             {
             {
                 _rewardList.AddRange(rewardList);
                 _rewardList.AddRange(rewardList);

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_fui.bytes