-
Notifications
You must be signed in to change notification settings - Fork 4
Mob Boss Factory
The mob boss entity is created to ensure that each level has its corresponding final boss. This is to create a diversity between levels and planets to make the game more enjoyable.
The function createBaseBoss()
is responsible for assigning the base components for all mob bosses within the game. The components added for the base boss are PhysicsCollider()
, ColliderComponent()
, PhysicsMovementComponent()
, HitboxComponent()
and TouchAttackComponent()
.
Entity boss = new Entity()
.addComponent(new PhysicsComponent())
.addComponent(new ColliderComponent())
.addComponent(new PhysicsMovementComponent())
.addComponent(new HitboxComponent().setLayer(PhysicsLayer.NPC))
.addComponent(new TouchAttackComponent(PhysicsLayer.HUMANS, 1.5f));
This function will build upon the createBaseBoss()
function and adds the specific AITaskComponent, DemonBossTask
. Demon boss is able to shoot burn projectiles and do AOE damage. Demon boss is also able to regenerate health once it hits half health.
AITaskComponent aiTaskComponent = new AITaskComponent()
.addTask(new DemonBossTask());
It also adds the animations to that entity.
demon
.addComponent(animator)
.addComponent(new DemonAnimationController())
Additionally, it also adds CombatStatsComponent()
to ensure the demon has health and attack.
Image for Demon:
This function will build upon the createBaseBoss()
function and adds the specific AITaskComponent, PatrickBossTask
. Patrick is able to teleport to the closest entity and do damage as well as shoot projectiles and melee attack. Once Patrick hits half health, it will shoot 5 projectiles of random effect.
AITaskComponent aiTaskComponent = new AITaskComponent()
.addTask(new PatrickBossTask());
It also adds the animations to that entity.
demon
.addComponent(animator)
.addComponent(new PatrickAnimationController())
Additionally, it also adds CombatStatsComponent()
to ensure the Patrick has health and attack.
Image for Patrick:
This function will build upon the createBaseBoss()
function and adds the specific AITaskComponent, IceBabyBossTask
. The Ice Baby is able to spawn water mobs and do AOE damage.
AITaskComponent aiTaskComponent = new AITaskComponent()
.addTask(new IceBabyBossTask());
It also adds the animations to that entity.
demon
.addComponent(animator)
.addComponent(new IceBabyAnimationController())
Additionally, it also adds CombatStatsComponent()
to ensure the Ice Baby has health and attack.
Image for Ice Baby: