Class ShootTask
java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.components.tasks.ShootTask
- All Implemented Interfaces:
- Task
Shoots a projectile at a target in game.
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.csse3200.game.ai.tasks.TaskTask.Status
- 
Field SummaryFields inherited from class com.csse3200.game.ai.tasks.DefaultTaskowner, status
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfireProjectile(com.badlogic.gdx.math.Vector2 position) Fires projectile in game.voidstart()Start running this task.voidstop()Stop the task immediately.voidupdate()Run one frame of the task.Methods inherited from class com.csse3200.game.ai.tasks.DefaultTaskcreate, getStatus
- 
Constructor Details- 
ShootTaskCreates a new shoot task.- Parameters:
- target- The target Entity which the projectile will be fired at.
 
 
- 
- 
Method Details- 
startpublic void start()Description copied from interface:TaskStart running this task. This will usually be called by an AI controller.- Specified by:
- startin interface- Task
- Overrides:
- startin class- DefaultTask
 
- 
fireProjectilepublic void fireProjectile(com.badlogic.gdx.math.Vector2 position) Fires projectile in game.- Parameters:
- position- The position where the projectile is fired at.
 
- 
updatepublic void update()Description copied from interface:TaskRun one frame of the task. Similar to the update() in Components.- Specified by:
- updatein interface- Task
- Overrides:
- updatein class- DefaultTask
 
- 
stoppublic void stop()Description copied from interface:TaskStop the task immediately. This can be called at any time by the AI controller.- Specified by:
- stopin interface- Task
- Overrides:
- stopin class- DefaultTask
 
 
-