在开发一些应用程序时,我的日食出错了

时间:2012-08-16 23:45:16

标签: android

以下代码行:

this.mTexture = new Texture(512,512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
this.mSplashTextureRegion = TextureRegionFactory.createFromSource(this.mTexture, this, "gfx/Splashscreen.png", 0, 0);

导致此错误:

Bound mismatch: The generic method createFromSource(ITextureAtlas<T>,
T, int, int, boolean) of type TextureRegionFactory is not applicable
for the acrguments(Texture, MainActivity, String, int, int). The
inferred type MainActivity is not a valid substitute for the bounded
parameter <T extends ITextureAtlasSource>

我怎么解决这个问题?

1 个答案:

答案 0 :(得分:0)

public void onLoadResources() {
this.mTexture = new BitmapTextureAtlas(512, 512,
    TextureOptions.BILINEAR_PREMULTIPLYALPHA);
    this.mSplashTextureRegion =     BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mTexture,
    this, "gfx/Splashscreen.png", 0, 0);
    this.mEngine.getTextureManager().loadTexture(this.mTexture);
    }

http://metababy.blogspot.com

http://www.andengine.org/forums/development/recent-build-change-t5514.html