Cocos2d 应用中的 NSTimer [英] NSTimer in Cocos2d Application

查看:14
本文介绍了Cocos2d 应用中的 NSTimer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Cocos2d 文档中写到使用 NSTimer 不是一个好主意.为什么不推荐使用 NSTimer.我知道 Cocos2d 有一个 schedule 方法.

In Cocos2d documents it is written that it is not a good idea to use NSTimer. Why is it not recommended to use NSTimer. I know there is a schedule method of Cocos2d.

推荐答案

尽量不要使用 Cocoa 的 NSTimer.而是使用 cocos2d 自己的调度器.如果你使用 cocos2d 调度器,你将拥有:

Try NOT to use Cocoa’s NSTimer. Instead use cocos2d’s own scheduler. If you use cocos2d scheduler, you will have:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆