سؤال

I am new in cocos2d-x and i am using 3.0beta sdk. I am using below code to navigate from one screen to another and vice-versa.

 Director *pDirector = Director::getInstance();
 pDirector->replaceScene(nextscreen); 

Do you know, how can we move on previous screen via other ways? I think, this is creating a cycle of Scenes.

Thanks Kamal

هل كانت مفيدة؟

المحلول

Replacing scene is a good idea since it destroys previous, freeing the memory. However you can also use pushScene()/popScene() methods to move between scenes.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top