Class MazePathFindingTask
java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.minigames.maze.components.tasks.MazePathFindingTask
- All Implemented Interfaces:
Task
Move to a given position, finishing when you get close enough. Requires an entity with a
PhysicsMovementComponent.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.csse3200.game.ai.tasks.Task
Task.Status
-
Field Summary
Fields inherited from class com.csse3200.game.ai.tasks.DefaultTask
owner, status
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setTarget
(com.badlogic.gdx.math.GridPoint2 target) Sets the target to find the path tovoid
start()
Starts this task and the movement taskvoid
stop()
Stops this task from runningvoid
update()
Updates this task, updates the next target in the movement task, computes new pathMethods inherited from class com.csse3200.game.ai.tasks.DefaultTask
create, getStatus, setOwner
-
Constructor Details
-
MazePathFindingTask
-
-
Method Details
-
start
public void start()Starts this task and the movement task- Specified by:
start
in interfaceTask
- Overrides:
start
in classDefaultTask
-
update
public void update()Updates this task, updates the next target in the movement task, computes new path- Specified by:
update
in interfaceTask
- Overrides:
update
in classDefaultTask
-
setTarget
public void setTarget(com.badlogic.gdx.math.GridPoint2 target) Sets the target to find the path to- Parameters:
target
- the target to find the path to
-
stop
public void stop()Stops this task from running- Specified by:
stop
in interfaceTask
- Overrides:
stop
in classDefaultTask
-