TNT class
#include <Jazz2/Actors/Weapons/TNT.h>
TNT.
Placeable explosive that is dropped in place rather than fired. It detonates after a short fuse (sooner if an enemy or another exploding TNT comes near), pulsing and growing as the timer runs down, then damages all actors and destructible tiles within its blast radius.
Base classes
- class Jazz2::Actors::ActorBase
- Base class of an object.
Constructors, destructors, conversion operators
- TNT()
- Creates a new instance.
Public functions
- auto OnHandleCollision(ActorBase* other) -> bool override
- Called when the object collides with another object.
- auto GetOwner() -> Player*
- Returns owner of the TNT.
-
void OnFire(const std::
shared_ptr<ActorBase>& owner) - Called when the TNT is deployed.
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 OnEmitLights(SmallVectorImpl<LightEmitter>& lights) override
- Called when emitting lights.