Jazz2::Actors::Collectibles::CarrotInvincibleCollectible class

Invincible carrot (collectible).

The invincibility carrot from JJ2. Collecting it makes the player invulnerable to damage for a fixed duration and awards points.

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

CarrotInvincibleCollectible()
Creates a new instance.

Protected functions

auto OnActivatedAsync(const ActorActivationDetails& details) -> Task<bool> override
Called when the object is created and activated.
void OnCollect(Player* player) override
Called when the collectible is collected.