- scheduler
self.scheduler = require("framework.scheduler")
local callViewHandler = nil
local function createCallView()
//添加自己逻辑
//执行一次后停止计时器
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)
网友评论