AndEngine纹理错误
我正在关注这个教程,但我不断收到错误。这是有问题的代码行:
this.mTexture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
我收到错误
Cannot instantiate the type Texture
所有内容均已正确导入,但我不断收到错误。
有什么想法吗?
谢谢!!
I was following this tutorial and I keep getting an error. Here is the offending line of code:
this.mTexture = new Texture(64, 64, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
I get the error
Cannot instantiate the type Texture
Everything is imported correctly, but I keep getting the error.
Any Ideas?
Thanks!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
本指南很旧。
Texture
类现在是抽象的,因此您无法实例化它的对象。使用其子类之一 - 例如
BitmapTextureAtlas
。我不建议您继续阅读本指南,除非它得到更新。我浏览了一下,发现了一些过时的东西。 AndEngine论坛里有很多最新的教程,你可以尝试一下。
This guide is old.
Texture
class is abstract now, so you can not instantiate objects of it.Use one of its subclasses -
BitmapTextureAtlas
for example.I don't recommend you to continue with this guide, unless it gets updated. I had a short look and I saw a bit out-of-date stuff. There are many up-to-date tutorials in the AndEngine forums, you can try them out.