Jazz2::Actors::Solid::AmmoCrate class

Ammo crate.

A wooden crate marked with a weapon icon that breaks open when hit by a shot, TNT or a charged player, spilling ammunition for that weapon. If no contents are specified, it yields a random handful of ammo for weapons the players already carry.

Base classes

class GenericContainer
Base class of an item container.

Public static functions

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

Constructors, destructors, conversion operators

AmmoCrate()
Creates a new instance.

Public functions

auto OnHandleCollision(ActorBase* other) -> bool override
Called when the object collides with another object.

Protected functions

auto OnActivatedAsync(const ActorActivationDetails& details) -> Task<bool> override
Called when the object is created and activated.
auto OnPerish(ActorBase* collider) -> bool override
Called when the object has no health left and should perish.