Browse Source

副本,织物修复,动效添加

zhangyuqian 1 year ago
parent
commit
3723b07187

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListItem.cs

@@ -12,6 +12,7 @@ namespace UI.Studio
         public GLoader m_loaIcon;
         public GImage m_imgLock;
         public GTextField m_txtTitle;
+        public Transition m_test;
         public const string URL = "ui://xz8kxrecn3xha";
         public const string PACKAGE_NAME = "Studio";
         public const string RES_NAME = "ListItem";
@@ -64,6 +65,7 @@ namespace UI.Studio
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_imgLock = (GImage)comp.GetChild("imgLock");
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
+            m_test = comp.GetTransition("test");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -72,6 +74,7 @@ namespace UI.Studio
             m_loaIcon = null;
             m_imgLock = null;
             m_txtTitle = null;
+            m_test = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 22 - 3
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFabricView.cs

@@ -8,7 +8,7 @@ namespace GFGGame
     //织物副本
     public class StudioFabricView : StudioBaseView
     {
-
+        private int _time = 0;
         public override void Dispose()
         {
             base.Dispose();
@@ -32,19 +32,38 @@ namespace GFGGame
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(this._studioCfg.type, this._studioCfg.subType, this._studioCfg.id);
             list.numItems = this.storyLevelCfgs.Count;
             list.ScrollToView(curIndex);
-
             base.OnShown();
 
+            //add by zyq
+            for (int i = 0; i < list.numChildren; i++)
+            {
+                list.GetChildAt(i).visible = false;
+            }
+            _time = 0;
+            Timers.inst.Add(0.2f, list.numChildren, OnTimerUpdate, 1);
+
+           
+
         }
 
         protected override void OnHide()
         {
-            base.OnHide();
+            base.OnHide(); 
+            Timers.inst.Remove(OnTimerUpdate);
         }
 
         private void OnClickBtnBack()
         {
             ViewManager.GoBackFrom(typeof(StudioFabricView).FullName);
         }
+
+        private void OnTimerUpdate(object param)
+        {
+            list.GetChildAt(_time).visible = true;
+            UI_ListItem listItem = UI_ListItem.Proxy(list.GetChildAt(_time++));
+            //播放动效
+            listItem.m_test.Play();
+            UI_ListItem.ProxyEnd();
+        }
     }
 }