Jazz2::Actors::Collectibles::GemCollectible class

Gem (collectible).

The colored gems collected for points throughout JJ2. Red, green, and blue gems are worth increasing amounts (1, 5, and 10 respectively); purple gems also exist. Each gem adds to the player's gem count and score.

Base classes

class CollectibleBase
Base class of a collectible object.

Public static functions

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

Constructors, destructors, conversion operators

GemCollectible()
Creates a new instance.

Protected functions

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 OnUpdateHitbox() override
Called when the hitbox needs to be updated.
void OnCollect(Player* player) override
Called when the collectible is collected.