Randomized initial shooting cooldown

This commit is contained in:
Natty 2022-04-27 19:36:14 +02:00
parent 635df54849
commit 61ce682270
No known key found for this signature in database
GPG Key ID: 40AB22FA416C7019
2 changed files with 4 additions and 3 deletions

View File

@ -43,7 +43,8 @@ public class EntityEnemyScout extends EntityEnemy
{ {
super.init(game, x, y); super.init(game, x, y);
this.movementChangeTimer = this.movementChangeInterval; this.movementChangeTimer = this.movementChangeInterval;
this.weaponCooldown = this.ammo.getCooldown() * 10.0f; var rand = this.game.getRandom();
this.weaponCooldown = this.ammo.getCooldown() * (9.0f + rand.nextFloat() * 3.0f);
} }
@Override @Override

View File

@ -45,8 +45,8 @@ public class EntityEnemySmallBomber extends EntityEnemy
{ {
super.init(game, x, y); super.init(game, x, y);
this.movementChangeTimer = this.movementChangeInterval; this.movementChangeTimer = this.movementChangeInterval;
this.weaponCooldown = this.ammo.getCooldown() * 10.0f; var rand = this.game.getRandom();
} this.weaponCooldown = this.ammo.getCooldown() * (9.0f + rand.nextFloat() * 3.0f); }
@Override @Override
public void tick(float delta) public void tick(float delta)