EffectBase

All effect emitters are based on this type and can use its functions.

Summary
EffectBaseAll effect emitters are based on this type and can use its functions.
Member Functions
AddParticle
SetOffset
SetAdditionalVector
Related Constants
C_PROBABILITY_CONSTANTSUsed with EffectBase::AddParticle.
C_PROBABILITY_DEFAULTUsed to say “equal chance of creating all types particles we add”.

Member Functions

AddParticle

nil AddParticle(Particle particle, number probability)

Adds a new particle to be initted and sets the odds of choosing it versus other particles that have been added.

Parameters

particleA valid Particle object.
probabilityThe odds of this particle spawning compared with other particles that were added.  0.1 for 10 percent.  Use C_PROBABILITY_DEFAULT to let the emitter decide.

SetOffset

nil SetOffset(Vector2 vOffset)

Sets the effect position in relation to the entity it’s attached to.

Parameters

vOffsetA Vector2 object containing the offset coordinates.

SetAdditionalVector

nil SetAdditionalVector(Vector2 v)

This vector is added to the velocity of each particle once as it’s created.

Parameters

vA Vector2 object containing the vector to add.  Vector2(0,-1) would mean shoot up, for instance.

Related Constants

Summary
C_PROBABILITY_CONSTANTSUsed with EffectBase::AddParticle.
C_PROBABILITY_DEFAULTUsed to say “equal chance of creating all types particles we add”.

C_PROBABILITY_CONSTANTS

C_PROBABILITY_DEFAULT

Used to say “equal chance of creating all types particles we add”.

Information about a certain particle type that is shared between effects.
Used to say “equal chance of creating all types particles we add”.
The Vector2 object.