Jelajahi Sumber

幸运折扣按钮抖动动效

huangxiaoyue 1 tahun lalu
induk
melakukan
c148963302

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_Button9.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.LuckyBox
+{
+    public partial class UI_Button9
+    {
+        public GButton target;
+        public Transition m_btnLuckyDiscount_loop;
+        public const string URL = "ui://drx9d1usahsjtqx";
+        public const string PACKAGE_NAME = "LuckyBox";
+        public const string RES_NAME = "Button9";
+        private static UI_Button9 _proxy;
+
+        public static UI_Button9 Create(GObject gObject = null)
+        {
+            var ui = new UI_Button9();
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_Button9 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Button9();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_btnLuckyDiscount_loop = comp.GetTransition("btnLuckyDiscount_loop");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_btnLuckyDiscount_loop = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_Button9.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 00b7f7ce3a4e93f4aba62b7d00b969b0
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -12,12 +12,11 @@ namespace UI.LuckyBox
         public GButton m_btnBack;
         public GComponent m_valueBar;
         public GTextField m_txtTime;
-        public GButton m_btnLuckyDiscount;
+        public UI_Button9 m_btnLuckyDiscount;
         public GButton m_btnGiftBag;
         public UI_ComBagTime m_comBagTime;
         public GButton m_btnShop;
         public GButton m_btnReward;
-        public Transition m_btnLuckyDiscount_loop;
         public const string URL = "ui://drx9d1usmbf1tad";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckyBoxActivityUI";
@@ -70,12 +69,11 @@ namespace UI.LuckyBox
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
-            m_btnLuckyDiscount = (GButton)comp.GetChild("btnLuckyDiscount");
+            m_btnLuckyDiscount = (UI_Button9)UI_Button9.Create(comp.GetChild("btnLuckyDiscount"));
             m_btnGiftBag = (GButton)comp.GetChild("btnGiftBag");
             m_comBagTime = (UI_ComBagTime)UI_ComBagTime.Create(comp.GetChild("comBagTime"));
             m_btnShop = (GButton)comp.GetChild("btnShop");
             m_btnReward = (GButton)comp.GetChild("btnReward");
-            m_btnLuckyDiscount_loop = comp.GetTransition("btnLuckyDiscount_loop");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -85,13 +83,13 @@ namespace UI.LuckyBox
             m_btnBack = null;
             m_valueBar = null;
             m_txtTime = null;
+            m_btnLuckyDiscount.Dispose();
             m_btnLuckyDiscount = null;
             m_btnGiftBag = null;
             m_comBagTime.Dispose();
             m_comBagTime = null;
             m_btnShop = null;
             m_btnReward = null;
-            m_btnLuckyDiscount_loop = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -65,7 +65,7 @@ namespace GFGGame
             _ui.m_btnReward.onClick.Add(OnClickBtnReward);
             _ui.m_btnShop.onClick.Add(OnClickBtnShop);
             _ui.m_btnGiftBag.onClick.Add(OnClickBtnGiftBag);
-            _ui.m_btnLuckyDiscount.onClick.Add(OnClickBtnLuckyDiscount);
+            _ui.m_btnLuckyDiscount.target.onClick.Add(OnClickBtnLuckyDiscount);
             _effectUIDic.Add("Button_public", EffectUIPool.CreateEffectUI(_ui.m_comBox.m_btnBuyTen_eff, "ui_LuckyBox", "Button_public"));
             _effectUIDic.Add("Button_Text_DianCang", EffectUIPool.CreateEffectUI(_ui.m_comBox.m_Special_eff, "ui_LuckyBox", "Button_Text_DianCang"));
         }
@@ -197,8 +197,8 @@ namespace GFGGame
                 ActivityGlobalDataManager.Instance.GetActivityInfoByType(ActivityType.LuckyDiscount);
             var list = activityInfoByTypeList
                 .Where(a => a.EndTime > TimeInfo.Instance.ServerNow()).ToList();
-            _ui.m_btnLuckyDiscount.visible = ActivityDataManager.Instance.allLimitStlycTimes >= 20 && remainBuyNum != 0 && list.Count > 0;
-            if (LuckyBoxDataManager.Instance.OPEN_LUCKY_DISCONT && _ui.m_btnLuckyDiscount.visible) {
+            _ui.m_btnLuckyDiscount.target.visible = ActivityDataManager.Instance.allLimitStlycTimes >= 20 && remainBuyNum != 0 && list.Count > 0;
+            if (LuckyBoxDataManager.Instance.OPEN_LUCKY_DISCONT && _ui.m_btnLuckyDiscount.target.visible) {
                 LuckyBoxDataManager.Instance.OPEN_LUCKY_DISCONT = false;
                 ViewManager.Show<RushSaleGiftBoxView>(new object[] { ActivityType.LuckyDiscount, this.viewData });
             }

TEMPAT SAMPAH
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes