Browse Source

添加寻奇访胜UI特效

leiyasi 1 year ago
parent
commit
12f7a0ea4d

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Travel/UI_Button2.cs

@@ -7,6 +7,8 @@ namespace UI.Travel
     public partial class UI_Button2
     {
         public GButton target;
+        public GGraph m_btnGo_eff;
+        public GGraph m_btnGo_db_eff;
         public GLoader m_loaIcon;
         public GTextField m_txtCount;
         public const string URL = "ui://jitclg1gwono4";
@@ -56,11 +58,15 @@ namespace UI.Travel
 
         private void Init(GComponent comp)
         {
+            m_btnGo_eff = (GGraph)comp.GetChild("btnGo_eff");
+            m_btnGo_db_eff = (GGraph)comp.GetChild("btnGo_db_eff");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_txtCount = (GTextField)comp.GetChild("txtCount");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_btnGo_eff = null;
+            m_btnGo_db_eff = null;
             m_loaIcon = null;
             m_txtCount = null;
             if(disposeTarget && target != null)

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Travel/UI_Button6.cs

@@ -7,6 +7,7 @@ namespace UI.Travel
     public partial class UI_Button6
     {
         public GButton target;
+        public GGraph m_btnGet_eff;
         public Transition m_t0;
         public const string URL = "ui://jitclg1gwono1c";
         public const string PACKAGE_NAME = "Travel";
@@ -55,10 +56,12 @@ namespace UI.Travel
 
         private void Init(GComponent comp)
         {
+            m_btnGet_eff = (GGraph)comp.GetChild("btnGet_eff");
             m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_btnGet_eff = null;
             m_t0 = null;
             if(disposeTarget && target != null)
             {

+ 9 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Travel/UI_TravelUI.cs

@@ -10,9 +10,12 @@ namespace UI.Travel
         public Controller m_c1;
         public Controller m_c2;
         public GLoader m_loaBg;
+        public GGraph m_bg_eff;
         public GComponent m_comValueBar;
         public GButton m_btnback;
+        public GGraph m_travellingDB_eff;
         public GTextField m_txtTime;
+        public GGraph m_txt_eff;
         public GButton m_btnTips;
         public GTextField m_txtTips;
         public GGroup m_grpTips;
@@ -70,9 +73,12 @@ namespace UI.Travel
             m_c1 = comp.GetController("c1");
             m_c2 = comp.GetController("c2");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_bg_eff = (GGraph)comp.GetChild("bg_eff");
             m_comValueBar = (GComponent)comp.GetChild("comValueBar");
             m_btnback = (GButton)comp.GetChild("btnback");
+            m_travellingDB_eff = (GGraph)comp.GetChild("travellingDB_eff");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_txt_eff = (GGraph)comp.GetChild("txt_eff");
             m_btnTips = (GButton)comp.GetChild("btnTips");
             m_txtTips = (GTextField)comp.GetChild("txtTips");
             m_grpTips = (GGroup)comp.GetChild("grpTips");
@@ -86,9 +92,12 @@ namespace UI.Travel
             m_c1 = null;
             m_c2 = null;
             m_loaBg = null;
+            m_bg_eff = null;
             m_comValueBar = null;
             m_btnback = null;
+            m_travellingDB_eff = null;
             m_txtTime = null;
+            m_txt_eff = null;
             m_btnTips = null;
             m_txtTips = null;
             m_grpTips = null;

+ 17 - 1
GameClient/Assets/Game/HotUpdate/Views/Travel/TravelView.cs

@@ -1,5 +1,6 @@
 using ET;
 using FairyGUI;
+using System.Collections.Generic;
 using UI.Travel;
 using UnityEngine;
 
@@ -9,9 +10,18 @@ namespace GFGGame
     {
         private UI_TravelUI _ui;
         private ValueBarController _valueBarController;
+        private Dictionary<string, EffectUI> _effectUIDic = new Dictionary<string, EffectUI>();
 
         public override void Dispose()
         {
+            // Clear Effect
+            foreach (var v in _effectUIDic)
+            {
+                EffectUIPool.Recycle(v.Value);
+            }
+
+            _effectUIDic.Clear();
+
             if (_valueBarController != null)
             {
                 _valueBarController.Dispose();
@@ -46,6 +56,12 @@ namespace GFGGame
             _ui.m_btnFieldGuide.onClick.Add(OnBtnFieldGuideClick);
 
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("cj_bg_ychm");
+
+            _effectUIDic.Add("XQFS_Kuang_All", EffectUIPool.CreateEffectUI(_ui.m_bg_eff, "ui_HaiZhiShi", "XQFS_Kuang_All"));
+            // 省略号特效
+            _effectUIDic.Add("XQFS_Text_Loading", EffectUIPool.CreateEffectUI(_ui.m_txt_eff, "ui_HaiZhiShi", "XQFS_Text_Loading"));
+            _effectUIDic.Add("XQFS_Button_YouLi", EffectUIPool.CreateEffectUI(_ui.m_btnGo.m_btnGo_eff, "ui_HaiZhiShi", "XQFS_Button_YouLi"));
+            _effectUIDic.Add("XQFS_XinFeng_ComBack", EffectUIPool.CreateEffectUI(_ui.m_btnGet.m_btnGet_eff, "ui_HaiZhiShi", "XQFS_XinFeng_ComBack"));
         }
 
         protected override void AddEventListener()
@@ -111,7 +127,7 @@ namespace GFGGame
                 UpdateView();
             }
 
-            _ui.m_txtTime.text = string.Format("大约{0}后归来..", TimeUtil.FormattingTime(curTime, endTime));
+            _ui.m_txtTime.text = string.Format("大约{0}后归来", TimeUtil.FormattingTime(curTime, endTime));
         }
 
         private void OnBtnBackClick()

BIN
GameClient/Assets/ResIn/UI/Travel/Travel_fui.bytes