定时器
每帧调用一次
local i=0
local function update()
i=i+1
if i>10 then
layer:unscheduleUpdate()
end
print("update")
end
layer:scheduleUpdateWithPriorityLua(update,0) --0为优先级
local function tick() end cc.Director:getInstance():getScheduler():scheduleScriptFunc(tick, 0, false)