文件名称:lua游戏.lua
文件大小:10KB
文件格式:LUA
更新时间:2021-05-16 21:21:58
lua youxi
local function prepareGC() collectgarbage("setpause", 100) collectgarbage("setstepmul", 5000) end local function sendInitProgressEvent(percent, nextFunc) local event = cc.EventCustom:new(Data.Event.application) event:setUserString("INIT_PROGRESS_"..percent) lc.Dispatcher:dispatchEvent(event) performWithDelay(lc.Director:getRunningScene(), nextFunc, 0.01) end local function swap(array, index1, index2) array[index1], array[index2] = array[index2], array[index1] end