-- --------------------------------------------------------
|
-- [Author]: 第二世界
|
-- [ Date ]: #DateTime#
|
-- --------------------------------------------------------
|
|
require('global.stringutil')
|
|
#ClassName#Config = {}
|
#ClassName#Config.Configs={}
|
|
function #ClassName#Config.Init()
|
local path
|
if CS.AssetSource.refdataFromEditor then
|
path = CS.ResourcesPath.CONFIG_FODLER .. '/#ClassName#.txt'
|
else
|
path = CS.AssetVersionUtility.GetAssetFilePath('config/#ClassName#.txt')
|
end
|
|
local datas = CS.FileExtersion.ReadFileAllLines(path)
|
local length = datas.length
|
local lines = datas.lines
|
|
for i = 3, length - 1 do
|
local contents = Split(lines[i], '\t')
|
local key = contents[1]
|
local subTable = {}
|
#Read#
|
#ClassName#Config.Configs[key] = subTable
|
end
|
end
|
|
function #ClassName#Config.Get(id)
|
return #ClassName#Config.Configs[tostring(id)]
|
end
|