Status of the Loading the TextureAtlas

后端 未结 1 1894
礼貌的吻别
礼貌的吻别 2021-01-27 23:31

I am using the TextureAtlas in my LibGdx based game. As the size of the Atlas increases the loading time increases hence there is a delay in showing the animations that I have s

相关标签:
1条回答
  • 2021-01-28 00:14

    You can take for example, asset that have been loaded with this method, yourAssetManage.getLoadedAssets () this method return an int indicating the number of loaded assets

        Gdx.app.log("asset loaded :", ""+yourAssetManger.getLoadedAssets());
    
        if (yourAssetManger.update()) {
    
             if (Gdx.input.isTouched()) { 
                yourGame.setScreen(new yourScreen());
            }
        }
    

    or isLoaded(String fileName); http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/assets/AssetManager.html#isLoaded-java.lang.String-

    yourAssetManage.isLoaded("fileNameOfYourAsset");
    
    0 讨论(0)
提交回复
热议问题