Package com.csse3200.game.ai.tasks
Class DefaultTask
java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
- All Implemented Interfaces:
Task
- Direct Known Subclasses:
BombshipCombatTask
,BombshipMovementTask
,BombshipWaitTask
,BombshipWanderTask
,ChaseTask
,CurrencyTask
,DemonBossTask
,DroidCombatTask
,EngineerCombatTask
,FinalBossMovementTask
,FireTowerCombatTask
,FireworksTowerCombatTask
,HumanMovementTask
,HumanWaitTask
,HumanWanderTask
,IceBabyTask
,MobAttackTask
,MobBossDeathTask
,MobDeathTask
,MobMeleeAttackTask
,MobRangedAttackTask
,MobShootTask
,MobWanderTask
,MovementTask
,MoveToMiddleTask
,PatrickDeathTask
,PatrickTask
,PatrickTeleportTask
,PierceTowerCombatTask
,RangeBossTask
,RicochetTowerCombatTask
,ScannerTask
,ShootTask
,SlimeyBoyTask
,SpawnWaveTask
,StunTowerCombatTask
,TNTTowerCombatTask
,TowerCombatTask
,TrajectTask
,WaitTask
,WallTowerDestructionTask
,WaveTask
A default task implementation that stores the associated entity and updates status when
starting/stopping a task. Removes some boilerplate code from each task.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.csse3200.game.ai.tasks.Task
Task.Status
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(TaskRunner taskRunner) Create the task and attach it to the task runner.Get the current status of the task.void
start()
Start running this task.void
stop()
Stop the task immediately.void
update()
Run one frame of the task.
-
Field Details
-
owner
-
status
-
-
Constructor Details
-
DefaultTask
public DefaultTask()
-
-
Method Details
-
create
Description copied from interface:Task
Create the task and attach it to the task runner. -
start
public void start()Description copied from interface:Task
Start running this task. This will usually be called by an AI controller. -
update
public void update()Description copied from interface:Task
Run one frame of the task. Similar to the update() in Components. -
stop
public void stop()Description copied from interface:Task
Stop the task immediately. This can be called at any time by the AI controller. -
getStatus
Description copied from interface:Task
Get the current status of the task.
-