在 AndEngine 中从场景中删除对象
我在 andEngine 中有一个场景。该场景基本上包含三个动画对象。我想添加和删除意味着在屏幕上显示和隐藏。这怎么可能?
I have a scene in andEngine. The scene has basically three animated objects. I want to add and remove means show and hide on the screen. Hows that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请记住,我没有 Android 手机,也从未使用过此 API。
我认为您需要在场景图中添加和删除精灵:
示例代码:
示例代码:
我基本上得到了这个通过浏览本网站获取信息。这似乎是该引擎唯一的官方文档:
http://code.google.com/p/ andengineexamples/
Keep in mind that I don't own an Android phone, and I have never used this API.
I think you'd need to add and remove sprites to the scene-graph:
Example code:
Example code:
I'm basically getting this information by browsing this site. It seems to be the only official docs this engine has:
http://code.google.com/p/andengineexamples/
要从场景中删除对象:(在本例中是 Sprite 对象,但您可以删除任何实体)
要隐藏场景:
To remove an object from a scene: (in this case a Sprite object but you can remove any entity)
To hide a scene: