-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBangDreamUtils.lua
42 lines (35 loc) · 1.06 KB
/
BangDreamUtils.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
local BangDreamUtils = {}
--加载歌曲信息
function BangDreamUtils.LoadMusicInfo(songId,difficulty)
local soundInfoPath = "SoundInfo_Lua."..songId.."_"..difficulty
local fullPath = userPath().."/lua/SoundInfo_Lua/"..songId.."_"..difficulty..".lua"
local isExist = isFileExist(fullPath)
if(not isExist) then
nLog('文件不存在:'..fullPath)
return nil
end
local soundInfo = require(soundInfoPath)
return soundInfo
end
function BangDreamUtils.GetMusicAllType(songId,difficulty)
local musicInfo = BangDreamUtils.LoadMusicInfo(songId,difficulty)
if(musicInfo == nil) then
return
end
for i=1,#musicInfo do
BangDreamUtils.allType[musicInfo[i].type] = true
end
end
function BangDreamUtils.GetAllSoundInfoType()
BangDreamUtils.allType = {}
for i=1,100 do
for j=0,4 do
BangDreamUtils.GetMusicAllType(i,j)
end
end
for k,v in pairs(BangDreamUtils.allType) do
nLog('类型:'..k)
end
BangDreamUtils.allType = nil
end
return BangDreamUtils