Revision | 78d150c45b49c188d6b72f2e84976a79b5fe7562 (tree) |
---|---|
Time | 2022-01-26 01:42:38 |
Author | sebastian_bugiu |
Commiter | sebastian_bugiu |
Removed ship movement settings.
@@ -24,6 +24,14 @@ | ||
24 | 24 | private float yTopArrows; |
25 | 25 | private float yBottomArrows; |
26 | 26 | |
27 | + public void reset() { | |
28 | + firePointer = -1; | |
29 | + arrowsPointer = -1; | |
30 | + fireSet = false; | |
31 | + firePressed = false; | |
32 | + arrowsPressed = false; | |
33 | + } | |
34 | + | |
27 | 35 | @Override |
28 | 36 | public boolean keyDown(int keycode) { |
29 | 37 | // ExtendedCanvas sc = game.getCanvas(); |
@@ -103,9 +103,9 @@ | ||
103 | 103 | table.row().pad(10, 0, 10, 0); |
104 | 104 | table.add(vibrationLabel).left(); |
105 | 105 | table.add(vibrationCheckbox); |
106 | - table.row().pad(10, 0, 10, 0); | |
107 | - table.add(shipMovementLabel).left(); | |
108 | - table.add(shipMovementSelectBox); | |
106 | +// table.row().pad(10, 0, 10, 0); | |
107 | +// table.add(shipMovementLabel).left(); | |
108 | +// table.add(shipMovementSelectBox); | |
109 | 109 | table.row().pad(10, 0, 10, 0); |
110 | 110 | table.add(backButton).colspan(2).fillX().uniformX(); |
111 | 111 |
@@ -48,7 +48,7 @@ | ||
48 | 48 | public static final float ACCELEROMETER_ERROR = 3.0f; |
49 | 49 | public static final float FLOAT_EPSILON = 0.00001f; |
50 | 50 | private static final float CORNER_X = 0, CORNER_Y = 0; |
51 | - public static final int NUM_LIVES = 10; | |
51 | + public static final int NUM_LIVES = 1; | |
52 | 52 | private static final int HIDDEN_KEY_NUM_PRESSES = 10; |
53 | 53 | public static final int FULL_ACCESS_SCORE = SpaceRocket.DEBUG ? 10 : 150; |
54 | 54 | private static float FONT_HEIGHT; |
@@ -166,6 +166,10 @@ | ||
166 | 166 | public void setGameOver() { |
167 | 167 | getStatus().setGameOver(true); |
168 | 168 | gameOver = false; |
169 | + getStatus().setFirstTime(true); | |
170 | + InGameInputProcessor inputProcessor = (InGameInputProcessor) Gdx.input.getInputProcessor(); | |
171 | + inputProcessor.reset(); | |
172 | + | |
169 | 173 | // getGameEngine().pauseApp(); |
170 | 174 | } |
171 | 175 |
@@ -412,7 +416,7 @@ | ||
412 | 416 | showFireToast = false; |
413 | 417 | } |
414 | 418 | checkFirePressed.set(true); |
415 | - if ((keyState & FIRE_PRESSED) != 0) { | |
419 | +// if ((keyState & FIRE_PRESSED) != 0) { | |
416 | 420 | getStatus().setFirstTime(false); |
417 | 421 | if(!gameLoaded) { |
418 | 422 | this.reset(); |
@@ -423,7 +427,7 @@ | ||
423 | 427 | if (inputProcessor.isFireSet()) { |
424 | 428 | recordKeyReleased(FIRE); |
425 | 429 | } |
426 | - } | |
430 | +// } | |
427 | 431 | return; |
428 | 432 | } |
429 | 433 |
@@ -674,8 +674,6 @@ | ||
674 | 674 | // remove(planetSprite[i]); |
675 | 675 | } |
676 | 676 | |
677 | - | |
678 | - | |
679 | 677 | append(spaceRocket); |
680 | 678 | spaceRocket.setVisible(true); |
681 | 679 | if (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.MP) { |
@@ -876,6 +874,13 @@ | ||
876 | 874 | if (spaceCanvas.getStatus().getLivesRemaining() == 0) { |
877 | 875 | |
878 | 876 | spaceRocket.setVisible(false); |
877 | + if (otherSpaceRocket != null) { | |
878 | + otherSpaceRocket.setVisible(false); | |
879 | + } | |
880 | + remove(spaceRocket); | |
881 | + if (otherSpaceRocket != null) { | |
882 | + remove(otherSpaceRocket); | |
883 | + } | |
879 | 884 | } |
880 | 885 | if (isMP) { |
881 | 886 | spaceRocket.LifeLost(); |
@@ -140,6 +140,9 @@ | ||
140 | 140 | } |
141 | 141 | |
142 | 142 | public boolean collisionCheck(ExtendedSprite s) { |
143 | + if (!isVisible()) { | |
144 | + return false; | |
145 | + } | |
143 | 146 | boolean ret = false; |
144 | 147 | if (s == null) { |
145 | 148 | System.out.println("SpaceRocketSprite s == null"); |
@@ -203,7 +206,9 @@ | ||
203 | 206 | public void reset() { |
204 | 207 | super.reset(); |
205 | 208 | this.setPosition(initialXPos, initialYPos); |
206 | - this.setVisible(true); | |
209 | + if (SpaceRocket.getGame().getCanvas().getStatus().getLivesRemaining() > 0) { | |
210 | + this.setVisible(true); | |
211 | + } | |
207 | 212 | speedX = 0; |
208 | 213 | speedY = 0; |
209 | 214 | currentDelay = 0; |
@@ -467,7 +472,7 @@ | ||
467 | 472 | } |
468 | 473 | } |
469 | 474 | if ((speedX != 0.0f) || (speedY != 0.0f)) { |
470 | - System.out.println("left: " + left + " up: " + up + " speedX: " + speedX + " speedY: " + speedY); | |
475 | +// System.out.println("left: " + left + " up: " + up + " speedX: " + speedX + " speedY: " + speedY); | |
471 | 476 | move(speedX, speedY); |
472 | 477 | } |
473 | 478 | if (invalidateSpeed.get()) { |
@@ -2,5 +2,5 @@ | ||
2 | 2 | app.id=com.headwayent.spacerocket |
3 | 3 | app.mainclass=com.headwayent.spacerocket.IOSLauncher |
4 | 4 | app.executable=IOSLauncher |
5 | -app.build=14 | |
5 | +app.build=15 | |
6 | 6 | app.name=Hotshot 2D |