andengine 空TextureRegion

发布于 2024-12-06 20:48:16 字数 195 浏览 6 评论 0原文

我想创建一个精灵及其子元素。精灵将是空的,但孩子们不会。所以我需要一个TextureRegion来创建精灵。比如精灵本身是空的,我不需要从资源中创建纹理,但我需要一个纹理来创建精灵,

new Sprite(pX, pY, pTextureRegion)

如何为这个操作创建一个空的TextureRegion?

I want to create a Sprite with its children. The Sprite will be empty but the children will not. So I need a TextureRegion to create the sprite. Such as sprite itself is empty, I don't need to create a texture from assets, but I need a Texture to create the sprite

new Sprite(pX, pY, pTextureRegion)

How can I create an empty TextureRegion for this operation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心房的律动 2024-12-13 20:48:16

您可以使用实体 和 Entity.attachChild()。

You can use Entity and Entity.attachChild().

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文