简体   繁体   中英

How to reset a scene in cocos2d?

I am using cocos2d to create a simple arrow shooting game.On reset button I am replacing the scene to The same play scene ie i am loading the images again and again on reset button. But this is not the optimized way to do. Can somebody help me or give me an Idea to reset the game without loading the images again and again.

Many Thanks

are you sure that you are loading this textures into memory every time? if so, retain your textures before restart to be sure that it is not unloaded from CCTextureCache. loading textures into memory is the longest process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM