zhaoyang 3 лет назад
Родитель
Сommit
6bcf8a6a0c

+ 3 - 2
FGUIProject/assets/LuckyBox/LuckyBoxCardUI.xml

@@ -12,9 +12,10 @@
     </component>
   </displayList>
   <transition name="t_open">
-    <item time="0" type="Scale" target="n0_qdrt" tween="true" startValue="0,0" endValue="1,1" duration="6" ease="Linear"/>
+    <item time="0" type="Scale" target="n0_qdrt" value="0,0"/>
+    <item time="3" type="Scale" target="n0_qdrt" tween="true" startValue="0,0" endValue="1,1" duration="3" ease="Expo.In"/>
   </transition>
   <transition name="t_close">
-    <item time="0" type="Scale" target="n0_qdrt" tween="true" startValue="1,1" endValue="0,0" duration="6" ease="Linear"/>
+    <item time="0" type="Scale" target="n0_qdrt" tween="true" startValue="1,1" endValue="0,0" duration="3" ease="Expo.In"/>
   </transition>
 </component>

+ 1 - 0
FGUIProject/assets/LuckyBox/components/ComCard.xml

@@ -7,5 +7,6 @@
     <loader id="n3_qdrt" name="loaProperty" xy="248,231" size="60,60" aspect="true" url="ui://eg2y0ldp842s6k" fill="scaleMatchWidth"/>
     <text id="n4_qdrt" name="txtName" xy="474,75" pivot="0.5,0.5" anchor="true" size="100,64" fontSize="48" color="#feeac2" text="服装"/>
     <text id="n5_qdrt" name="txtDiscribe" xy="474,656" pivot="0.5,0" anchor="true" size="360,235" fontSize="30" color="#c2a773" autoSize="height" text="赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王赵钱孙李周吴郑王"/>
+    <graph id="n6_dcro" name="holder" xy="473,484" size="1,1" touchable="false" type="rect"/>
   </displayList>
 </component>

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

@@ -13,6 +13,7 @@ namespace UI.LuckyBox
         public GLoader m_loaProperty;
         public GTextField m_txtName;
         public GTextField m_txtDiscribe;
+        public GGraph m_holder;
         public const string URL = "ui://drx9d1usqdrt1a";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComCard";
@@ -66,6 +67,7 @@ namespace UI.LuckyBox
             m_loaProperty = (GLoader)comp.GetChild("loaProperty");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_txtDiscribe = (GTextField)comp.GetChild("txtDiscribe");
+            m_holder = (GGraph)comp.GetChild("holder");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -75,6 +77,7 @@ namespace UI.LuckyBox
             m_loaProperty = null;
             m_txtName = null;
             m_txtDiscribe = null;
+            m_holder = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 12 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxCardView.cs

@@ -2,6 +2,7 @@
 using UnityEngine;
 using UI.LuckyBox;
 using System.Collections.Generic;
+using FairyGUI;
 
 namespace GFGGame
 {
@@ -12,9 +13,13 @@ namespace GFGGame
         private List<ItemData> _rewardList;
         private int _type = 0;//弹窗类型:0可跳过,1:首次获得物品不可跳过,2首次获得物品不可跳过,不弹获得套装界面
 
+        private GameObject gameObject;
+        private GoWrapper wrapper;
         public override void Dispose()
         {
             base.Dispose();
+            SceneController.DestroyObjectFromView(gameObject);
+
         }
 
         protected override void OnInit()
@@ -31,6 +36,8 @@ namespace GFGGame
             _ui.m_bg.onTouchBegin.Add(OnClickBg);
             _ui.m_btnPass.onClick.Add(OnClickBtnPass);
 
+            string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_zs");
+            SceneController.AddObjectToView(gameObject, null, _ui.m_comCard.m_holder, resPath, out gameObject, out wrapper);
         }
         protected override void OnShown()
         {
@@ -55,6 +62,7 @@ namespace GFGGame
 
             _ui.m_comCard.m_txtName.text = itemCfg.name;
             _ui.m_comCard.m_txtDiscribe.text = itemCfg.desc;
+            _ui.m_comCard.m_holder.visible = true;
 
             if (LuckyBoxDataManager.Instance.FirstRewardList.ContainsKey(_rewardList.Count - 1) == true)
             {
@@ -84,7 +92,10 @@ namespace GFGGame
 
             _ui.m_t_close.Play(() =>
             {
-                _ui.m_t_open.Play();
+                _ui.m_comCard.m_holder.visible = false;
+                _ui.m_t_open.Play(() =>
+                {
+                });
                 UpdateView();
             });
         }

+ 1 - 10
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -60,16 +60,7 @@ namespace GFGGame
         {
             _valueBarController.Dispose();
             _valueBarController = null;
-            // SceneController.DestroyObjectFromView(_effectObj0);
-            // SceneController.DestroyObjectFromView(_effectObj1);
-            // SceneController.DestroyObjectFromView(_effectObj2);
-            // SceneController.DestroyObjectFromView(_effectObj3);
-            // SceneController.DestroyObjectFromView(_effectObj4);
-            // SceneController.DestroyObjectFromView(_effectObj0_1);
-            // SceneController.DestroyObjectFromView(_effectObj1_1);
-            // SceneController.DestroyObjectFromView(_effectObj2_1);
-            // SceneController.DestroyObjectFromView(_effectObj3_1);
-            // SceneController.DestroyObjectFromView(_effectObj4_1);
+
             for (int i = 0; i < _btns.Length; i++)
             {
                 SceneController.DestroyObjectFromView(_effects[i]);

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