2014-08-09 22:41:29 +02:00
|
|
|
package de.samdev.colorrunner;
|
|
|
|
|
2014-08-10 00:24:45 +02:00
|
|
|
import com.badlogic.gdx.Game;
|
2017-04-14 01:06:53 +02:00
|
|
|
import com.badlogic.gdx.Gdx;
|
2017-04-16 18:38:28 +02:00
|
|
|
import com.badlogic.gdx.Preferences;
|
2017-04-14 12:32:25 +02:00
|
|
|
import com.badlogic.gdx.assets.AssetManager;
|
|
|
|
import com.badlogic.gdx.audio.Music;
|
2014-08-09 22:41:29 +02:00
|
|
|
|
2014-08-11 15:47:58 +02:00
|
|
|
import de.samdev.colorrunner.screens.menu.SplashScreen;
|
2014-08-10 00:24:45 +02:00
|
|
|
|
|
|
|
public class CRGame extends Game {
|
2017-04-24 22:24:54 +02:00
|
|
|
public final static boolean DEBUG = true;
|
2017-04-14 12:32:25 +02:00
|
|
|
public static AssetManager manager;
|
2017-04-16 18:38:28 +02:00
|
|
|
|
2017-11-22 19:14:24 +01:00
|
|
|
|
2014-08-09 22:41:29 +02:00
|
|
|
@Override
|
2014-08-10 00:24:45 +02:00
|
|
|
public void create() {
|
2017-04-13 23:30:38 +02:00
|
|
|
//if (DEBUG)
|
|
|
|
// setScreen(new GameScreen());
|
|
|
|
//else
|
2017-04-14 12:32:25 +02:00
|
|
|
|
|
|
|
manager = new AssetManager();
|
|
|
|
manager.load("sound/mainsound.mp3", Music.class);
|
2017-11-22 19:14:24 +01:00
|
|
|
//manager.load("sound/menusound.mp3", Music.class);
|
2017-04-14 12:32:25 +02:00
|
|
|
manager.finishLoading();
|
|
|
|
|
2017-04-16 18:38:28 +02:00
|
|
|
Preferences endlessGameInfos = Gdx.app.getPreferences("endlessGameInfos");
|
|
|
|
endlessGameInfos.putInteger("lastBest", 0);
|
|
|
|
endlessGameInfos.flush();
|
|
|
|
|
2017-04-14 12:32:25 +02:00
|
|
|
setScreen(new SplashScreen());
|
2014-08-09 22:41:29 +02:00
|
|
|
}
|
2017-04-14 01:06:53 +02:00
|
|
|
|
|
|
|
public static CRGame Inst() {
|
|
|
|
return ((CRGame) Gdx.app.getApplicationListener());
|
|
|
|
}
|
2014-08-09 22:41:29 +02:00
|
|
|
}
|