Skip to content

Commit

Permalink
Renamed RangeBossMovementTask to RangeBossTask
Browse files Browse the repository at this point in the history
  • Loading branch information
ThivanW committed Sep 11, 2023
1 parent 10c630d commit 029ee22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* Wander around by moving a random position within a range of the starting position. Wait a little
* bit between movements. Requires an entity with a PhysicsMovementComponent.
*/
public class RangeBossMovementTask extends DefaultTask implements PriorityTask {
private static final Logger logger = LoggerFactory.getLogger(RangeBossMovementTask.class);
public class RangeBossTask extends DefaultTask implements PriorityTask {
private static final Logger logger = LoggerFactory.getLogger(RangeBossTask.class);

private final float waitTime;
private Vector2 currentPos;
Expand All @@ -33,7 +33,7 @@ public class RangeBossMovementTask extends DefaultTask implements PriorityTask {
/**
* @param waitTime How long in seconds to wait between wandering.
*/
public RangeBossMovementTask(float waitTime) {
public RangeBossTask(float waitTime) {

this.waitTime = waitTime;
physics = ServiceLocator.getPhysicsService().getPhysics();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.csse3200.game.ai.tasks.AITaskComponent;
import com.csse3200.game.components.*;
import com.csse3200.game.components.npc.BossAnimationController;
import com.csse3200.game.components.tasks.RangeBossMovementTask;
import com.csse3200.game.components.tasks.RangeBossTask;
import com.csse3200.game.entities.Entity;
import com.csse3200.game.entities.configs.BossKingConfigs;
import com.csse3200.game.entities.configs.NPCConfigs;
Expand All @@ -29,7 +29,7 @@ public static Entity createBossKing1(Entity target) {
BossKingConfigs config = configs.BossKing;
Entity bossKing1 = createBaseBoss(target);

AITaskComponent aiTaskComponent1 = new AITaskComponent().addTask(new RangeBossMovementTask(3f));
AITaskComponent aiTaskComponent1 = new AITaskComponent().addTask(new RangeBossTask(3f));

// Animation section
AnimationRenderComponent animator1 = new AnimationRenderComponent(
Expand All @@ -52,7 +52,7 @@ public static Entity createBossKing2(Entity target) {
BossKingConfigs config = configs.BossKing;
Entity bossKing2 = createBaseBoss(target);

AITaskComponent aiTaskComponent2 = new AITaskComponent().addTask(new RangeBossMovementTask(2f));
AITaskComponent aiTaskComponent2 = new AITaskComponent().addTask(new RangeBossTask(2f));

// Animation section
AnimationRenderComponent animator2 = new AnimationRenderComponent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void beforeEach() {

@Test
void shouldTriggerEvent() {
RangeBossMovementTask RBMTask = new RangeBossMovementTask(1f);
RangeBossTask RBMTask = new RangeBossTask(1f);

AITaskComponent aiTaskComponent = new AITaskComponent().addTask(RBMTask);
Entity entity = new Entity()
Expand Down

0 comments on commit 029ee22

Please sign in to comment.