axmol/cocos/scripting/lua-bindings/script/cocos2d/deprecated.lua

16 lines
491 B
Lua
Raw Normal View History

2019-11-23 20:27:39 +08:00
function schedule(node, callback, delay)
local delay = cc.DelayTime:create(delay)
local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback))
local action = cc.RepeatForever:create(sequence)
node:runAction(action)
return action
end
function performWithDelay(node, callback, delay)
local delay = cc.DelayTime:create(delay)
local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback))
node:runAction(sequence)
return sequence
end