Browse Source

副本——书简修复,添加动效

zhangyuqian 1 year ago
parent
commit
818e1c6fcb

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListLevelItem.cs

@@ -16,6 +16,8 @@ namespace UI.Studio
         public GImage m_imgLockBg;
         public GImage m_imgLock;
         public GGroup m_grpLock;
+        public Transition m_ToLeft;
+        public Transition m_ToRight;
         public const string URL = "ui://xz8kxrecv4822p";
         public const string PACKAGE_NAME = "Studio";
         public const string RES_NAME = "ListLevelItem";
@@ -72,6 +74,8 @@ namespace UI.Studio
             m_imgLockBg = (GImage)comp.GetChild("imgLockBg");
             m_imgLock = (GImage)comp.GetChild("imgLock");
             m_grpLock = (GGroup)comp.GetChild("grpLock");
+            m_ToLeft = comp.GetTransition("ToLeft");
+            m_ToRight = comp.GetTransition("ToRight");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -85,6 +89,8 @@ namespace UI.Studio
             m_imgLockBg = null;
             m_imgLock = null;
             m_grpLock = null;
+            m_ToLeft = null;
+            m_ToRight = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 30 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingView.cs

@@ -13,6 +13,7 @@ namespace GFGGame
         private StudioCfg _studioCfg;
         private List<StoryLevelCfg> _storyLevelCfgs;
         private int _viewData = 0;
+        private int itemIndex = 0;
 
         public override void Dispose()
         {
@@ -68,6 +69,8 @@ namespace GFGGame
 
             UpdateView();
             Timers.inst.AddUpdate(CheckGuide);
+
+            UpdateItem();
         }
 
         protected override void OnHide()
@@ -75,6 +78,7 @@ namespace GFGGame
             base.OnHide();
             _valueBarController.OnHide();
             Timers.inst.Remove(CheckGuide);
+            Timers.inst.Remove(AddItemUpdate);
 
         }
         protected void GoBackFrom()
@@ -253,5 +257,31 @@ namespace GFGGame
             GuideController.TryCompleteGuide(ConstGuideId.STUDIO_FILING, 5);
 
         }
+
+        private void UpdateItem()
+        {
+            for (int i = 0; i < _ui.m_list.numChildren; i++)
+            {
+                _ui.m_list.GetChildAt(i).visible = false;
+            }
+            itemIndex = 0;
+            Timers.inst.Add(0.2f, _ui.m_list.numChildren, AddItemUpdate, 1);
+        }
+
+        private void AddItemUpdate(object param)
+        {
+            _ui.m_list.GetChildAt(itemIndex).visible = true;
+            UI_ListLevelItem item = UI_ListLevelItem.Proxy(_ui.m_list.GetChildAt(itemIndex));
+            if (itemIndex % 2 == 0)
+            {
+                item.m_ToLeft.Play();
+            }
+            else
+            {
+                item.m_ToRight.Play();
+            }
+            itemIndex++;
+            UI_ListLevelItem.ProxyEnd();
+        }
     }
 }

BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes