Class DemonBossTask

java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.components.tasks.bosstask.DemonBossTask
All Implemented Interfaces:
PriorityTask, Task

public class DemonBossTask extends DefaultTask implements PriorityTask
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
    Constructor
    Description
    The demon boss task constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    changeBreathAttack(int numBalls, ProjectileEffects effect, boolean aoe)
    Changes current breath attack with the given parameters.
    int
    Returns the priority of this task.
    void
    Starts transform animation, triggers idle animation which starts sequence, and dynamically shifts the demons boundary to the left.
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.csse3200.game.ai.tasks.Task

    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 interface Task
      Overrides:
      start in class DefaultTask
    • 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 interface Task
      Overrides:
      update in class DefaultTask
    • getPriority

      public int getPriority()
      Returns the priority of this task.
      Specified by:
      getPriority in interface PriorityTask
      Returns:
      priority of task
    • changeBreathAttack

      public void changeBreathAttack(int numBalls, ProjectileEffects effect, boolean aoe)
      Changes current breath attack with the given parameters.
      Parameters:
      numBalls - numbers of projectiles to be fired
      effect - effect the projectile will apply
      aoe - whether the effect will be applied in a radius or not