Class DemonBossTask
java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.components.tasks.bosstask.DemonBossTask
- All Implemented Interfaces:
PriorityTask,Task
The AI Task for the demon boss entity. The demon boss will first play its transform animation
before beginning its sequence. Its sequence is based on its state and the different game
scenarios that happen in game dictate its state.
-
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 TypeMethodDescriptionvoidchangeBreathAttack(int numBalls, ProjectileEffects effect, boolean aoe) Changes current breath attack with the given parameters.intReturns the priority of this task.voidstart()Starts transform animation, triggers idle animation which starts sequence, and dynamically shifts the demons boundary to the left.voidupdate()This function is called every frame and is responsible for updating the animation, the position and the state scenarios.Methods inherited from class com.csse3200.game.ai.tasks.DefaultTask
create, getStatus, stop
-
Constructor Details
-
DemonBossTask
public DemonBossTask()The demon boss task constructor. Initialises the physics and time.
-
-
Method Details
-
start
public void start()Starts transform animation, triggers idle animation which starts sequence, and dynamically shifts the demons boundary to the left.- Specified by:
startin interfaceTask- Overrides:
startin classDefaultTask
-
update
public void update()This function is called every frame and is responsible for updating the animation, the position and the state scenarios.- Specified by:
updatein interfaceTask- Overrides:
updatein classDefaultTask
-
getPriority
public int getPriority()Returns the priority of this task.- Specified by:
getPriorityin interfacePriorityTask- Returns:
- priority of task
-
changeBreathAttack
Changes current breath attack with the given parameters.- Parameters:
numBalls- numbers of projectiles to be firedeffect- effect the projectile will applyaoe- whether the effect will be applied in a radius or not
-