jjPARTICLE class
#include <Jazz2/Scripting/Legacy/Objects.h>
A simple visual effect in the level.
Particles are lightweight effects such as sparks, smoke, debris, weather or floating score text. They don't interact with objects or players and disappear on their own after a while. Up to 1024 particles exist at once, all listed in jjParticles. Create new ones with jjAddParticle(). Each type keeps its own extra properties in the member of the same name, for example jjPARTICLE::fire for PARTICLE::FIRE.
Public types
- union [union].GENERIC
- Type-specific particle data, interpreted according to particleType.
Constructors, destructors, conversion operators
- jjPARTICLE()
- Creates a new instance.
- ~jjPARTICLE()
Public functions
Public variables
- float xPos
- Horizontal position in pixels.
- float yPos
- Vertical position in pixels.
- float xSpeed
- Horizontal speed in pixels per tick.
- float ySpeed
- Vertical speed in pixels per tick.
-
std::
uint8_t particleType - Type of the particle.
- bool active
- Whether the particle is in use.
- union Jazz2::Scripting::Legacy::jjPARTICLE::@030124054217174367176150277273060140075265021041 GENERIC
Variable documentation
std:: uint8_t Jazz2:: Scripting:: Legacy:: jjPARTICLE:: particleType
Type of the particle.
One of the PARTICLE::Type constants, PARTICLE::INACTIVE for a free slot. Decides which of the type-specific members applies.
bool Jazz2:: Scripting:: Legacy:: jjPARTICLE:: active
Whether the particle is in use.
Set when a particle is created and cleared when it disappears. Checking jjPARTICLE::type against PARTICLE::INACTIVE is the more common way to tell.