cocos2d-x 游戏重置方法

方法一:
srand(time(NULL));

array->removeAllObjects();
this->removeAllChildren();
init();

方法二:
 CCDirector::sharedDirector()->replaceScene(HelloWorld::scene());

从本场景切换到本场景,但是不能在init()函数中。。

 

posted on 2013-04-25 15:15  jack_yan  阅读(317)  评论(0编辑  收藏  举报