• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Révisionff36078372e1b6e90e5766ee95b8b6649db5c64b (tree)
l'heure2022-01-13 23:57:58
Auteursebastian_bugiu
Commitersebastian_bugiu

Message de Log

Refactored Status class to only use accessors. Forced portrait orientation for game.

Change Summary

Modification

diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/HighScoreActivity.java
--- a/core/src/com/headwayent/spacerocket/HighScoreActivity.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/HighScoreActivity.java Thu Jan 13 16:57:58 2022 +0200
@@ -65,10 +65,10 @@
6565 currentPos = indexOf + 1;
6666 }
6767
68- if (status.isShowHighScore() && status.score > 0) {
68+ if (status.isShowHighScore() && status.getScore() > 0) {
6969 status.setShowHighScore(false);
70- String highScoreString = status.score + ", " + getDifficultyString();
71- scoreMap.put(status.score, highScoreString);
70+ String highScoreString = status.getScore() + ", " + getDifficultyString();
71+ scoreMap.put(status.getScore(), highScoreString);
7272 if (scoreMap.size() > MAX_HIGH_SCORE_POS) {
7373 scoreMap.pollLastEntry();
7474 }
@@ -140,7 +140,7 @@
140140 }
141141 Status status = gameEngine.getCanvas().getStatus();
142142 String msg = "Congratulations! You have reached a new " +
143- "High Score: " + status.score + " taking " + status.numPowerupsTaken +
143+ "High Score: " + status.getScore() + " taking " + status.getNumPowerupsTaken() +
144144 " powerups! Difficulty setting: " + getDifficultyString();
145145 }
146146
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/InGameInputProcessor.java
--- a/core/src/com/headwayent/spacerocket/InGameInputProcessor.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/InGameInputProcessor.java Thu Jan 13 16:57:58 2022 +0200
@@ -197,7 +197,7 @@
197197 SpaceRocket game = SpaceRocket.getGame();
198198 if ((game.getCanvas() != null) &&
199199 (game.getCanvas().getCheckFirePressed().get()) &&
200- (game.getCanvas().getStatus().firstTime) &&
200+ (game.getCanvas().getStatus().isFirstTime()) &&
201201 (game.getGameMode() == SpaceRocket.GameMode.SP) &&
202202 (!isFireSet())) {
203203 game.getCanvas().recordKeyPressed(ExtendedCanvas.FIRE);
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/SpaceRocket.java
--- a/core/src/com/headwayent/spacerocket/SpaceRocket.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/SpaceRocket.java Thu Jan 13 16:57:58 2022 +0200
@@ -228,8 +228,8 @@
228228 xPos = Float.floatToIntBits(xPosF);
229229 yPos = Float.floatToIntBits(yPosF);
230230 Status status = canvas.getStatus();
231- score = status.score;
232- lives = status.livesRemaining;
231+ score = status.getScore();
232+ lives = status.getLivesRemaining();
233233 BossSprite[] boss = gfxMgmt.getBossSprite();
234234 for(int i = 0; i < boss.length; ++i) {
235235 if((boss[i].getLaunched()) && (!boss[i].getBossDestroyedSP())) {
@@ -307,7 +307,7 @@
307307 }
308308 }
309309 String name = new String(b);
310- String str = String.valueOf(canvas.getStatus().score);
310+ String str = String.valueOf(canvas.getStatus().getScore());
311311 DifficultySelection.Difficulty difficulty = DifficultySelection.getDifficulty();
312312 String temp = name + ", " + str;
313313 String HighScoreString = "";
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java
--- a/core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java Thu Jan 13 16:57:58 2022 +0200
@@ -63,9 +63,6 @@
6363 private final GlyphLayout timelayout;
6464 private final GlyphLayout liveslayout;
6565 private GraphicsManager graphicsManager;
66- private int InitialGameTicks = 950;
67- private int OldGameTicks = InitialGameTicks;
68-// private int GameTicks = OldGameTicks;
6966 public static final int BLACK = 0xff000000;
7067 public static final int WHITE = 0xffffffff;
7168 private String timeString;
@@ -108,8 +105,7 @@
108105 }
109106
110107 public ExtendedCanvas() {
111- status.livesRemaining = NUM_LIVES;
112- status.gameTicks = InitialGameTicks;
108+ status.setLivesRemaining(NUM_LIVES);
113109
114110 camera = new OrthographicCamera();
115111 camera.setToOrtho(true, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
@@ -173,15 +169,13 @@
173169
174170 private void resetTicks() {
175171 getStatus().setGameOver(false);
176- getStatus().gameTicks = InitialGameTicks;
177- OldGameTicks = InitialGameTicks;
178172 }
179173
180174 public void reset() {
181175 graphicsManager.reset();
182- getStatus().score = 0;
183- getStatus().livesRemaining = NUM_LIVES;
184- getStatus().numPowerupsTaken = 0;
176+ getStatus().setScore(0);
177+ getStatus().setLivesRemaining(NUM_LIVES);
178+ getStatus().setNumPowerupsTaken(0);
185179 resetTicks();
186180 }
187181
@@ -189,10 +183,10 @@
189183 graphicsManager.reset();
190184 graphicsManager.getSpaceRocket().setPosition(xPos, yPos);
191185 if(score != 0) {
192- getStatus().score = score;
186+ getStatus().setScore(score);
193187 }
194188 if(lives != 0) {
195- getStatus().livesRemaining = lives;
189+ getStatus().setLivesRemaining(lives);
196190 }
197191 if((currentBoss != -1) && (bossHealth != 0)) {
198192 graphicsManager.getBossSprite()[currentBoss].setHealth(bossHealth);
@@ -231,9 +225,9 @@
231225 game.getBatch().setProjectionMatrix(camera.combined);
232226 game.getBatch().begin();
233227 graphicsManager.draw();
234- game.getFont().draw(game.getBatch(), "Score: " + getStatus().score,
228+ game.getFont().draw(game.getBatch(), "Score: " + getStatus().getScore(),
235229 CORNER_X, CORNER_Y + 100);
236- game.getFont().draw(game.getBatch(), "Lives: " + getStatus().livesRemaining, (screenWidth - liveslayout.width),
230+ game.getFont().draw(game.getBatch(), "Lives: " + getStatus().getLivesRemaining(), (screenWidth - liveslayout.width),
237231 CORNER_Y + 100);
238232
239233 // if (mp) {
@@ -266,7 +260,7 @@
266260 public void advance(float delta) {
267261 checkKeys();
268262 graphicsManager.advance(delta);
269- if (((getStatus().gameTicks == 0) || (getStatus().livesRemaining <= 0)) && (!getStatus().isGameOver())) {
263+ if (((getStatus().getLivesRemaining() <= 0)) && (!getStatus().isGameOver())) {
270264 if (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.SP) {
271265 // try {
272266 if(!gameOver) {
@@ -405,10 +399,10 @@
405399
406400 public void checkKeys() {
407401 if(gameLoaded) {
408- getStatus().firstTime = false;
402+ getStatus().setFirstTime(false);
409403 graphicsManager.appendSpaceRockets();
410404 }
411- if ((getStatus().firstTime) && (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.SP)) {
405+ if ((getStatus().isFirstTime()) && (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.SP)) {
412406 int keyState = getKeyStates();
413407 if (showFireToast) {
414408
@@ -416,7 +410,7 @@
416410 }
417411 checkFirePressed.set(true);
418412 if ((keyState & FIRE_PRESSED) != 0) {
419- getStatus().firstTime = false;
413+ getStatus().setFirstTime(false);
420414 if(!gameLoaded) {
421415 this.reset();
422416 }
@@ -430,11 +424,11 @@
430424 return;
431425 }
432426
433- if ((getStatus().firstTime) && (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.MP) &&
427+ if ((getStatus().isFirstTime()) && (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.MP) &&
434428 (graphicsManager.getSpaceRocketsSet())) {
435429 this.reset();
436430 graphicsManager.appendSpaceRockets();
437- getStatus().firstTime = false;
431+ getStatus().setFirstTime(false);
438432 }
439433 if (!getStatus().isGameOver()) {
440434 int keyState = getKeyStates();
@@ -456,7 +450,7 @@
456450 graphicsManager.setFire();
457451 }
458452 if ((SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.MP) && (this.keyCode == KEY_POUND) && (pressed)) {
459- if (getStatus().livesRemaining > 0) {
453+ if (getStatus().getLivesRemaining() > 0) {
460454 graphicsManager.GiveLife();
461455 // gfxMgmt.getOtherSpaceRocket().IncrementLives(); NO need since we use full lives in mp
462456 graphicsManager.updateScore(true, false);
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/old/FinalResults.java
--- a/core/src/com/headwayent/spacerocket/old/FinalResults.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/FinalResults.java Thu Jan 13 16:57:58 2022 +0200
@@ -16,9 +16,9 @@
1616 public void setResultsString() { //Before restart!!!
1717 Status status = SpaceRocket.getGame().getCanvas().getStatus();
1818 results = Preferences.getInstance().getUsername() + " :\n" +
19- "Score : " + status.score + "\n" +
20- "Total lives lost : " + status.totalNumLivesLost + "\n" +
21- "Total powerups taken : " + status.numPowerupsTaken + "\n\n" +
19+ "Score : " + status.getScore() + "\n" +
20+ "Total lives lost : " + status.getTotalNumLivesLost() + "\n" +
21+ "Total powerups taken : " + status.getNumPowerupsTaken() + "\n\n" +
2222 Preferences.getInstance().getCoopUsername() + " :\n" +
2323 "Score : " + SpaceRocket.getGame().getCanvas().getGraphicsManager().getOtherSpaceRocket().GetScore();// + "\n" +
2424 // "Total lives lost : " + status.CoopTotalNumLivesLost + "\n" +
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/old/GraphicsManager.java
--- a/core/src/com/headwayent/spacerocket/old/GraphicsManager.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/GraphicsManager.java Thu Jan 13 16:57:58 2022 +0200
@@ -862,9 +862,9 @@
862862 }
863863
864864 synchronized public void updateScore(boolean isMP, boolean explode) {
865- if (spaceCanvas.getStatus().livesRemaining > 0) {
866- --spaceCanvas.getStatus().livesRemaining;
867- ++spaceCanvas.getStatus().totalNumLivesLost;
865+ if (spaceCanvas.getStatus().getLivesRemaining() > 0) {
866+ spaceCanvas.getStatus().decrementLivesRemaining();
867+ spaceCanvas.getStatus().incrementTotalNumLivesLost();
868868
869869 if (explode) {
870870 Vector2 p = spaceRocket.getSPPos();
@@ -873,7 +873,7 @@
873873 explosionSprite.launch(p.x, p.y);
874874 }
875875 }
876- if (spaceCanvas.getStatus().livesRemaining == 0) {
876+ if (spaceCanvas.getStatus().getLivesRemaining() == 0) {
877877
878878 spaceRocket.setVisible(false);
879879 }
@@ -901,7 +901,7 @@
901901 Random rand = SpaceRocket.getRandom();
902902 try {
903903 Status status = spaceCanvas.getStatus();
904- if (!spaceCanvas.getStatus().firstTime && spaceCanvas.getStatus().livesRemaining != 0) {
904+ if (!spaceCanvas.getStatus().isFirstTime() && spaceCanvas.getStatus().getLivesRemaining() != 0) {
905905 spaceRocket.advance(xDir, yDir, shoot);
906906 if (Utility.intersects(spaceRocket, fireSprite)) {
907907 fireSprite.setRegion(touchFireTransRegion);
@@ -974,17 +974,17 @@
974974 advancePlanet = 0;
975975 }
976976 }
977- if ((isMP) && (spaceRocket != null) && (spaceCanvas.getStatus().livesRemaining == 0)) {
977+ if ((isMP) && (spaceRocket != null) && (spaceCanvas.getStatus().getLivesRemaining() == 0)) {
978978 spaceRocket.setVisible(false);
979979 }
980980 if ((isMP) && (connectionThread != null) &&
981981 (connectionThread.getLiveGivenByOtherPlayer())) {
982- if (spaceCanvas.getStatus().livesRemaining == 0) {
982+ if (spaceCanvas.getStatus().getLivesRemaining() == 0) {
983983 spaceRocket.reset();
984984 spaceRocket.setVisible(true);
985985 }
986- if (spaceCanvas.getStatus().livesRemaining < 15) {
987- ++spaceCanvas.getStatus().livesRemaining;
986+ if (spaceCanvas.getStatus().getLivesRemaining() < 15) {
987+ spaceCanvas.getStatus().incrementLivesRemaining();
988988 }
989989 giveLifeSprite[0].setVisible(true);
990990 }
@@ -1041,7 +1041,7 @@
10411041 System.out.println("killedBoss out of range: " + killedBoss);
10421042 }
10431043 }
1044- if ((!isMP) && (spaceCanvas.getStatus().score == BOSS1_SCORE) && (!bossSprite[0].getLaunched()) &&
1044+ if ((!isMP) && (spaceCanvas.getStatus().getScore() == BOSS1_SCORE) && (!bossSprite[0].getLaunched()) &&
10451045 (!bossSpriteLaunched[0])) {
10461046 bossSprite[0].launchRandom();
10471047 bossSpriteLaunched[0] = true;
@@ -1049,7 +1049,7 @@
10491049 Gdx.input.vibrate(500);
10501050 }
10511051 }
1052- if ((!isMP) && (spaceCanvas.getStatus().score >= BOSS2_SCORE) && (!bossSprite[1].getLaunched()) &&
1052+ if ((!isMP) && (spaceCanvas.getStatus().getScore() >= BOSS2_SCORE) && (!bossSprite[1].getLaunched()) &&
10531053 (!bossSpriteLaunched[1]) && (bossSprite[0].getBossDestroyedSP())) {
10541054 bossSprite[1].launchRandom();
10551055 bossSpriteLaunched[1] = true;
@@ -1057,7 +1057,7 @@
10571057 Gdx.input.vibrate(500);
10581058 }
10591059 }
1060- if ((!isMP) && (spaceCanvas.getStatus().score >= BOSS3_SCORE) && (!bossSprite[2].getLaunched()) &&
1060+ if ((!isMP) && (spaceCanvas.getStatus().getScore() >= BOSS3_SCORE) && (!bossSprite[2].getLaunched()) &&
10611061 (!bossSpriteLaunched[2]) && (bossSprite[0].getBossDestroyedSP()) &&
10621062 (bossSprite[1].getBossDestroyedSP())) {
10631063 bossSprite[2].launchRandom();
@@ -1066,7 +1066,7 @@
10661066 Gdx.input.vibrate(500);
10671067 }
10681068 }
1069- if ((!isMP) && (spaceCanvas.getStatus().score >= BOSS4_SCORE) && (!bossSprite[3].getLaunched()) &&
1069+ if ((!isMP) && (spaceCanvas.getStatus().getScore() >= BOSS4_SCORE) && (!bossSprite[3].getLaunched()) &&
10701070 (!bossSpriteLaunched[3]) && (bossSprite[0].getBossDestroyedSP()) &&
10711071 (bossSprite[1].getBossDestroyedSP()) && (bossSprite[2].getBossDestroyedSP())) {
10721072 bossSprite[3].launchRandom();
@@ -1101,11 +1101,11 @@
11011101 int type = powerupSprite[i].collisionCheck(spaceRocket);
11021102 if (type != 0) {
11031103 spaceRocket.setPowerupType(type);
1104- ++spaceCanvas.getStatus().numPowerupsTaken;
1104+ spaceCanvas.getStatus().incrementNumPowerupsTaken();
11051105 switch (type) {
11061106 case 1: //IncreaseLives
1107- if (spaceCanvas.getStatus().livesRemaining < MAX_NUM_LIVES) {
1108- ++spaceCanvas.getStatus().livesRemaining;
1107+ if (spaceCanvas.getStatus().getLivesRemaining() < MAX_NUM_LIVES) {
1108+ spaceCanvas.getStatus().incrementLivesRemaining();
11091109 }
11101110 break;
11111111 case 2: //More damage to boss
@@ -1147,7 +1147,7 @@
11471147 if (connectionThread.getPowerupTakenByOtherShip()) {
11481148 if ((currentPowerup <= 3) && (currentPowerup >= 0)) {
11491149 powerupSprite[currentPowerup].reset();
1150- ++spaceCanvas.getStatus().coopNumPowerupsTaken;
1150+ spaceCanvas.getStatus().incrementCoopNumPowerupsTaken();
11511151 }
11521152
11531153 switch (currentPowerup) {
@@ -1326,7 +1326,7 @@
13261326 for (int i = 0; i < enemy.length; ++i) {
13271327 if (enemy[i].isVisible()) {
13281328 enemy[i].advance();
1329- if (!spaceCanvas.getStatus().firstTime) {
1329+ if (!spaceCanvas.getStatus().isFirstTime()) {
13301330 if (spaceRocket.collisionCheck(enemy[i])) {
13311331 updateScore(isMP, true);
13321332 if (i < (enemy.length - 1)) {
@@ -1349,8 +1349,7 @@
13491349 for (int j = 0; j < srrocketLeftSprite.length; ++j) {
13501350 if ((srrocketLeftSprite[j].isVisible()) && (enemy[i].isVisible())) {
13511351 if (enemy[i].collisionCheck(srrocketLeftSprite[j])) {
1352- spaceCanvas.getStatus().gameTicks += 100;
1353- ++spaceCanvas.getStatus().score;
1352+ spaceCanvas.getStatus().incrementScore();
13541353
13551354 if (i < (enemy.length - 1)) {
13561355 ++i;
@@ -1373,8 +1372,7 @@
13731372 for (int j = 0; j < srrocketRightSprite.length; ++j) {
13741373 if ((srrocketRightSprite[j].isVisible()) && (enemy[i].isVisible())) {
13751374 if (enemy[i].collisionCheck(srrocketRightSprite[j])) {
1376- spaceCanvas.getStatus().gameTicks += 100;
1377- ++spaceCanvas.getStatus().score;
1375+ spaceCanvas.getStatus().incrementScore();
13781376
13791377 if (i < (enemy.length - 1)) {
13801378 ++i;
@@ -1471,7 +1469,7 @@
14711469 for (int i = 0; i < enemyrocketSprite.length; ++i) {
14721470 if (enemyrocketSprite[i].isVisible()) {
14731471 enemyrocketSprite[i].advance();
1474- if (!spaceCanvas.getStatus().firstTime) {
1472+ if (!spaceCanvas.getStatus().isFirstTime()) {
14751473 if (spaceRocket.collisionCheck(enemyrocketSprite[i])) {
14761474 // synchronized (this) {
14771475 /* --status.LivesRemaining;
@@ -1597,8 +1595,7 @@
15971595 if (rocket[k].isVisible() && (enemy[i].isVisible())) {
15981596 if (enemy[i].collisionCheck(rocket[k])) {
15991597 if (updateScore) {
1600- spaceCanvas.getStatus().gameTicks += 100;
1601- ++spaceCanvas.getStatus().score;
1598+ spaceCanvas.getStatus().incrementScore();
16021599 }
16031600
16041601 if (i < (enemy.length - 1)) {
@@ -1617,8 +1614,8 @@
16171614 // if (!alreadyChecked) {
16181615 if (bossSprite[i].collisionCheck(rocket[j])) {
16191616 // alreadyChecked = true;
1620- if (updateScore) {
1621- ++spaceCanvas.getStatus().score;
1617+ if (updateScore) {
1618+ spaceCanvas.getStatus().incrementScore();
16221619 }
16231620 return true;
16241621 }
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/old/SendThread.java
--- a/core/src/com/headwayent/spacerocket/old/SendThread.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/SendThread.java Thu Jan 13 16:57:58 2022 +0200
@@ -228,11 +228,11 @@
228228 data.putFloat(xPosPerc);
229229 data.putFloat(yPosPerc);
230230 Status status = spaceCanvas.getStatus();
231- int score = status.score;
231+ int score = status.getScore();
232232 /* if(score > 0) {
233233 System.out.println("Error: Score increased to " + score);
234234 }*/
235- int lives = status.livesRemaining;
235+ int lives = status.getLivesRemaining();
236236 /* data[5] = (byte)(score >> 8);
237237 data[6] = (byte)(score);
238238 data[7] = (byte)(lives);*/
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/old/SpaceRocketSprite.java
--- a/core/src/com/headwayent/spacerocket/old/SpaceRocketSprite.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/SpaceRocketSprite.java Thu Jan 13 16:57:58 2022 +0200
@@ -220,7 +220,7 @@
220220
221221 synchronized public void DecrementLives() {
222222 if (lives > 0) {
223- ++(SpaceRocket.getGame().getCanvas().getStatus().coopTotalNumLivesLost);
223+ SpaceRocket.getGame().getCanvas().getStatus().incrementCoopTotalNumLivesLost();
224224 --lives;
225225 }
226226 }
diff -r 1cbeddcc438a -r ff36078372e1 core/src/com/headwayent/spacerocket/old/Status.java
--- a/core/src/com/headwayent/spacerocket/old/Status.java Thu Jan 13 00:23:11 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/Status.java Thu Jan 13 16:57:58 2022 +0200
@@ -3,15 +3,14 @@
33
44 public class Status {
55
6- public int score;
7- public int livesRemaining;
6+ private int score;
7+ private int livesRemaining;
88 private boolean gameOver;
9- public int gameTicks;
10- public boolean firstTime = true;
11- public int numPowerupsTaken;
12- public int coopNumPowerupsTaken;
13- public int totalNumLivesLost;
14- public int coopTotalNumLivesLost;
9+ private boolean firstTime = true;
10+ private int numPowerupsTaken;
11+ private int coopNumPowerupsTaken;
12+ private int totalNumLivesLost;
13+ private int coopTotalNumLivesLost;
1514 private boolean showHighScore;
1615
1716 public int getScore() {
@@ -22,6 +21,10 @@
2221 this.score = score;
2322 }
2423
24+ public void incrementScore() {
25+ ++score;
26+ }
27+
2528 public int getLivesRemaining() {
2629 return livesRemaining;
2730 }
@@ -30,6 +33,14 @@
3033 this.livesRemaining = livesRemaining;
3134 }
3235
36+ public void incrementLivesRemaining() {
37+ ++livesRemaining;
38+ }
39+
40+ public void decrementLivesRemaining() {
41+ --livesRemaining;
42+ }
43+
3344 public boolean isGameOver() {
3445 return gameOver;
3546 }
@@ -38,14 +49,6 @@
3849 this.gameOver = gameOver;
3950 }
4051
41- public int getGameTicks() {
42- return gameTicks;
43- }
44-
45- public void setGameTicks(int gameTicks) {
46- this.gameTicks = gameTicks;
47- }
48-
4952 public boolean isFirstTime() {
5053 return firstTime;
5154 }
@@ -62,6 +65,10 @@
6265 this.numPowerupsTaken = numPowerupsTaken;
6366 }
6467
68+ public void incrementNumPowerupsTaken() {
69+ ++numPowerupsTaken;
70+ }
71+
6572 public int getCoopNumPowerupsTaken() {
6673 return coopNumPowerupsTaken;
6774 }
@@ -70,6 +77,10 @@
7077 this.coopNumPowerupsTaken = coopNumPowerupsTaken;
7178 }
7279
80+ public void incrementCoopNumPowerupsTaken() {
81+ ++coopNumPowerupsTaken;
82+ }
83+
7384 public int getTotalNumLivesLost() {
7485 return totalNumLivesLost;
7586 }
@@ -78,6 +89,10 @@
7889 this.totalNumLivesLost = totalNumLivesLost;
7990 }
8091
92+ public void incrementTotalNumLivesLost() {
93+ ++totalNumLivesLost;
94+ }
95+
8196 public int getCoopTotalNumLivesLost() {
8297 return coopTotalNumLivesLost;
8398 }
@@ -86,6 +101,10 @@
86101 this.coopTotalNumLivesLost = coopTotalNumLivesLost;
87102 }
88103
104+ public void incrementCoopTotalNumLivesLost() {
105+ ++coopTotalNumLivesLost;
106+ }
107+
89108 public boolean isShowHighScore() {
90109 return showHighScore;
91110 }
diff -r 1cbeddcc438a -r ff36078372e1 ios/Info.plist.xml
--- a/ios/Info.plist.xml Thu Jan 13 00:23:11 2022 +0200
+++ b/ios/Info.plist.xml Thu Jan 13 16:57:58 2022 +0200
@@ -43,9 +43,9 @@
4343 <key>UISupportedInterfaceOrientations</key>
4444 <array>
4545 <string>UIInterfaceOrientationPortrait</string>
46- <string>UIInterfaceOrientationPortraitUpsideDown</string>
46+ <!-- <string>UIInterfaceOrientationPortraitUpsideDown</string>
4747 <string>UIInterfaceOrientationLandscapeLeft</string>
48- <string>UIInterfaceOrientationLandscapeRight</string>
48+ <string>UIInterfaceOrientationLandscapeRight</string> -->
4949 </array>
5050 <key>UILaunchStoryboardName</key>
5151 <string>LaunchScreen</string>