1

ここに私のコードがあります:-

manager = new AssetManager();   

fps =new FPSLogger();

Resolution[] resolutions = {new Resolution(320, 480, ".320480"), new Resolution(480,    800, ".480800"),
new Resolution(480, 856, ".480854")};

 ResolutionFileResolver resolver = new ResolutionFileResolver(new InternalFileHandleResolver(), resolutions);

manager.setLoader(Texture.class, new TextureLoader(resolver));


 manager.load( "images/flash.png" , Texture.class);
 Texture.setAssetManager(manager);
tex =  manager.get("images/flash.png" ,Texture.class);


tex = new Texture(Gdx.files.internal("images/a.png")); 
flsh = new Texture(Gdx.files.internal("images/flash.png"));   
tex2 = new Texture(Gdx.files.internal("images/space.jpg")); 
ear = new Texture(Gdx.files.internal("images/earth.png")); 
newgame=new Texture(Gdx.files.internal("images/shockwave.png")); 

そして表示されるエラーは

 Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Asset not loaded: images/flash.png
at com.badlogic.gdx.assets.AssetManager.get(AssetManager.java:119)
at main.assets.loading(assets.java:53)
at main.game.create(game.java:43)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:132)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:112)

私の画像レイアウトは

/main(プロジェクト名)/assets/images/a.png

このエラーを修正するのを手伝ってください

4

1 に答える 1