Commit 38becbd 1 parent 5bbbc7c commit 38becbd Copy full SHA for 38becbd
File tree 4 files changed +6
-7
lines changed
4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,6 @@ private void updateGame(final long dt) {
119
119
final Iterator <Projectile > projectileIterator = world .getProjectiles ().iterator ();
120
120
while (projectileIterator .hasNext ()) {
121
121
final Projectile projectile = projectileIterator .next ();
122
- projectile .updateState (dt );
123
- world .update ();
124
122
// Projectile-Entity collision
125
123
if (gameObj instanceof Entity && gameObj .getCollider ().isColliding (projectile .getCollider ())) {
126
124
projectile .onEntityCollision ((Entity ) gameObj );
@@ -131,6 +129,7 @@ private void updateGame(final long dt) {
131
129
}
132
130
}
133
131
}
132
+ world .getProjectiles ().iterator ().forEachRemaining (p -> p .updateState (dt ));
134
133
}
135
134
136
135
private void checkDoorCollision (final GameObject gameObj ) {
Original file line number Diff line number Diff line change 12
12
*/
13
13
public class Explosive extends EnemyDecorator {
14
14
15
- private static final double PROJECTILE_VELOCITY = 0.025 ;
15
+ private static final double PROJECTILE_VELOCITY = 0.1 ;
16
16
private final int projectileAmount ;
17
17
private final double shootingAngle ;
18
18
private boolean exploded ;
Original file line number Diff line number Diff line change 17
17
public class Shooter extends EnemyDecorator {
18
18
19
19
private static final long TIME_BETWEEN_SHOTS = 2500 ;
20
- private static final double PROJECTILE_VELOCITY = 0.025 ;
20
+ private static final double PROJECTILE_VELOCITY = 0.13 ;
21
21
private final Damageable player ;
22
22
private long timeSinceLastShoot ;
23
23
Original file line number Diff line number Diff line change 17
17
public class PlayerImpl extends AbstractPlayer {
18
18
19
19
private static final int TOLERANCE = 5 ;
20
- private static final double PROJECTILE_VELOCITY_INCREMENT = 0.005 ;
21
- private static final double PROJECTILE_BASE_VELOCITY = 0.11 ;
22
- private static final long TIME_BETWEEN_SHOTS = 300 ;
20
+ private static final double PROJECTILE_VELOCITY_INCREMENT = 0.02 ;
21
+ private static final double PROJECTILE_BASE_VELOCITY = 0.2 ;
22
+ private static final long TIME_BETWEEN_SHOTS = 350 ;
23
23
private static final long TIME_BETWEEN_DAMAGE = 300 ;
24
24
private static final int PLAYER_INITIAL_HEALTH = 5 ;
25
25
private static final double PLAYER_INITIAL_SPEED = 0.11 ;
You can’t perform that action at this time.
0 commit comments