BGE/ParticlePresets
Ready-made BGE.ParticleBurstStyle values for BGE.ParticleBurstPool.play(): blood and sparks for melee hits. Each returns a fresh style, so change any field before playing it.
Alias: BGE.ParticlePresets
Example
CODE
style = BGE.ParticlePresets.blood(&h8A1010, {unitsPerMetre: 32})
style.count = 30
m.bursts.play(hitPoint, awayFromAttacker, style)Static Methods
blood(
color?: integer,
options?: BGE.ParticlePresetOptions,
): BGE.ParticleBurstStyle
static
A spray of blood (or bone dust, slime: whatever color) for a hit that lands: 18 squares sized in world units, flung up and falling back.
Parameters
color(integer, optional, default: "&h8A1010") — RGBoptions(BGE.ParticlePresetOptions, optional, default: "{}")
Returns
blockSparks(
options?: BGE.ParticlePresetOptions,
): BGE.ParticleBurstStyle
static
A few short-lived sparks, e.g. a blocked hit: steel on steel.
Parameters
options(BGE.ParticlePresetOptions, optional, default: "{}")
Returns
parrySparks(
options?: BGE.ParticlePresetOptions,
): BGE.ParticleBurstStyle
static
A bigger, brighter shower of sparks than blockSparks(), e.g. a parry.
Parameters
options(BGE.ParticlePresetOptions, optional, default: "{}")
Returns
inUnits(
style: BGE.ParticleBurstStyle,
options: BGE.ParticlePresetOptions,
): BGE.ParticleBurstStyle
static
Scales a style authored in metres to world units, flipping its up direction for yDown.
Parameters
style(BGE.ParticleBurstStyle)options(BGE.ParticlePresetOptions)
Returns