Jazz2::Actors::Bosses::Bolly class

Bolly (boss).

A large flying mechanical boss with a trailing chain tail that hovers around the arena tracking the nearest player. It periodically stops to launch a volley of homing rockets before resuming flight, and is defeated by depleting its health while dodging the rockets.

Base classes

class BossBase
Base class of an enemy boss.

Public static variables

static std::uint32_t BottomAnimation constexpr
Animation of the part below the body.
static std::uint32_t ChainBallAnimation constexpr
Animation of a ball of the chain.
static std::uint32_t ChainPieceAnimation constexpr
Animation of a small piece of the chain between the balls.
static std::int32_t NormalChainLength constexpr
Number of entries of the chain on difficulties below Hard.

Public static functions

static void Preload(const ActorActivationDetails& details)
Preloads all assets required by this actor.
static auto IsChainBall(std::int32_t index) -> bool constexpr
Returns whether an entry of the chain is a ball, the others are the small pieces between them.
static void GetChainOffsets(float chainPhase, std::int32_t chainLength, SmallVectorImpl<Vector2f>& offsets)
Appends where the entries of a whole chain are, from the position of the boss.

Constructors, destructors, conversion operators

Bolly()
Creates a new instance.
~Bolly()

Public functions

auto TakesSingleBlastDamage() const -> bool override
Returns true if a TNT blast takes only one point of health however close it is.

Protected functions

auto OnActivatedAsync(const ActorActivationDetails& details) -> Task<bool> override
Called when the object is created and activated.
auto OnActivatedBoss() -> bool override
Called when the boss is activated.
void OnUpdate(float timeMult) override
Called every frame to update the object state.
auto OnPerish(ActorBase* collider) -> bool override
Called when the object has no health left and should perish.

Function documentation

static void Jazz2::Actors::Bosses::Bolly::GetChainOffsets(float chainPhase, std::int32_t chainLength, SmallVectorImpl<Vector2f>& offsets)

Appends where the entries of a whole chain are, from the position of the boss.

chainPhase is how far the chain has swung, it starts at 0 and grows by 0.06 a frame. The level editor shows the boss this way, with its chain swinging.