• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂1cb27bf5d778d0f4e605d4fd23dead8749e1f7c3 (tree)
時間2022-01-14 00:45:40
作者sebastian_bugiu
Commitersebastian_bugiu

Log Message

Added full access IAP.

Change Summary

差異

diff -r ff36078372e1 -r 1cb27bf5d778 core/src/com/headwayent/spacerocket/SpaceRocket.java
--- a/core/src/com/headwayent/spacerocket/SpaceRocket.java Thu Jan 13 16:57:58 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/SpaceRocket.java Thu Jan 13 17:45:40 2022 +0200
@@ -112,6 +112,8 @@
112112 parameter.flip = true;
113113 font = generator.generateFont(parameter); // For the in game flipped ttf.
114114 generator.dispose();
115+ // Disable after testing.
116+ Preferences.getInstance().setFullAccess(false);
115117 canvas = new ExtendedCanvas();
116118 setScreen(new MainMenuActivity(this));
117119 }
diff -r ff36078372e1 -r 1cb27bf5d778 core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java
--- a/core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java Thu Jan 13 16:57:58 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java Thu Jan 13 17:45:40 2022 +0200
@@ -8,6 +8,7 @@
88 import com.badlogic.gdx.utils.ScreenUtils;
99 import com.headwayent.spacerocket.HighScoreActivity;
1010 import com.headwayent.spacerocket.InGameInputProcessor;
11+import com.headwayent.spacerocket.Preferences;
1112 import com.headwayent.spacerocket.SpaceRocket;
1213
1314 import java.util.concurrent.atomic.AtomicBoolean;
@@ -49,6 +50,7 @@
4950 private static final float CORNER_X = 0, CORNER_Y = 0;
5051 public static final int NUM_LIVES = 10;
5152 private static final int HIDDEN_KEY_NUM_PRESSES = 10;
53+ public static final int FULL_ACCESS_SCORE = 10;
5254 private static float FONT_HEIGHT;
5355 private static float SCORE_WIDTH;
5456 private static float OTHER_SHIP_SCORE_WIDTH;
@@ -260,7 +262,8 @@
260262 public void advance(float delta) {
261263 checkKeys();
262264 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())) {
264267 if (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.SP) {
265268 // try {
266269 if(!gameOver) {