zhaoyang 3 vuotta sitten
vanhempi
commit
3ec087255b

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit 94d5327b9ee7c302ab42dd243b4a89eec168babb
+Subproject commit b636ac8cba78d05655d4b7087214ee9f4251eb8e

+ 2 - 24
GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

@@ -4,30 +4,8 @@ namespace GFGGame
 {
     public class StudioDataManager : SingletonBase<StudioDataManager>
     {
-        private Dictionary<string, List<StudioCfg>> _studioCfgByViewName;
 
-        public List<StudioCfg> GetStudioCfgListByViewName(string name)
-        {
-            if (_studioCfgByViewName == null)
-            {
-                _studioCfgByViewName = new Dictionary<string, List<StudioCfg>>();
-                StudioCfg[] cfgs = StudioCfgArray.Instance.dataArray;
-                for (int i = 0; i < cfgs.Length; i++)
-                {
-                    string viewName = cfgs[i].funId;
-                    if (!_studioCfgByViewName.ContainsKey(viewName))
-                    {
-                        _studioCfgByViewName[viewName] = new List<StudioCfg>();
-                    }
-                    _studioCfgByViewName[viewName].Add(cfgs[i]);
-                }
-            }
-            if (!_studioCfgByViewName.ContainsKey(name))
-            {
-                PromptController.Instance.ShowFloatTextPrompt(name + "配置不存在");
-                return null;
-            }
-            return _studioCfgByViewName[name];
-        }
+
+
     }
 }

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

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

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

@@ -25,7 +25,8 @@ namespace GFGGame
         {
 
             _ui.m_c1.selectedIndex = 0;
-            this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).FullName)[0];
+
+            this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).Name)[0];
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             base.OnShown();

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

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using FairyGUI;
 using UI.Studio;
+using UnityEngine;
 
 namespace GFGGame
 {
@@ -24,7 +25,9 @@ namespace GFGGame
         protected override void OnShown()
         {
             _ui.m_c1.selectedIndex = 1;
-            _ui.m_listProperty.numItems = StudioDataManager.Instance.GetStudioCfgListByViewName(typeof(StudioPropertyView).FullName).Count;
+            _ui.m_listProperty.numItems = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name).Length;
+            _ui.m_listProperty.selectedIndex = 0;
+            this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name)[0];
             base.OnShown();
 
         }
@@ -43,13 +46,12 @@ namespace GFGGame
         {
             GButton item = obj.asButton;
 
-            item.data = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).FullName)[index];
+            item.data = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name)[index];
         }
         private void OnClickListProperty(EventContext context)
         {
             GButton item = (context.data as GObject).asButton;
 
-            // UI_ListPropertyItem item = UI_ListPropertyItem.Proxy(context.data as GObject);
             this.studioCfg = item.data as StudioCfg;
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;

+ 8 - 8
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -51,10 +51,10 @@ namespace GFGGame
         /// <param name="hideOthers">�Ƿ�ر�������ͼ</param>
         public static void Show(string viewName, object viewData = null, object[] goBackParams = null, bool hideOthers = false, bool resetGobackParams = false)
         {
-            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(viewName))
-            {
-                return;
-            }
+            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(viewName.Split('.')[1]))
+            // {
+            //     return;
+            // }
             if (hideOthers)
             {
                 HideAllView(viewName);
@@ -116,10 +116,10 @@ namespace GFGGame
         public static bool Show<T>(object viewData = null, object[] goBackParams = null, bool hideOthers = false, bool resetGobackParams = false) where T : class, new()
         {
             string viewName = typeof(T).FullName;
-            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(viewName))
-            {
-                return false;
-            }
+            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(viewName))
+            // {
+            //     return false;
+            // }
             if (hideOthers)
             {
                 HideAllView(viewName);

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes