浏览代码

把公共代码挪到公共目录

hexiaojie 1 年之前
父节点
当前提交
32b576fd49

+ 0 - 68
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/DressUpConfigUtil.cs

@@ -1,68 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using UnityEngine;
-using static GFGGame.ConfigUtil;
-
-namespace GFGGame
-{
-    public class DressUpConfigUtil
-    {
-        private static int loadCount;
-
-        public static int LoadCount { get => loadCount; set => loadCount = value; }
-
-        //多列值查询多个数据
-        public static async Task GetCfgsAsync<T>(string tableName, string[] colNames, string[] colValues, Dictionary<string, List<T>> cfgsDic, HandleCfgInGroupAction<T> action = null) where T : ICfg, new()
-        {
-            string key = string.Join("_", colValues);
-            List<T> cfgs = null;
-            if (cfgsDic != null && cfgsDic.ContainsKey(key))
-            {
-                cfgs = cfgsDic[key];
-                return;
-            }
-            cfgs = new List<T>();
-            SQLiteHelper.Instance.OpenConnection();
-            int count = 0;
-            try
-            {
-                var reader = SQLiteHelper.Instance.ReadTable(tableName, colNames, colValues);
-                while (reader.Read())
-                {
-                    var cfg = new T();
-                    cfg.setData(reader);
-                    cfgs.Add(cfg);
-                    action?.Invoke(cfg);
-                    ItemCfg itemCfg = cfg as ItemCfg;
-                    if (itemCfg.isHide != 0)
-                    {
-                        continue;
-                    }
-                    ++count;
-                    ++LoadCount;
-                    if (count == 5)
-                    {
-                        count = 0;
-                        await Task.Delay(1);
-                    }
-                }
-                if (cfgsDic != null)
-                {
-                    cfgsDic.Add(key, cfgs);
-                }
-            }
-            catch (System.Exception e)
-            {
-                ET.Log.Error(e);
-            }
-            finally
-            {
-                SQLiteHelper.Instance.CloseConnection();
-            }
-
-
-        }
-
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/DressUpConfigUtil.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ddbf811fca3f4f445a38bdbd2a51cf89
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: