Jazz2::Actors::Collectibles::CarrotCollectible class

Carrot (collectible).

The classic Jazz Jackrabbit health pickup. A regular carrot restores a single unit of health, while the full (max) carrot heals the player to full health and grants brief invulnerability. Awards points on pickup.

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

CarrotCollectible()
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.