修訂 | 1cb27bf5d778d0f4e605d4fd23dead8749e1f7c3 (tree) |
---|---|
時間 | 2022-01-14 00:45:40 |
作者 | sebastian_bugiu |
Commiter | sebastian_bugiu |
Added full access IAP.
@@ -112,6 +112,8 @@ | ||
112 | 112 | parameter.flip = true; |
113 | 113 | font = generator.generateFont(parameter); // For the in game flipped ttf. |
114 | 114 | generator.dispose(); |
115 | + // Disable after testing. | |
116 | + Preferences.getInstance().setFullAccess(false); | |
115 | 117 | canvas = new ExtendedCanvas(); |
116 | 118 | setScreen(new MainMenuActivity(this)); |
117 | 119 | } |
@@ -8,6 +8,7 @@ | ||
8 | 8 | import com.badlogic.gdx.utils.ScreenUtils; |
9 | 9 | import com.headwayent.spacerocket.HighScoreActivity; |
10 | 10 | import com.headwayent.spacerocket.InGameInputProcessor; |
11 | +import com.headwayent.spacerocket.Preferences; | |
11 | 12 | import com.headwayent.spacerocket.SpaceRocket; |
12 | 13 | |
13 | 14 | import java.util.concurrent.atomic.AtomicBoolean; |
@@ -49,6 +50,7 @@ | ||
49 | 50 | private static final float CORNER_X = 0, CORNER_Y = 0; |
50 | 51 | public static final int NUM_LIVES = 10; |
51 | 52 | private static final int HIDDEN_KEY_NUM_PRESSES = 10; |
53 | + public static final int FULL_ACCESS_SCORE = 10; | |
52 | 54 | private static float FONT_HEIGHT; |
53 | 55 | private static float SCORE_WIDTH; |
54 | 56 | private static float OTHER_SHIP_SCORE_WIDTH; |
@@ -260,7 +262,8 @@ | ||
260 | 262 | public void advance(float delta) { |
261 | 263 | checkKeys(); |
262 | 264 | graphicsManager.advance(delta); |
263 | - if (((getStatus().getLivesRemaining() <= 0)) && (!getStatus().isGameOver())) { | |
265 | + if ((getStatus().getLivesRemaining() <= 0 && !getStatus().isGameOver()) || | |
266 | + (getStatus().getScore() > FULL_ACCESS_SCORE && !Preferences.getInstance().isFullAccess())) { | |
264 | 267 | if (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.SP) { |
265 | 268 | // try { |
266 | 269 | if(!gameOver) { |