summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-27 22:24:30 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-27 22:24:30 +0100
commitbab2b2f6d21d41e446342683d4351575b37d3f14 (patch)
tree85a19970cac2e1d0190bdefc8f06532a09fc60c9 /android
parente8551d54bef7a48297ab9e4bc5df77446d930cfb (diff)
downloadRustAndDust-bab2b2f6d21d41e446342683d4351575b37d3f14.zip
RustAndDust-bab2b2f6d21d41e446342683d4351575b37d3f14.tar.gz
add Backend, DesktopBackend, AndroidBackend
Diffstat (limited to 'android')
-rw-r--r--android/src/ch/asynk/rustanddust/android/AndroidBackend.java15
-rw-r--r--android/src/ch/asynk/rustanddust/android/AndroidLauncher.java17
2 files changed, 25 insertions, 7 deletions
diff --git a/android/src/ch/asynk/rustanddust/android/AndroidBackend.java b/android/src/ch/asynk/rustanddust/android/AndroidBackend.java
new file mode 100644
index 0000000..c1650ad
--- /dev/null
+++ b/android/src/ch/asynk/rustanddust/android/AndroidBackend.java
@@ -0,0 +1,15 @@
+package ch.asynk.rustanddust.android;
+
+import android.app.Application;
+
+import ch.asynk.rustanddust.Backend;
+
+public class AndroidBackend implements Backend
+{
+ private Application app;
+
+ public AndroidBackend(Application app)
+ {
+ this.app = app;
+ }
+}
diff --git a/android/src/ch/asynk/rustanddust/android/AndroidLauncher.java b/android/src/ch/asynk/rustanddust/android/AndroidLauncher.java
index 46f2da9..a60693e 100644
--- a/android/src/ch/asynk/rustanddust/android/AndroidLauncher.java
+++ b/android/src/ch/asynk/rustanddust/android/AndroidLauncher.java
@@ -4,13 +4,16 @@ import android.os.Bundle;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
+
import ch.asynk.rustanddust.RustAndDust;
+import ch.asynk.rustanddust.Backend;
-public class AndroidLauncher extends AndroidApplication {
- @Override
- protected void onCreate (Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
- initialize(new RustAndDust(), config);
- }
+public class AndroidLauncher extends AndroidApplication
+{
+ @Override
+ protected void onCreate (Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
+ initialize(new RustAndDust(new AndroidBackend(this.getApplication())), config);
+ }
}