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