Cocos2d iphone sharedScheduler已弃用?

Cocos2d iphone sharedScheduler已弃用?,cocos2d-iphone,deprecated,Cocos2d Iphone,Deprecated,所以,我想创建一个慢动作效果,我使用这个方法: [[CCScheduler sharedScheduler] setTimeScale:0.5]; 但是,不推荐使用sharedScheduler 创建慢动作效果的等效方法是什么 所有的答案和建议都非常感谢 您必须使用[CCDirector scheduler] CCActionManager、CCScheduler、CCTouchDispatcher(iOS)和 CCEventDispatcher(Mac)不再是单例。相反,它们是 董事的财产

所以,我想创建一个慢动作效果,我使用这个方法:

[[CCScheduler sharedScheduler] setTimeScale:0.5];
但是,不推荐使用sharedScheduler

创建慢动作效果的等效方法是什么


所有的答案和建议都非常感谢

您必须使用[CCDirector scheduler]

CCActionManager、CCScheduler、CCTouchDispatcher(iOS)和 CCEventDispatcher(Mac)不再是单例。相反,它们是 董事的财产

链接到文档:

--

如果我正确理解了慢动作效果的含义,您还可以使用以下操作(此处是干编码,因此可能需要清理):


尝试替换:

[[CCScheduler sharedScheduler]设置时间刻度:0.5]

与:


[[CCDirector sharedDirector]调度程序]设置时间刻度:0.5]

在ccDeprecated.m中查找替代方案。我想现在可以通过CcDirector获得
CCNode *obj = //some object;

[obj runAction:[CCSequence actions:
   [CCDelayTime actionWithDuration:0.5],
   [CCCallFunc actionWithTarget:self selector:@selector(YOURFUNCTION)],nil]];