Class TamedFollowTask
java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.components.tasks.ChaseTask
com.csse3200.game.components.tasks.FollowTask
com.csse3200.game.components.tasks.TamedFollowTask
- All Implemented Interfaces:
PriorityTask
,Task
-
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
ConstructorsConstructorDescriptionTamedFollowTask
(Entity target, int priority, float viewDistance, float maxFollowDistance, float stoppingDistance, String favouriteFood, com.badlogic.gdx.math.Vector2 speed) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Determines the priority when the chase task is active based on the distance to the target and the visibility of the target entity.protected int
Determines the priority when the follow task is inactive based on the distance to the target, the visibility of the target entity, and the stopping distance.Methods inherited from class com.csse3200.game.components.tasks.FollowTask
start, stop, update
Methods inherited from class com.csse3200.game.components.tasks.ChaseTask
getDistanceToTarget, getMovementTask, getPriority, getRawPriority, getTarget, getViewDistance, isTargetVisible, setMovementTask
Methods inherited from class com.csse3200.game.ai.tasks.DefaultTask
create, getStatus
-
Constructor Details
-
TamedFollowTask
-
-
Method Details
-
getInactivePriority
protected int getInactivePriority()Description copied from class:FollowTask
Determines the priority when the follow task is inactive based on the distance to the target, the visibility of the target entity, and the stopping distance.- Overrides:
getInactivePriority
in classFollowTask
- Returns:
- The inactive priority level or -1 if conditions are not met.
-
getActivePriority
protected int getActivePriority()Description copied from class:ChaseTask
Determines the priority when the chase task is active based on the distance to the target and the visibility of the target entity.- Overrides:
getActivePriority
in classChaseTask
- Returns:
- The active priority level or -1 if chasing conditions are not met.
-