chore(scene): only wait if we started loading all assets.

This commit is contained in:
2025-09-30 08:27:33 +07:00
parent 94d0166f2d
commit c47a0c9152
2 changed files with 5 additions and 1 deletions

View File

@ -77,6 +77,10 @@ public class Assets {
return loadedAll;
}
public static boolean isStartLoadAll() {
return startLoadAll;
}
public static void waitUntilLoaded() {
assetManager.finishLoading();
if (startLoadAll) {

View File

@ -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();
}
}