Browse Source

工作室

zhaoyang 3 năm trước cách đây
mục cha
commit
5cf10d4b40

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

@@ -23,11 +23,12 @@ namespace GFGGame
 
 
         protected override void OnShown()
         protected override void OnShown()
         {
         {
-            base.OnShown();
             _ui.m_c1.selectedIndex = 0;
             _ui.m_c1.selectedIndex = 0;
-            this.studioCfg = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioFabricView).FullName)[0];
+            this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).FullName)[0];
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            base.OnShown();
+
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()

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

@@ -23,12 +23,12 @@ namespace GFGGame
 
 
         protected override void OnShown()
         protected override void OnShown()
         {
         {
-            base.OnShown();
+
             _ui.m_c1.selectedIndex = 0;
             _ui.m_c1.selectedIndex = 0;
-            this.studioCfg = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioMetalView).FullName)[0];
+            this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).FullName)[0];
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
-
+            base.OnShown();
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()

+ 3 - 4
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioPropertyView.cs

@@ -23,11 +23,10 @@ namespace GFGGame
 
 
         protected override void OnShown()
         protected override void OnShown()
         {
         {
-            base.OnShown();
             _ui.m_c1.selectedIndex = 1;
             _ui.m_c1.selectedIndex = 1;
-
-
             _ui.m_listProperty.numItems = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioPropertyView).FullName).Count;
             _ui.m_listProperty.numItems = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioPropertyView).FullName).Count;
+            base.OnShown();
+
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()
@@ -44,7 +43,7 @@ namespace GFGGame
         {
         {
             GButton item = obj.asButton;
             GButton item = obj.asButton;
 
 
-            item.data = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioPropertyView).FullName)[index];
+            item.data = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).FullName)[index];
         }
         }
         private void OnClickListProperty(EventContext context)
         private void OnClickListProperty(EventContext context)
         {
         {

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs

@@ -35,12 +35,12 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            int isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName) ? 1 : 0;
+            int isopen = 1;// FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName) ? 1 : 0;
             _ui.m_comMetal.m_c1.selectedIndex = isopen;
             _ui.m_comMetal.m_c1.selectedIndex = isopen;
-            isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName) ? 1 : 0; ;
-            _ui.m_comFabric.m_c1.selectedIndex = isopen;
-            isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName) ? 1 : 0;
+            //isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName) ? 1 : 0; ;
             _ui.m_comFabric.m_c1.selectedIndex = isopen;
             _ui.m_comFabric.m_c1.selectedIndex = isopen;
+            // isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName) ? 1 : 0;
+            _ui.m_comProperty.m_c1.selectedIndex = isopen;
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()