GenericContainer class
Base class of an item container.
Shared base for the game's destructible containers (crates and barrels). A container holds a list of contents that are spawned and scattered outward when it is destroyed.
Base classes
- class Jazz2::Actors::SolidObjectBase
- Base class of a (pushable) solid object.
Derived classes
- class AmmoBarrel
- Ammo barrel.
- class AmmoCrate
- Ammo crate.
- class BarrelContainer
- Barrel container.
- class CrateContainer
- Crate container.
- class GemBarrel
- Gem barrel.
- class GemCrate
- Gem crate.
Constructors, destructors, conversion operators
- GenericContainer()
- Creates a new instance.
Public functions
- auto CanCauseDamage(ActorBase* collider) -> bool override
- Called to check whether
collidercan cause damage to the object.
Protected types
- struct ContainerContent
- Container content item.
Protected functions
- auto OnPerish(ActorBase* collider) -> bool override
- Called when the object has no health left and should perish.
-
void AddContent(EventType eventType,
std::
int32_t count, const std:: uint8_t* eventParams, std:: int32_t eventParamsSize) - Adds a content to the container.
- void SpawnContent()
- Spawns the added content.
Protected variables
- SmallVector<ContainerContent, 1> _content
- Content items to spawn when the container is destroyed.