Skip to content

Commit

Permalink
Change Final Boss's files
Browse files Browse the repository at this point in the history
  • Loading branch information
lenhatminh451 committed Sep 11, 2023
1 parent fb9309d commit f213aef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,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 FinalBossMovementTask extends DefaultTask implements PriorityTask {
private static final Logger logger = LoggerFactory.getLogger(FinalBossMovementTask.class);
public class FinalBossTask extends DefaultTask implements PriorityTask {
private static final Logger logger = LoggerFactory.getLogger(FinalBossTask.class);

private final float waitTime;
private int currLane;
Expand All @@ -36,7 +36,7 @@ public class FinalBossMovementTask extends DefaultTask implements PriorityTask {
/**
* @param waitTime How long in seconds to wait between moving.
*/
public FinalBossMovementTask(float waitTime, int numLane) {
public FinalBossTask(float waitTime, int numLane) {
this.waitTime = waitTime;
this.currLane = numLane;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.csse3200.game.entities.factories;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
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.FinalBossMovementTask;
import com.csse3200.game.components.tasks.FinalBossTask;
import com.csse3200.game.components.tasks.RangeBossTask;
import com.csse3200.game.entities.Entity;
import com.csse3200.game.entities.configs.BossKingConfigs;
Expand All @@ -16,7 +15,6 @@
import com.csse3200.game.physics.PhysicsUtils;
import com.csse3200.game.physics.components.*;
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.rendering.TextureRenderComponent;
import com.csse3200.game.services.ServiceLocator;

public class BossKingFactory {
Expand All @@ -30,7 +28,7 @@ public static Entity createBossKing1(Entity target, int numLane) {
BossKingConfigs config = configs.BossKing;
Entity bossKing1 = createBaseBoss(target);

AITaskComponent aiTaskComponent1 = new AITaskComponent().addTask(new FinalBossMovementTask(1f, numLane));
AITaskComponent aiTaskComponent1 = new AITaskComponent().addTask(new FinalBossTask(1f, numLane));

// Animation section
AnimationRenderComponent animator1 = new AnimationRenderComponent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@ExtendWith(GameExtension.class)
@ExtendWith(MockitoExtension.class)
class FinalBossMovementTaskTest {
class FinalBossTaskTest {
@Mock
GameTime gameTime;

Expand All @@ -31,7 +31,7 @@ void beforeEach() {

@Test
void shouldTriggerEvent() {
FinalBossMovementTask FBMTask = new FinalBossMovementTask(1f, 2);
FinalBossTask FBMTask = new FinalBossTask(1f, 2);

AITaskComponent aiTaskComponent = new AITaskComponent().addTask(FBMTask);
Entity entity = new Entity().addComponent(aiTaskComponent).addComponent(new PhysicsMovementComponent());
Expand Down

0 comments on commit f213aef

Please sign in to comment.