Entity which has the particle instance as an ObjectComponent. Подробнее...
Защищенные члены | |
void | ParticleInit () |
Empty - Only needed for Particle. | |
proto native void | SetParticleAutoDestroyFlags (ParticleAutoDestroyFlags flags) |
Enables the particle to automatically clean up itself when ending or stopping. | |
void | DisableAutoDestroy () |
Disables the particle automatically cleaning up itself when ending or stopping. | |
proto native int | GetParticleAutoDestroyFlags () |
Gets the currently set ParticleAutoDestroyFlags flags set on this ParticleSource. | |
Events | |
ParticleBase events For ParticleSource, these are handed on C++ side For more information, read ParticleEvents | |
void | OnParticleParented (IEntity parent) |
Event when the particle receives a parent. | |
void | OnParticleUnParented (IEntity parent) |
Event when the particle is orphaned. | |
void | OnParticleStop () |
Event when the particle stops. | |
Misc backwards compatibility helpers | |
Helpers for misc backwards compatibility functionality | |
override void | AddAsChild (Object parent, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_to_world=false) |
Attaches this particle onto some object. If null value is provided then the particle will be detached from the current parent. | |
Parameter API | |
Helpful methods for getting or setting parameters | |
override void | SetParticleParam (int parameter_id, float value) |
Set the value of a parameter of all emitors in the particle. | |
override void | SetParameter (int emitter, int parameter, float value) |
Set the value of a parameter of an emitor in the particle. | |
override void | GetParameter (int emitter, int parameter, out float value) |
Get the value of a parameter of an emitor in the particle. | |
override float | GetParameterEx (int emitter, int parameter) |
Get the value of a parameter of an emitor in the particle. | |
override void | ScaleParticleParamFromOriginal (int parameter_id, float coef) |
Scales the given parameter on all emitors relatively to their ORIGINAL value. | |
override void | ScaleParticleParam (int parameter_id, float coef) |
Scales the given parameter on all emitors relatively to their CURRENT value. | |
override void | IncrementParticleParamFromOriginal (int parameter_id, float value) |
Increments the value of the given parameter relatively from the ORIGINAL value. | |
override void | IncrementParticleParam (int parameter_id, float value) |
Increments the value of the given parameter relatively from the CURRENT value. | |
Защищенные статические члены | |
Create a particle (static) | |
Helper static methods to create/attach/play a ParticleSource on one line | |
static ParticleSource | CreateParticle (int id, vector pos, bool playOnCreation=false, Object parent=null, vector ori=vector.Zero, bool forceWorldRotation=false, Class owner=null) |
Create function. | |
static ParticleSource | CreateParticleEx (int id, vector pos, int flags=ParticlePropertiesFlags.NONE, Object parent=null, vector ori=vector.Zero, Class owner=null) |
Master create function. | |
static override Particle | CreateOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter and attaches it on the given object. | |
static override Particle | Create (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
Legacy function for backwards compatibility. | |
static override Particle | CreateInWorld (int particle_id, vector global_pos, vector global_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter on the given position. | |
static override ParticleSource | Create (int particle_id, vector global_pos, vector global_ori="0 0 0") |
Legacy function for backwards compatibility with 1.01 and below. | |
Static play on creation | |
You can use the following Play(...) functions to create and activate a particle in 1 line of your script. | |
static override Particle | PlayOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter, attaches it on the given object and activates it. | |
static override Particle | Play (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
Legacy function for backwards compatibility with 1.01 and below. | |
static override Particle | PlayInWorld (int particle_id, vector global_pos) |
Creates a particle emitter on the given position and activates it. | |
static override Particle | Play (int particle_id, vector global_pos) |
Legacy function for backwards compatibility with 1.01 and below. | |
Закрытые члены | |
void | ParticleSource () |
ctor | |
void | ~ParticleSource () |
dtor | |
Playback | |
Methods regarding playing/stopping of particle | |
proto bool | PlayParticleNative (int flags) |
Method to tell the particle to start playing. | |
override bool | PlayParticleEx (int particle_id=-1, int flags=0) |
Method to tell the particle to start playing. | |
proto bool | StopParticleNative (int flags) |
Method to tell the particle to stop playing. | |
override bool | StopParticle (int flags=0) |
Method to tell the particle to stop playing. | |
proto native bool | ResetParticleNative () |
Method to tell the particle to reset. | |
override bool | ResetParticle () |
Method to tell the particle to reset. | |
proto native bool | RestartParticleNative () |
Method to tell the particle to restart (reset + play) | |
override bool | RestartParticle () |
Method to tell the particle to restart (reset + play) | |
proto bool | IsParticlePlayingNative () |
Ask if the particle is still playing. | |
override bool | IsParticlePlaying () |
Ask if the particle is still playing. | |
SetParticle | |
Methods that set the particle to be used | |
proto native bool | SetParticleNative (string path) |
Assigns a particle to the ParticleSource. | |
bool | SetParticle (string path) |
Assigns a particle to the ParticleSource. | |
bool | SetParticleByID (int id) |
Assigns a particle to the ParticleSource. | |
override void | SetSource (int particle_id) |
Sets particle id. | |
GetParticle | |
Methods that get the particle assigned | |
proto bool | GetParticleNative (out string path, EGetParticleMode mode) |
Gets the path to the currently assigned particle. | |
bool | GetParticle (out string path, EGetParticleMode mode) |
Gets the path to the currently assigned particle. | |
override int | GetParticleID () |
Gets the ParticleList ID of the currently assigned particle. | |
int | GetParticleIDLegacy () |
Gets the ParticleList ID of the currently assigned particle. | |
Apply properties | |
Methods to apply properties to the particle | |
proto native bool | ApplyPropertiesNative (ParticleProperties properties) |
Applies the properties given to the ParticleSource. | |
bool | ApplyProperties (ParticleProperties properties) |
Applies the properties given to the ParticleSource. | |
Properties and state | |
Obtain information or set properties regarding the state of the Particle | |
override Object | GetDirectParticleEffect () |
Returns direct particle effect entity. | |
override Object | GetParticleParent () |
Returns the parent of this Particle if there is one. | |
proto bool | HasActiveParticleNative () |
Returns if there is any particle active. | |
override bool | HasActiveParticle () |
Returns if there is any particle active. | |
proto int | GetParticleCountNative () |
Returns the total count of active particles in all emitors. | |
override int | GetParticleCount () |
Returns the total count of active particles in all emitors. | |
proto bool | IsRepeatNative () |
Returns whether there is a repeating particle. | |
override bool | IsRepeat () |
Returns whether there is a repeating particle. | |
proto float | GetMaxLifetimeNative () |
Returns the approx. max lifetime. | |
override float | GetMaxLifetime () |
Returns the approx. max lifetime. | |
proto native Class | GetOwner () |
Get the owner of this ParticleSource. | |
proto native void | SetOwner (Class owner) |
Set the owner of this ParticleSource. | |
proto native void | Orphan () |
null the owner of this ParticleSource | |
Owning ParticleManager | |
Methods regarding the owner | |
proto native ParticleManager | GetParticleManager () |
Get the ParticleManager the ParticleSource belongs to if any. | |
proto native int | GetIndex () |
Get the index of this ParticleSource in the owning ParticleManager. | |
![]() | |
override void | PlayParticle (int particle_id=-1) |
Method to tell the particle to start playing. | |
override bool | PlayParticleEx (int particle_id=-1, int flags=0) |
Method to tell the particle to start playing. | |
void | Play (int particle_id=-1) |
Legacy function for backwards compatibility with 1.01 and below. | |
override bool | StopParticle (int flags=0) |
Method to tell the particle to stop playing. | |
void | Stop () |
Legacy function for backwards compatibility with 1.14 and below. | |
void | SetSource (int particle_id) |
Sets particle id. | |
int | GetParticleID () |
Gets particle id. | |
Object | GetDirectParticleEffect () |
Returns direct particle effect entity which is usually handled by this class 'Particle' if there is one. | |
Object | GetParticleParent () |
Returns the parent of this Particle if there is one. | |
bool | HasActiveParticle () |
Returns if there is any particle active. | |
int | GetParticleCount () |
Returns the total count of active particles in all emitors. | |
bool | IsRepeat () |
Returns whether there is a repeating particle. | |
float | GetMaxLifetime () |
Returns the approx. max lifetime. | |
void | ParticleInit () |
Purely here so that it can be emptied in ParticleSource. | |
vector | RandWiggleVector () |
Helper to get a randomized wiggle vector. | |
float | RandWiggleFloat () |
Helper to get a randomized wiggle float value. | |
void | UpdateState () |
Creates/Destroys ParticleEffect child according to current state. | |
Static counter API | |
Gives counter information for the class | |
proto int | GetCountID () |
Gets the ID for the ParticleSource. | |
proto static native int | GetStaticCount () |
Gets the amount of ParticleSource that have been created since the start of the program. | |
proto static native int | GetStaticActiveCount () |
Gets the amount of ParticleSource that are currently existing. | |
Wiggle API | |
Settings to make the Particle wiggle | |
void | RandomizeOrientation () |
Randomizes a new orientation and applies it. | |
override void | SetWiggle (float random_angle, float random_interval) |
Makes the particle change direction by random_angle every random_interval seconds. | |
override void | StopWiggle () |
Stops randomized wiggle. | |
Misc Particle specific helpers | |
Functionality specific for Particle, so we empty them here | |
void | UpdateState () |
Empty. | |
void | DestroyParticleEffect () |
Empty. | |
void | CreateParticleEffect () |
Empty. | |
void | OnCheckAutoDelete () |
Empty. | |
void | OnToDelete () |
Empty. | |
void | EOnFrame (IEntity other, float timeSlice) |
Empty. | |
Дополнительные унаследованные члены | |
![]() | |
static Particle | CreateOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter and attaches it on the given object. | |
static Particle | Create (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
Legacy function for backwards compatibility. | |
static Particle | CreateInWorld (int particle_id, vector global_pos, vector global_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter on the given position. | |
static Particle | Create (int particle_id, vector global_pos, vector global_ori="0 0 0") |
Legacy function for backwards compatibility with 1.01 and below. | |
static Particle | PlayOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
Creates a particle emitter, attaches it on the given object and activates it. | |
static Particle | Play (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
Legacy function for backwards compatibility with 1.01 and below. | |
static Particle | PlayInWorld (int particle_id, vector global_pos) |
Creates a particle emitter on the given position and activates it. | |
static Particle | Play (int particle_id, vector global_pos) |
Legacy function for backwards compatibility with 1.01 and below. | |
int | m_ParticleID |
ID from ParticleList if assigned. | |
float | m_Lifetime |
Approx. remaining lifetime of particle. | |
bool | m_IsRepeat |
Whether this particle repeats. | |
Object | m_ParentObject |
Parent Object the Particle is child of. | |
Object | m_ParticleEffect |
The child object which contains the actual particle. | |
int | m_PreviousFrame |
DEPRECATED. | |
Entity which has the particle instance as an ObjectComponent.
См. определение в файле ParticleSource.c строка 123