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

Returns

blockSparks( options?: BGE.ParticlePresetOptions, ): BGE.ParticleBurstStyle

static

A few short-lived sparks, e.g. a blocked hit: steel on steel.

Parameters

Returns

parrySparks( options?: BGE.ParticlePresetOptions, ): BGE.ParticleBurstStyle

static

A bigger, brighter shower of sparks than blockSparks(), e.g. a parry.

Parameters

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

Returns