2012-08-16 63 views
0

的下面幾行代碼時:在此錯誤我在我的日食有錯誤開發一些應用程序

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> 

我怎麼能解決這個問題?

回答

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

+0

@all感謝烏拉圭回合答覆大家..我很感激這麼多回合的答覆。謝謝。 – siabuabu 2012-09-08 16:07:58

相關問題