简体   繁体   English

在Android中使用cocos2d时如何刷新页面

[英]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... TIA ...

I just removed all sprites using removeAllChildren(true) and reloaded the page using CCDirector.sharedDirector().runWithScene(scene). 我只是使用removeAllChildren(true)删除了所有精灵,并使用CCDirector.sharedDirector()。runWithScene(scene)重新加载了页面。 Now, it's working fine 现在,一切正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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