Revision | e42a2d32b41d7cad7e9db065761fa3642191ec92 (tree) |
---|---|
Time | 2022-01-24 00:06:22 |
Author | sebastian_bugiu |
Commiter | sebastian_bugiu |
Made touch controls more responsive. Increased movement speed greatly.
@@ -50,7 +50,7 @@ | ||
50 | 50 | private static final int PLANET_NUM = 8; |
51 | 51 | public static final int ENEMY_LAUNCH_MISSILE_RAND = 100; |
52 | 52 | public static final int STAR_SPRITE_LAUNCH_RAND = 50; |
53 | - public static final float ARROWS_X_OFFSET = 20; | |
53 | + public static final float ARROWS_X_OFFSET = 15; | |
54 | 54 | private final TextureAtlas.AtlasRegion spaceRocketRegion; |
55 | 55 | private final TextureAtlas.AtlasRegion otherSpaceRocketRegion; |
56 | 56 | private final TextureAtlas.AtlasRegion touchArrowsPressedRegion; |
@@ -21,7 +21,7 @@ | ||
21 | 21 | public static int SR_MAX_SPEED; |
22 | 22 | private static int ROCKET_DISTANCE; |
23 | 23 | public static final int _ACC_SPEED = 1; |
24 | - public static final int _MAX_SPEED = 5; | |
24 | + public static final int _MAX_SPEED = 20; | |
25 | 25 | private static final int _ROCKET_DISTANCE = -24; |
26 | 26 | public static final int _ACC_SPEED_SM = 1; |
27 | 27 | public static final int _MAX_SPEED_SM = 2; |
@@ -426,8 +426,8 @@ | ||
426 | 426 | |
427 | 427 | public void advance(float left, float up, int shoot) { |
428 | 428 | synchronized (this) { |
429 | - speedX = Utility.clamp(speedX + SR_ACC_SPEED * left, -SR_MAX_SPEED, SR_MAX_SPEED); | |
430 | - speedY = Utility.clamp(speedY + SR_ACC_SPEED * up, -SR_MAX_SPEED, SR_MAX_SPEED); | |
429 | + speedX = Utility.clamp(SR_MAX_SPEED * left, -SR_MAX_SPEED, SR_MAX_SPEED); | |
430 | + speedY = Utility.clamp(SR_MAX_SPEED * up, -SR_MAX_SPEED, SR_MAX_SPEED); | |
431 | 431 | int shipOptions = Preferences.getInstance().getShipMovementType(); |
432 | 432 | if ((left == 0.0f) && (up == 0.0f)) { |
433 | 433 | if (shipOptions == 1) { |
@@ -467,6 +467,7 @@ | ||
467 | 467 | } |
468 | 468 | } |
469 | 469 | if ((speedX != 0.0f) || (speedY != 0.0f)) { |
470 | + System.out.println("left: " + left + " up: " + up + " speedX: " + speedX + " speedY: " + speedY); | |
470 | 471 | move(speedX, speedY); |
471 | 472 | } |
472 | 473 | 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=13 | |
5 | +app.build=14 | |
6 | 6 | app.name=Hotshot 2D |