diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-16 16:59:20 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-16 16:59:20 +0100 |
commit | ce96d3c2c346190f5241cbae75224dc9dbf1c9d8 (patch) | |
tree | ce2f54438723271ef94712902f4a9e2daf839b22 | |
parent | ebc82f8e2bfc9f6ecbf8c6ae31f097c410b06534 (diff) | |
download | RustAndDust-ce96d3c2c346190f5241cbae75224dc9dbf1c9d8.zip RustAndDust-ce96d3c2c346190f5241cbae75224dc9dbf1c9d8.tar.gz |
Config: add GameMode.from
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Config.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Config.java b/core/src/ch/asynk/rustanddust/game/Config.java index cbfeeff..cc148db 100644 --- a/core/src/ch/asynk/rustanddust/game/Config.java +++ b/core/src/ch/asynk/rustanddust/game/Config.java @@ -55,6 +55,15 @@ public class Config return PVP; return SOLO; } + public static GameMode from(int i) + { + GameMode r = SOLO; + switch(i) { + case 1: r = PVE; break; + case 2: r = PVP; break; + } + return r; + } }; public GameMode gameMode; |