DEADSOFTWARE

Fix mob physics
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / MainConfig.java
1 package ru.deadsoftware.cavedroid;
3 import ru.deadsoftware.cavedroid.game.GameUiWindow;
5 import javax.annotation.CheckForNull;
6 import javax.inject.Inject;
7 import javax.inject.Singleton;
9 @Singleton
10 public class MainConfig {
12 private final CaveGame mCaveGame;
14 @CheckForNull
15 private MainComponent mMainComponent;
17 private GameUiWindow mGameUiWindow;
18 private String mGameFolder;
20 private boolean mTouch;
21 private boolean mShowInfo;
22 private boolean mShowMap;
24 private float mWidth;
25 private float mHeight;
27 @Inject
28 public MainConfig(CaveGame caveGame) {
29 mCaveGame = caveGame;
31 mGameUiWindow = GameUiWindow.NONE;
32 mGameFolder = "";
33 }
35 public CaveGame getCaveGame() {
36 return mCaveGame;
37 }
39 public MainComponent getMainComponent() {
40 assert mMainComponent != null;
41 return mMainComponent;
42 }
44 public void setMainComponent(MainComponent mainComponent) {
45 mMainComponent = mainComponent;
46 }
48 public boolean checkGameUiWindow(GameUiWindow gameUiWindow) {
49 return mGameUiWindow == gameUiWindow;
50 }
52 public GameUiWindow getGameUiWindow() {
53 return mGameUiWindow;
54 }
56 public void setGameUiWindow(GameUiWindow gameUiWindow) {
57 mGameUiWindow = gameUiWindow;
58 }
60 public String getGameFolder() {
61 return mGameFolder;
62 }
64 public void setGameFolder(String gameFolder) {
65 mGameFolder = gameFolder;
66 }
68 public boolean isTouch() {
69 return mTouch;
70 }
72 public void setTouch(boolean touch) {
73 mTouch = touch;
74 }
76 public float getWidth() {
77 return mWidth;
78 }
80 public void setWidth(float width) {
81 mWidth = width;
82 }
84 public float getHeight() {
85 return mHeight;
86 }
88 public void setHeight(float height) {
89 mHeight = height;
90 }
92 public boolean isShowInfo() {
93 return mShowInfo;
94 }
96 public void setShowInfo(boolean showInfo) {
97 mShowInfo = showInfo;
98 }
100 public boolean isShowMap() {
101 return mShowMap;
104 public void setShowMap(boolean showMap) {
105 mShowMap = showMap;