Эх сурвалжийг харах

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

guodong 1 жил өмнө
parent
commit
f4d2150713

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CreateRole/UI_CreateRoleUI.cs

@@ -9,6 +9,7 @@ namespace UI.CreateRole
         public GComponent target;
         public GLoader m_loaBg;
         public UI_EnvelopeModel m_envelopeModel;
+        public Transition m_t_Open;
         public const string URL = "ui://5al8chbdxt5s0";
         public const string PACKAGE_NAME = "CreateRole";
         public const string RES_NAME = "CreateRoleUI";
@@ -58,12 +59,14 @@ namespace UI.CreateRole
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_envelopeModel = (UI_EnvelopeModel)UI_EnvelopeModel.Create(comp.GetChild("envelopeModel"));
+            m_t_Open = comp.GetTransition("t_Open");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
             m_envelopeModel.Dispose();
             m_envelopeModel = null;
+            m_t_Open = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -14,6 +14,7 @@ namespace UI.Studio
         public GTextField m_txtName;
         public GLoader m_loaIcon;
         public GImage m_imgLock;
+        public Transition m_test;
         public const string URL = "ui://xz8kxrecf2bf2x";
         public const string PACKAGE_NAME = "Studio";
         public const string RES_NAME = "ListPorcelainItem";
@@ -68,6 +69,7 @@ namespace UI.Studio
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_imgLock = (GImage)comp.GetChild("imgLock");
+            m_test = comp.GetTransition("test");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -78,6 +80,7 @@ namespace UI.Studio
             m_txtName = null;
             m_loaIcon = null;
             m_imgLock = null;
+            m_test = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/CreateRole/CreateRoleView.cs

@@ -79,14 +79,13 @@ namespace GFGGame
                     _ui.m_envelopeModel.m_t_Idle.Play(-1, 0, null);
                     break;
                 case State.OPEN:
-                    //_effectUIDic["FX_player"].GetObj().GetComponentInChildren<Animator>().SetTrigger("Close");
                     EffectUIPool.Recycle(_effectUIDic["FX_player"]);
                     _effectUIDic.Remove("FX_player");
                     _effectUIDic.Add("FX_ShanZi", EffectUIPool.CreateEffectUI(_ui.m_envelopeModel.m_ShanZiEffectHolder, "ui_CreateRoleUI/After_Open", "FX_ShanZi"));
                     _effectUIDic.Add("FX_Niao", EffectUIPool.CreateEffectUI(_ui.m_envelopeModel.m_NiaoEffectHolder, "ui_CreateRoleUI/After_Open", "FX_Niao"));
                     _ui.m_envelopeModel.m_envelope.target.touchable = false;
                     _ui.m_envelopeModel.m_t_Idle.Stop();
-                    _ui.m_envelopeModel.m_t_Open.Play();
+                    _ui.m_t_Open.Play();
                     break;
             }
         }

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -34,7 +34,7 @@ namespace GFGGame
         private int _wordIndex = 0;
         private bool _isShowLetters;
         private string _currentWords;
-        private string _stroyStartID;
+        private string _storyStartID;
 
         //屏幕效果中
         private Action<object> _onScreenEffectComplete;
@@ -114,7 +114,7 @@ namespace GFGGame
             UpdateSpeedUpBtn();
             _dialogListLookBack = new List<string>();
             object[] datas = viewData as object[];
-            _stroyStartID = (string)datas[0];
+            _storyStartID = (string)datas[0];
             bool skipable = (bool)datas[1];
             _onCompleteStoryDialogCall = (OnCompleteStoryDialogCall)datas[2];
             if (datas.Length > 3)
@@ -133,11 +133,11 @@ namespace GFGGame
 
             _ui.m_btnSkip.visible = skipable;
 
-            ShowNextStep(_stroyStartID);
+            ShowNextStep(_storyStartID);
 
             _ui.m_c1.selectedIndex = 0;
             _ui.m_btnAutoPlay.selected = false;
-            if (_stroyStartID == MainStoryDataManager.priorId)
+            if (_storyStartID == MainStoryDataManager.priorId)
             {
                 _ui.m_c1.selectedIndex = 1;
                 // _ui.m_btnAutoPlay.selected = true;
@@ -192,7 +192,7 @@ namespace GFGGame
         {
             if (_ui.m_btnSkip.enabled)
             {
-                ViewManager.Show<StoryLookBackView>(_stroyStartID);
+                ViewManager.Show<StoryLookBackView>(_storyStartID);
             }
             else
             {

+ 27 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBaseView.cs

@@ -14,6 +14,7 @@ namespace GFGGame
         private GTextField _txtTime;
         private GTextField _txtNum;
         private GButton _btnBuy;
+        private int _time = 0;
 
         protected StudioCfg _studioCfg;
         protected List<StoryLevelCfg> storyLevelCfgs;
@@ -79,6 +80,9 @@ namespace GFGGame
             // _valueBarController.Controller(1);
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gzs_bjbj");
 
+            //add by zyq
+            UpdateItem();
+
             UpdateView();
             Timers.inst.Add(1, 0, UpdateShowTime);
 
@@ -93,6 +97,8 @@ namespace GFGGame
             storyLevelCfgs = null;
             Timers.inst.Remove(UpdateShowTime);
 
+            Timers.inst.Remove(OnTimerUpdate);
+
         }
         protected override void RemoveEventListener()
         {
@@ -180,5 +186,26 @@ namespace GFGGame
         {
             ViewManager.Show<StudioBuyNumView>(this._studioCfg.limit);
         }
+
+        private void UpdateItem()
+        {
+            for (int i = 0; i < list.numChildren; i++)
+            {
+                list.GetChildAt(i).visible = false;
+            }
+            _time = 0;
+            Timers.inst.Add(0.2f, list.numChildren, OnTimerUpdate, 1);
+        }
+        private void OnTimerUpdate(object param)
+        {
+            list.GetChildAt(_time).visible = true;
+            UI_ListItem listItem = UI_ListItem.Proxy(list.GetChildAt(_time++));
+            //播放动效
+            if (listItem.m_test != null)
+            {
+                listItem.m_test.Play();
+            }
+            UI_ListItem.ProxyEnd();
+        }
     }
 }

+ 0 - 19
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFabricView.cs

@@ -8,7 +8,6 @@ namespace GFGGame
     //织物副本
     public class StudioFabricView : StudioBaseView
     {
-        private int _time = 0;
         public override void Dispose()
         {
             base.Dispose();
@@ -34,22 +33,12 @@ namespace GFGGame
             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(); 
-            Timers.inst.Remove(OnTimerUpdate);
         }
 
         private void OnClickBtnBack()
@@ -57,13 +46,5 @@ namespace GFGGame
             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();
-        }
     }
 }

BIN
GameClient/Assets/ResIn/UI/CreateRole/CreateRole_fui.bytes