- scheduler
self.scheduler = require("framework.scheduler")
local callViewHandler = nil
local function createCallView()
//添加自己邏輯
//執(zhí)行一次后停止計(jì)時(shí)器
if callViewHandler then
self.scheduler.unscheduleGlobal(callViewHandler)
callViewHandler = nil
end
end
callViewHandler = self.scheduler.scheduleGlobal(handler(self,createCallView), 0.01)
2.lazy.delayCall
local callViewHandler = lazy.delayCall(0.1,function()
end)
3.action
local action1 = cc.DelayTime:create(0.1)
local action2 = cc.CallFunc:create(function()
end)
local action = cc.Sequence:create(action1,action2)
self:runAction(action)