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

查看:111
本文介绍了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天全站免登陆