diff options
Diffstat (limited to 'android/src/ch')
-rw-r--r-- | android/src/ch/asynk/rustanddust/android/AndroidBackend.java | 15 | ||||
-rw-r--r-- | android/src/ch/asynk/rustanddust/android/AndroidLauncher.java | 17 |
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); + } } |