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