Search code examples
androidspritepage-refreshcocos2d-android

How to refresh a page when using cocos2d in android


I have added some sprites to a page and I am adding new sprites to the same page removing all previous sprites based on the touch action. After every touch it needs to be refreshed. So, how to do this refreshing task? TIA...


Solution

  • I just removed all sprites using removeAllChildren(true) and reloaded the page using CCDirector.sharedDirector().runWithScene(scene). Now, it's working fine