Skip to content

Commit

Permalink
Increased delay between projectiles and adjusted the spawning positio…
Browse files Browse the repository at this point in the history
…n of the projectile.
  • Loading branch information
meganroxburgh committed Sep 6, 2023
1 parent ffe3456 commit 6d77356
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MobAttackTask extends DefaultTask implements PriorityTask {
private long endTime;
private final RaycastHit hit = new RaycastHit();

private final long delay = 700; // delay between shots
private final long delay = 1000; // delay between shots
private long startTime;

private enum STATE {
Expand Down Expand Up @@ -127,7 +127,7 @@ public void updateMobState() {
} else {
owner.getEntity().getEvents().trigger(FIRING);
Entity newProjectile = ProjectileFactory.createFireBall(owner.getEntity(), new Vector2(0, owner.getEntity().getPosition().y), new Vector2(2f,2f));
newProjectile.setPosition((float) (owner.getEntity().getPosition().x - 0.75), (float) (owner.getEntity().getPosition().y));
newProjectile.setPosition((float) (owner.getEntity().getPosition().x), (float) (owner.getEntity().getPosition().y));
newProjectile.setScale(-1f, 0.5f);
ServiceLocator.getEntityService().register(newProjectile);
mobState = STATE.STOW;
Expand All @@ -149,7 +149,7 @@ public void updateMobState() {
}

/**
* For stopping the running task
* For stopping the attack task
*/
@Override
public void stop() {
Expand Down

0 comments on commit 6d77356

Please sign in to comment.