开发者

Cocos2d - a way to get the current scene?

I'm looking for a way to get the current scene so that I'll be able to tell which scene is running at any开发者_高级运维 time.

Thanks!


Check out CCDirector. You can get the running scene like this:

[[CCDirector sharedDirector] runningScene];

From the documentation of cocos2D:

-(CCScene*) runningScene [read, assign]

The current running Scene. Director can only run one Scene at the time

Sandro Meier

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜