package org.egordorichev.lasttry.state;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import org.egordorichev.lasttry.LastTry;
import org.egordorichev.lasttry.graphics.Assets;
import org.egordorichev.lasttry.graphics.Graphics;

public class SplashState implements State {
    /** Splash texture */
    private Texture splash;

    public SplashState() {
        this.splash = new Texture(Gdx.files.internal("splash.png"));
    }

    /**
     * Never used
     */
    @Override
    public void show() {

    }

    /**
     * Renders and updates the splash
     * @param delta delta from last update
     */
    @Override
    public void render(float delta) {
        LastTry.batch.draw(this.splash, 0, 0);
	    
        if (Assets.load()) {
	        Graphics.load();
	        LastTry.instance.setScreen(new MenuState());
	    }
    }

    /**
     * Never used
     */
    @Override
    public void resize(int width, int height) {

    }

    /**
     * Never used
     */
    @Override
    public void pause() {

    }

    /**
     * Never used
     */
    @Override
    public void resume() {

    }

    /**
     * Never used
     */
    @Override
    public void hide() {

    }

    /**
     * Never used
     */
    @Override
    public void dispose() {

    }
}
@@ -730,18 +730,53 @@
 0);%0A
+%0A
 %09    
-%0A    
+Assets.assetManager.finishLoading();%0A%0A%09
     

Fix slow asset load