Jazz2::Actors::Bosses::Robot class

Robot (boss).

A giant robot, piloted by Devan in his remote-control battle. It descends by helicopter rotor, then runs toward the nearest player and, when one is close enough, lobs spike balls. It is defeated by depleting its health, after which it keeps exploding for a while, shedding sprite debris as it takes damage.

Base classes

class Jazz2::Actors::Enemies::EnemyBase
Base class of an enemy.

Public static functions

static void Preload(const ActorActivationDetails& details)
Preloads all assets required by this actor.

Constructors, destructors, conversion operators

Robot()
Creates a new instance.

Public functions

void Activate()
Activates the boss, making it visible and starting its fight.
void Deactivate()
Deactivates the boss, hiding it and returning it to the waiting state.
auto IsDeathFinished() const -> bool
Returns true when the explosion sequence after its defeat is over.

Protected functions

auto IsSerializable() const -> bool override
Returns true if the live state of the object can be stored in a level state snapshot.
auto OnActivatedAsync(const ActorActivationDetails& details) -> Task<bool> override
Called when the object is created and activated.
void OnUpdate(float timeMult) override
Called every frame to update the object state.
void OnHealthChanged(ActorBase* collider) override
Called when health of the object changed.
auto OnPerish(ActorBase* collider) -> bool override
Called when the object has no health left and should perish.

Function documentation

bool Jazz2::Actors::Bosses::Robot::IsSerializable() const override protected

Returns true if the live state of the object can be stored in a level state snapshot.

Only for objects spawned from an event registered in Events::EventSpawner. Short-lived objects can opt out by overriding it.