DEADSOFTWARE

88b62619bd1aebbc267b64bc45982bf540fc3808
[cavedroid.git] / android / src / ru / deadsoftware / cavedroid / AndroidLauncher.java
1 package ru.deadsoftware.cavedroid;
3 import android.content.pm.PackageManager;
4 import android.os.Bundle;
5 import com.badlogic.gdx.backends.android.AndroidApplication;
6 import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
8 public class AndroidLauncher extends AndroidApplication {
9 @Override
10 protected void onCreate(Bundle savedInstanceState) {
11 super.onCreate(savedInstanceState);
12 AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
13 config.useImmersiveMode = true;
14 String gameFolder = "";
15 try {
16 gameFolder = getPackageManager().getPackageInfo(getPackageName(), 0).applicationInfo.dataDir;
17 } catch (PackageManager.NameNotFoundException e) {
18 e.printStackTrace();
19 exit();
20 }
21 CaveGame caveGame = new CaveGame(gameFolder, true);
22 caveGame.setDebug(BuildConfig.DEBUG);
23 initialize(caveGame, config);
24 }
26 @Override
27 public void onBackPressed() {
28 }
29 }