Skip to content

Commit

Permalink
Used instantiated asset manager rather than static because apparently…
Browse files Browse the repository at this point in the history
… its better for Android
  • Loading branch information
basimkhajwal committed May 29, 2016
1 parent 4b4c76b commit 17e77e0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions core/src/net/net63/codearcade/LSD/LSD.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package net.net63.codearcade.LSD;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.FPSLogger;
import net.net63.codearcade.LSD.managers.Assets;
import net.net63.codearcade.LSD.managers.LevelManager;
import net.net63.codearcade.LSD.managers.ShaderManager;
import net.net63.codearcade.LSD.managers.SoundManager;
import net.net63.codearcade.LSD.screens.MenuScreen;
import net.net63.codearcade.LSD.screens.LoadingScreen;
import net.net63.codearcade.LSD.utils.Settings;

/**
Expand All @@ -18,24 +18,23 @@
public class LSD extends Game {

private FPSLogger fpsLogger;
public AssetManager assetManager;

public LSD() {
super();

assetManager = new AssetManager();
fpsLogger = new FPSLogger();
}

@Override
public void create() {
Assets.loadAll();
Settings.loadSettings();
LevelManager.loadAll();
SoundManager.loadAll();
ShaderManager.loadAll();
Settings.loadSettings();

SoundManager.playMusic();
Assets.loadFonts();

this.setScreen(new MenuScreen(this));
this.setScreen(new LoadingScreen(this));
}

@Override
Expand All @@ -51,7 +50,6 @@ public void dispose() {

Assets.dispose();
LevelManager.dispose();
SoundManager.dispose();
Settings.saveSettings();
}

Expand Down

0 comments on commit 17e77e0

Please sign in to comment.