• R/O
  • SSH

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision2de887cf0af6e7f316f784cd3386c6695a9daebe (tree)
Zeit2022-01-26 21:55:03
Autorsebastian_bugiu
Commitersebastian_bugiu

Log Message

Updated difficulty progress.

Ändern Zusammenfassung

Diff

diff -r 78d150c45b49 -r 2de887cf0af6 core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java
--- a/core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java Tue Jan 25 18:42:38 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/ExtendedCanvas.java Wed Jan 26 14:55:03 2022 +0200
@@ -48,7 +48,7 @@
4848 public static final float ACCELEROMETER_ERROR = 3.0f;
4949 public static final float FLOAT_EPSILON = 0.00001f;
5050 private static final float CORNER_X = 0, CORNER_Y = 0;
51- public static final int NUM_LIVES = 1;
51+ public static final int NUM_LIVES = 5;
5252 private static final int HIDDEN_KEY_NUM_PRESSES = 10;
5353 public static final int FULL_ACCESS_SCORE = SpaceRocket.DEBUG ? 10 : 150;
5454 private static float FONT_HEIGHT;
diff -r 78d150c45b49 -r 2de887cf0af6 core/src/com/headwayent/spacerocket/old/ExtendedSprite.java
--- a/core/src/com/headwayent/spacerocket/old/ExtendedSprite.java Tue Jan 25 18:42:38 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/ExtendedSprite.java Wed Jan 26 14:55:03 2022 +0200
@@ -215,6 +215,13 @@
215215 if (SpaceRocket.getGame().getGameMode() == SpaceRocket.GameMode.SP) {
216216 if (SpaceRocket.getRandom().nextInt(7) == 0) {
217217 PowerupSprite powerupSprite = graphicsManager.getPowerupPool().removeOne();
218+// if (powerupSprite != null && powerupSprite.getType() == 1) {
219+// // We have an increase lives powerup.
220+// if (SpaceRocket.getRandom().nextInt(2) == 0) {
221+// powerupSprite.reset();
222+// powerupSprite = null;
223+// }
224+// }
218225 if (powerupSprite != null) {
219226 float xPos = getX() + (getWidth() * 0.5f) - (powerupSprite.getWidth() * 0.5f);
220227 float yPos = getY() + (getHeight() * 0.5f) - (powerupSprite.getHeight() * 0.5f);
diff -r 78d150c45b49 -r 2de887cf0af6 core/src/com/headwayent/spacerocket/old/GraphicsManager.java
--- a/core/src/com/headwayent/spacerocket/old/GraphicsManager.java Tue Jan 25 18:42:38 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/GraphicsManager.java Wed Jan 26 14:55:03 2022 +0200
@@ -17,10 +17,10 @@
1717
1818 public class GraphicsManager extends LayerManager {
1919
20- private static final int POWERUP_RATE = 70;
20+ private static final int POWERUP_RATE = 400;
2121 private static final int MAX_NUM_LIVES = 15;
2222 private static final int BOSS_ROCKET_LAUNCH_RAND = 25;
23- private static final int ENEMY_RAND_1 = 80;
23+ private static final int ENEMY_RAND_1 = 70;
2424 private static final int ENEMY_RAND_2 = 50;
2525 private static final int ENEMY_RAND_3 = 20;
2626 private static final int ENEMY_RAND_4 = 12;
@@ -34,14 +34,14 @@
3434 private static final int BOSS2_NUM_FRAMES = 3;
3535 private static final int BOSS3_NUM_FRAMES = 4;
3636 private static final int BOSS4_NUM_FRAMES = 1;
37- private static final int BOSS1_SCORE = 20;
38- private static final int BOSS2_SCORE = 60;
39- private static final int BOSS3_SCORE = 120;
40- private static final int BOSS4_SCORE = 200;
41- private static final int BOSS1_HEALTH = 20;
42- private static final int BOSS2_HEALTH = 30;
43- private static final int BOSS3_HEALTH = 40;
44- private static final int BOSS4_HEALTH = 60;
37+ private static final int BOSS1_SCORE = 30;
38+ private static final int BOSS2_SCORE = 80;
39+ private static final int BOSS3_SCORE = 200;
40+ private static final int BOSS4_SCORE = 500;
41+ private static final int BOSS1_HEALTH = 40;
42+ private static final int BOSS2_HEALTH = 80;
43+ private static final int BOSS3_HEALTH = 100;
44+ private static final int BOSS4_HEALTH = 140;
4545 private static final int GIVE_LIFE_FRAME_NUM = 3;
4646 private static final int ADVANCE_PLANET_FRAMES = 45;
4747 private static final int ADVANCE_EARTH_FRAMES = 45;
@@ -1096,6 +1096,16 @@
10961096
10971097 if ((!isMP) && (rand.nextInt(POWERUP_RATE) == 0)) {
10981098 PowerupSprite powerupSprite = getPowerupPool().removeOne();
1099+ if (powerupSprite != null && powerupSprite.getType() == 1) {
1100+ // We have an increase lives powerup.
1101+ if (SpaceRocket.getRandom().nextInt(2) == 0) {
1102+ powerupSprite.reset();
1103+ powerupSprite = null;
1104+ System.out.println("Reset increment lives powerup");
1105+ } else {
1106+ System.out.println("Launching increment lives powerup");
1107+ }
1108+ }
10991109 if (powerupSprite != null) {
11001110 powerupSprite.launchRandom();
11011111 }
@@ -1262,10 +1272,10 @@
12621272 int diffHelp = -1;
12631273 switch (difficulty) {
12641274 case EASY:
1265- diffHelp = 200;
1275+ diffHelp = 100;
12661276 break;
12671277 case MEDIUM:
1268- diffHelp = 100;
1278+ diffHelp = 50;
12691279 break;
12701280 case HARD:
12711281 diffHelp = 0;
diff -r 78d150c45b49 -r 2de887cf0af6 core/src/com/headwayent/spacerocket/old/PowerupSprite.java
--- a/core/src/com/headwayent/spacerocket/old/PowerupSprite.java Tue Jan 25 18:42:38 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/old/PowerupSprite.java Wed Jan 26 14:55:03 2022 +0200
@@ -49,28 +49,27 @@
4949 }
5050 }
5151
52- public void launch() {
52+ public void launchRandom() {
53+ super.launchRandom();
5354 beginTime = System.currentTimeMillis();
54- Random rand = SpaceRocket.getRandom();
55- int XPos = rand.nextInt((int) this.getRightBound());
56- int YPos = rand.nextInt((int) this.getBottomBound());
57- setPosition(XPos, YPos);
58- this.setSpeed(0, 0);
59- setVisible(true);
60- launchSmoke(0, 0);
55+// Random rand = SpaceRocket.getRandom();
56+// int XPos = rand.nextInt((int) this.getRightBound());
57+// int YPos = rand.nextInt((int) this.getBottomBound());
58+// setPosition(XPos, YPos);
59+// this.setSpeed(0, 0);
60+// setVisible(true);
61+// launchSmoke(0, 0);
6162 }
6263
6364 public void launch(float xPos, float yPos) {
65+ super.launch(xPos, yPos);
6466 beginTime = System.currentTimeMillis();
65- setPosition(xPos, yPos);
66- this.setSpeed(0, 0);
67- setVisible(true);
6867 launchSmoke(0, 0);
6968 }
7069
7170 public void launch(float XPos, float YPos, float xSpeed, float ySpeed) {
71+ super.launch(XPos, YPos, xSpeed, ySpeed);
7272 beginTime = System.currentTimeMillis();
73- super.launch(XPos, YPos, xSpeed, ySpeed);
7473 launchSmoke(xSpeed, ySpeed);
7574 }
7675
@@ -81,4 +80,8 @@
8180 }
8281
8382 }
83+
84+ public int getType() {
85+ return type;
86+ }
8487 }
diff -r 78d150c45b49 -r 2de887cf0af6 ios/robovm.properties
--- a/ios/robovm.properties Tue Jan 25 18:42:38 2022 +0200
+++ b/ios/robovm.properties Wed Jan 26 14:55:03 2022 +0200
@@ -2,5 +2,5 @@
22 app.id=com.headwayent.spacerocket
33 app.mainclass=com.headwayent.spacerocket.IOSLauncher
44 app.executable=IOSLauncher
5-app.build=15
5+app.build=17
66 app.name=Hotshot 2D