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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeBreathAttack
(int numBalls, ProjectileEffects effect, boolean aoe) Changes current breath attack with the given parameters.int
Returns the priority of this task.void
start()
Starts transform animation, triggers idle animation which starts sequence, and dynamically shifts the demons boundary to the left.void
update()
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:
start
in interfaceTask
- Overrides:
start
in 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:
update
in interfaceTask
- Overrides:
update
in classDefaultTask
-
getPriority
public int getPriority()Returns the priority of this task.- Specified by:
getPriority
in 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
-