chore(scene): only wait if we started loading all assets.
This commit is contained in:
@ -77,6 +77,10 @@ public class Assets {
|
||||
return loadedAll;
|
||||
}
|
||||
|
||||
public static boolean isStartLoadAll() {
|
||||
return startLoadAll;
|
||||
}
|
||||
|
||||
public static void waitUntilLoaded() {
|
||||
assetManager.finishLoading();
|
||||
if (startLoadAll) {
|
||||
|
||||
@ -8,7 +8,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
public abstract class Scene {
|
||||
protected final Logger log = org.slf4j.LoggerFactory.getLogger(getClass());
|
||||
public Scene() {
|
||||
if (!Assets.isLoadedAll()) {
|
||||
if (!Assets.isLoadedAll() && Assets.isStartLoadAll()) {
|
||||
Assets.waitUntilLoaded();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user