Explosion class
#include <Jazz2/Actors/Explosion.h>
Explosion effects.
A transient visual effect actor spawned when something is destroyed, such as a projectile impact, an enemy death or a smoke/debris puff. It plays a single animation and then disappears. Covers several explosion and smoke variants (see Type).
Base classes
- class ActorBase
- Base class of an object.
Public types
- enum class Type { Tiny, TinyBlue, TinyDark, Small, SmallDark, Large, SmokeBrown, SmokeGray, SmokeWhite, SmokePoof, WaterSplash, Pepper, RF, RFUpgraded, Generator, IceShrapnel }
- Explosion effect type.
Public static functions
- static void Create(ILevelHandler* levelHandler, const Vector3i& pos, Type type, float scale = 1.0f)
- Spawns an explosion effect of a given type at a given position.
Constructors, destructors, conversion operators
- Explosion()
- Creates a new instance.
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 OnUpdateHitbox() override
- Called when the hitbox needs to be updated.
- void OnEmitLights(SmallVectorImpl<LightEmitter>& lights) override
- Called when emitting lights.
- void OnAnimationFinished() override
- Called when an animation finished.
Enum documentation
enum class Jazz2:: Actors:: Explosion:: Type
Explosion effect type.
| Enumerators | |
|---|---|
| Tiny |
Tiny explosion |
| TinyBlue |
Tiny blue explosion |
| TinyDark |
Tiny dark explosion |
| Small |
Small explosion |
| SmallDark |
Small dark explosion |
| Large |
Large explosion |
| SmokeBrown |
Brown smoke |
| SmokeGray |
Gray smoke |
| SmokeWhite |
White smoke |
| SmokePoof |
Smoke poof |
| WaterSplash |
Water splash |
| Pepper |
Pepper spray impact |
| RF |
RF missile explosion |
| RFUpgraded |
Upgraded RF missile explosion |
| Generator |
Generator (de)activation effect |
| IceShrapnel |
Ice shrapnel |