請教關於framework.api.Timer與CCScheduler的問題

1.在framework / api / https://github.com/chukong/quick-cocos2d-x/blob/4544fae1cf527ebd1399089953c0a1ec0253656b/framework/api/Timer.lua

有提示到 “module api.Timer is deprecated, please use cc.utils.Timer”

但在framework / cc / https://github.com/chukong/quick-cocos2d-x/tree/4544fae1cf527ebd1399089953c0a1ec0253656b/framework/cc/utils / 中並沒有找到相關Timer的 lua code

想請問正確的位置或著是正確的使用方式?

2.在CCScheduler 中

想要達成所有動畫以及計時器暫停的效果(pause & resume)
但發現這三個functions沒有binding到lua

pauseAllTargets();
pauseAllTargetsWithMinPriority(int nMinPriority);
void resumeTargets(CCSet* targetsToResume);

目前是使用

setTimeScale(0) --達成暫停(pause)
setTimeScale(1) --恢復暫停(resume)

想請問這樣的使用方法正確嗎?還是要自己binding到lua?
或著有更好地使用方法?
:886:

謝謝

1, 新的 Timer 还没写。。。

  1. 这三个方法确实没有绑定,因为 quick 里有些功能也是用 action 实现的,如果调用 pauseAllTargets 会导致这些功能失效。例如 performWithDelay()。

如果你需要可以自己绑定这些方法。