DayZ 1.24
Loading...
Searching...
No Matches
ParticleSource Class Reference

Entity which has the particle instance as an ObjectComponent. More...

Inheritance diagram for ParticleSource:
[legend]
Collaboration diagram for ParticleSource:
[legend]

Protected Member Functions

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.
 

Static Protected Member Functions

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.
 

Private Member Functions

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.
 
- Private Member Functions inherited from Particle
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.
 

Additional Inherited Members

- Static Private Member Functions inherited from Particle
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.
 
- Private Attributes inherited from Particle
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.
 

Detailed Description

Entity which has the particle instance as an ObjectComponent.

Note
Unfortunately the native methods are private and have a script wrapper This is because of backwards compatibility with the old Particle and to avoid confusion As we should continue to use Particle for consistency, as it is too deeply rooted in script Which means switching is no longer possible due to it being harmful for already existing mods Even though using the ParticleSource directly would be preferred
Some variables from Particle are invalid on this level, those marked DEPRECATED by Particle are still DEPRECATED here m_ParticleID; //!< INVALID - Use GetParticleID() instead m_Lifetime; //!< INVALID - No EOnFrame, so no use for it m_IsPlaying; //!< VALID - Set through events - IsParticlePlaying() is still better m_IsRepeat; //!< INVALID - Use IsRepeat() instead m_MarkedForDeletion; //!< INVALID - No EOnFrame, so no use for it Wiggle API variables are still used for Wiggle API m_ParentObject; //!< VALID - Set through events - Or use GetParticleParent() or GetParent() m_ParticleEffect; //!< VALID - Not in the same usage as Particle, as it will always be 'this', never null

Definition at line 123 of file ParticleSource.c.

Constructor & Destructor Documentation

◆ ParticleSource()

void ParticleSource::ParticleSource ( )
inlineprivate

ctor

Definition at line 126 of file ParticleSource.c.

127 {
128 m_ParticleEffect = this;
129 }
Object m_ParticleEffect
The child object which contains the actual particle.
Definition Particle.c:50

References Particle::m_ParticleEffect.

◆ ~ParticleSource()

void ParticleSource::~ParticleSource ( )
inlineprivate

dtor

Definition at line 132 of file ParticleSource.c.

133 {
134 }

Member Function Documentation

◆ AddAsChild()

override void ParticleSource::AddAsChild ( Object parent,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0",
bool force_rotation_to_world = false )
inlineprotected

Attaches this particle onto some object. If null value is provided then the particle will be detached from the current parent.

Note
Unlike Particle, you are free to use AddChild/RemoveChild instead of this one if you know what you are doing
Parameters
parentObject Parent onto which this particle will be attached
local_posvector Attachment position local to the parent (optional)
local_orivector Orientation local to the parent (Pitch, Yawn, Roll in degrees) (Optional)
force_rotation_to_worldbool Force rotation to be in WS (Optional)

Definition at line 769 of file ParticleSource.c.

770 {
771 int flags = ParticlePropertiesFlags.NONE;
772
774 flags = ParticlePropertiesFlags.FORCE_WORLD_ROT;
775
776 ParticleProperties props = new ParticleProperties(local_pos, flags, parent, local_ori);
778 }
bool ApplyProperties(ParticleProperties properties)
Applies the properties given to the ParticleSource.

References ApplyProperties().

◆ ApplyProperties()

bool ParticleSource::ApplyProperties ( ParticleProperties properties)
inlineprivate

Applies the properties given to the ParticleSource.

Parameters
propertiesParticleProperties The properties to apply
Returns
bool Whether the properties were successfully applied

Definition at line 538 of file ParticleSource.c.

539 {
541 }
proto native bool ApplyPropertiesNative(ParticleProperties properties)
Applies the properties given to the ParticleSource.

References ApplyPropertiesNative().

Referenced by AddAsChild(), RandomizeOrientation(), and StopWiggle().

◆ ApplyPropertiesNative()

proto native bool ParticleSource::ApplyPropertiesNative ( ParticleProperties properties)
private

Applies the properties given to the ParticleSource.

Note
Already handles proper reparenting
Parameters
propertiesParticleProperties The properties to apply
Returns
bool Whether the properties were successfully applied

Referenced by ApplyProperties().

◆ Create() [1/2]

static override Particle ParticleSource::Create ( int particle_id,
Object parent_obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0" )
inlinestaticprotected

Legacy function for backwards compatibility.

Definition at line 245 of file ParticleSource.c.

246 {
248 }
int particle_id
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.

References CreateOnObject(), and particle_id.

◆ Create() [2/2]

static override ParticleSource ParticleSource::Create ( int particle_id,
vector global_pos,
vector global_ori = "0 0 0" )
inlinestaticprotected

Legacy function for backwards compatibility with 1.01 and below.

Definition at line 266 of file ParticleSource.c.

267 {
269 }
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.

References CreateInWorld(), and particle_id.

◆ CreateInWorld()

static override Particle ParticleSource::CreateInWorld ( int particle_id,
vector global_pos,
vector global_ori = "0 0 0",
bool force_world_rotation = false )
inlinestaticprotected

Creates a particle emitter on the given position.

Parameters
particle_idint Particle ID registered in ParticleList
global_posVector Position where the particel will be created
global_orivector Orientation (Pitch, Yawn, Roll in degrees) (Optional)
force_world_rotationbool Has absolutely no effect here as there is no parent
Returns
Particle Created particle instance

Definition at line 258 of file ParticleSource.c.

259 {
261 }
void CreateParticle()

References CreateParticle(), and particle_id.

Referenced by Create().

◆ CreateOnObject()

static override Particle ParticleSource::CreateOnObject ( int particle_id,
Object parent_obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0",
bool force_world_rotation = false )
inlinestaticprotected

Creates a particle emitter and attaches it on the given object.

Parameters
particle_idint Particle ID registered in ParticleList
parent_objObject Instance on which this particle will be attached
local_posvector Attachment position local to the parent (Optional)
local_orivector Orientation local to the parent (Pitch, Yaw, Roll in degrees) (Optional)
force_world_rotationbool Forces particle's orientation to rotate relative to the world and not with the object (Optional)
Returns
Particle Created particle instance

Definition at line 232 of file ParticleSource.c.

References CreateParticle(), and particle_id.

Referenced by Create().

◆ CreateParticle()

static ParticleSource ParticleSource::CreateParticle ( int id,
vector pos,
bool playOnCreation = false,
Object parent = null,
vector ori = vector.Zero,
bool forceWorldRotation = false,
Class owner = null )
inlinestaticprotected

Create function.

Parameters
idint Particle ID registered in ParticleList
posvector Position of ParticleSource in LS (WS when no parent)
playOnCreationbool Whether to play immediately after creation (Optional)
parentObject Parent Object which will child the ParticleSource (Optional)
orivector Orientation of ParticleSource in LS (WS when no parent) (Pitch, Yaw, Roll in degrees) (Optional)
forceWorldRotationbool Forces orientation to rotate relative to the world and not with the parent (Optional)
ownerClass The owning instance for this particle (Optional)
Returns
ParticleSource Created particle instance when successful

Definition at line 178 of file ParticleSource.c.

179 {
180 int flags = ParticlePropertiesFlags.NONE;
181
182 if (playOnCreation)
183 flags = flags | ParticlePropertiesFlags.PLAY_ON_CREATION;
184
186 flags = flags | ParticlePropertiesFlags.FORCE_WORLD_ROT;
187
188 return CreateParticleEx(id, pos, flags, parent, ori, owner);
189 }
static ParticleSource CreateParticleEx(int id, vector pos, int flags=ParticlePropertiesFlags.NONE, Object parent=null, vector ori=vector.Zero, Class owner=null)
Master create function.

References CreateParticleEx().

Referenced by PMTPlayback::TestOnePlayingStandAlone(), PMTPlayback::TestOnePlayingStandAloneAutoDestroy(), PMTPlayback::TestStopping(), and PMTPlayback::TestWiggleStress().

◆ CreateParticleEffect()

void ParticleSource::CreateParticleEffect ( )
inlineprivate

Empty.

Definition at line 1002 of file ParticleSource.c.

1002{ ErrorEx("Should not be in use on ParticleSource."); }
enum ShapeType ErrorEx

References ErrorEx.

◆ CreateParticleEx()

static ParticleSource ParticleSource::CreateParticleEx ( int id,
vector pos,
int flags = ParticlePropertiesFlags.NONE,
Object parent = null,
vector ori = vector.Zero,
Class owner = null )
inlinestaticprotected

Master create function.

Parameters
idint Particle ID registered in ParticleList
posvector Position of ParticleSource in LS (WS when no parent)
flagsint See ParticlePropertiesFlags (Optional)
parentObject Parent Object which will child the ParticleSource (Optional)
orivector Orientation of ParticleSource in LS (WS when no parent) (Pitch, Yaw, Roll in degrees) (Optional)
ownerClass The owning instance for this particle (Optional)
Returns
ParticleSource Created particle instance when successful

Definition at line 201 of file ParticleSource.c.

202 {
204 if (particlePath == "") // There is already an error inside of ParticleList signaling this
205 {
206 ErrorEx(string.Format("Could not create ParticleSource as particle id %1 is invalid.", id));
207 return null;
208 }
209
210 vector localPos = pos;
211
212 if (parent)
213 pos = parent.GetPosition();
214
215 ParticleSource p = ParticleSource.Cast(GetGame().CreateObjectEx("ParticleSource", pos, ECE_LOCAL));
216 p.SetParticle(particlePath);
217 ParticleProperties props = new ParticleProperties(localPos, flags, parent, ori, owner);
218 p.ApplyProperties(props);
219
220 return p;
221 }
const int ECE_LOCAL
static string GetParticleFullPath(int particle_id)
Returns particle's full path (with .ptc suffix) based on its ID.
Entity which has the particle instance as an ObjectComponent.
proto native CGame GetGame()

References ECE_LOCAL, ErrorEx, GetGame(), and ParticleList::GetParticleFullPath().

Referenced by CreateParticle().

◆ DestroyParticleEffect()

void ParticleSource::DestroyParticleEffect ( )
inlineprivate

Empty.

Definition at line 999 of file ParticleSource.c.

999{ ErrorEx("Should not be in use on ParticleSource."); }

References ErrorEx.

◆ DisableAutoDestroy()

void ParticleSource::DisableAutoDestroy ( )
inlineprotected

Disables the particle automatically cleaning up itself when ending or stopping.

Definition at line 151 of file ParticleSource.c.

152 {
154 }
ParticleAutoDestroyFlags
Flags to pass to ParticleSource.SetParticleAutoDestroyFlags.
proto native void SetParticleAutoDestroyFlags(ParticleAutoDestroyFlags flags)
Enables the particle to automatically clean up itself when ending or stopping.

References SetParticleAutoDestroyFlags().

◆ EOnFrame()

void ParticleSource::EOnFrame ( IEntity other,
float timeSlice )
inlineprotected

Empty.

Definition at line 1005 of file ParticleSource.c.

1005{ ErrorEx("Should not be in use on ParticleSource."); }

References ErrorEx.

◆ GetCountID()

proto int ParticleSource::GetCountID ( )
private

Gets the ID for the ParticleSource.

Note
Different every restart, as it is the nth instance created since the start of the program
Returns
int ID for the ParticleSource

◆ GetDirectParticleEffect()

override Object ParticleSource::GetDirectParticleEffect ( )
inlineprivate

Returns direct particle effect entity.

Note
Backwards compatibility with Particle, here it is the Object itself
Returns
Object The Object with the particle component (this)

Definition at line 556 of file ParticleSource.c.

557 {
558 return this;
559 }

◆ GetIndex()

proto native int ParticleSource::GetIndex ( )
private

Get the index of this ParticleSource in the owning ParticleManager.

Returns
int The index in the pool in the owning ParticleManager, -1 if no owner

◆ GetMaxLifetime()

override float ParticleSource::GetMaxLifetime ( )
inlineprivate

Returns the approx. max lifetime.

Returns
float The largest lifetime sum among the emitors

Definition at line 627 of file ParticleSource.c.

628 {
629 return GetMaxLifetimeNative();
630 }
proto float GetMaxLifetimeNative()
Returns the approx. max lifetime.

References GetMaxLifetimeNative().

◆ GetMaxLifetimeNative()

proto float ParticleSource::GetMaxLifetimeNative ( )
private

Returns the approx. max lifetime.

Returns
float The largest lifetime sum among the emitors

Referenced by GetMaxLifetime().

◆ GetOwner()

proto native Class ParticleSource::GetOwner ( )
private

Get the owner of this ParticleSource.

Returns
Class The owner or null

Referenced by RandomizeOrientation(), and StopWiggle().

◆ GetParameter()

override void ParticleSource::GetParameter ( int emitter,
int parameter,
out float value )
inlineprotected

Get the value of a parameter of an emitor in the particle.

Parameters
emitterint The emitor to get the value from
parameterint The parameter to get the value from (enum EmitorParam)
valuefloat The value

Definition at line 815 of file ParticleSource.c.

816 {
818 }
proto void GetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, out void value)

References GetParticleParm().

◆ GetParameterEx()

override float ParticleSource::GetParameterEx ( int emitter,
int parameter )
inlineprotected

Get the value of a parameter of an emitor in the particle.

Parameters
emitterint The emitor to get the value from
parameterint The parameter to get the value from (enum EmitorParam)
Returns
float The value

Definition at line 826 of file ParticleSource.c.

827 {
828 float value;
830 return value;
831 }

References GetParticleParm().

◆ GetParticle()

bool ParticleSource::GetParticle ( out string path,
EGetParticleMode mode )
inlineprivate

Gets the path to the currently assigned particle.

Parameters
pathstring Path of particle effect
modeEGetParticleMode What path to return
Returns
bool Whether the path is filled in or not

Definition at line 484 of file ParticleSource.c.

485 {
486 return GetParticleNative(path, mode);
487 }
proto bool GetParticleNative(out string path, EGetParticleMode mode)
Gets the path to the currently assigned particle.

References GetParticleNative(), and path.

Referenced by GetParticleID(), and GetParticleIDLegacy().

◆ GetParticleAutoDestroyFlags()

proto native int ParticleSource::GetParticleAutoDestroyFlags ( )
protected

Gets the currently set ParticleAutoDestroyFlags flags set on this ParticleSource.

Returns
int Currently set ParticleAutoDestroyFlags flags set on this ParticleSource

◆ GetParticleCount()

override int ParticleSource::GetParticleCount ( )
inlineprivate

Returns the total count of active particles in all emitors.

Note
Internally does a sum, HasActiveParticle is better for a quick check
Returns
int Total count of active particles

Definition at line 597 of file ParticleSource.c.

598 {
599 return GetParticleCountNative();
600 }
proto int GetParticleCountNative()
Returns the total count of active particles in all emitors.

References GetParticleCountNative().

◆ GetParticleCountNative()

proto int ParticleSource::GetParticleCountNative ( )
private

Returns the total count of active particles in all emitors.

Note
Internally does a sum, HasActiveParticle is better for a quick check
Returns
int Total count of active particles

Referenced by GetParticleCount().

◆ GetParticleID()

override int ParticleSource::GetParticleID ( )
inlineprivate

Gets the ParticleList ID of the currently assigned particle.

Returns
int ID of particle registered in ParticleList

Definition at line 493 of file ParticleSource.c.

494 {
495 string path;
498 else
499 return -1;
500 }
static int GetParticleIDByName(string name)
Returns particle's ID based on the filename (without .ptc suffix)
bool GetParticle(out string path, EGetParticleMode mode)
Gets the path to the currently assigned particle.

References GetParticle(), ParticleList::GetParticleIDByName(), and path.

◆ GetParticleIDLegacy()

int ParticleSource::GetParticleIDLegacy ( )
inlineprivate

Gets the ParticleList ID of the currently assigned particle.

Note
This is because the new GetParticleID will only work when every particle file name has a unique name In case this is not the case, then this method is what one will want to use
Returns
int ID of particle registered in ParticleList

Definition at line 508 of file ParticleSource.c.

509 {
510 string path;
511 if (GetParticle(path, EGetParticleMode.NO_EXT))
513 else
514 return -1;
515 }
static int GetParticleID(string particle_file)
Returns particle's ID based on the path (without .ptc suffix)

References GetParticle(), ParticleList::GetParticleID(), and path.

◆ GetParticleManager()

proto native ParticleManager ParticleSource::GetParticleManager ( )
private

Get the ParticleManager the ParticleSource belongs to if any.

Returns
ParticleManager The ParticleManager which created the ParticleSource or null

◆ GetParticleNative()

proto bool ParticleSource::GetParticleNative ( out string path,
EGetParticleMode mode )
private

Gets the path to the currently assigned particle.

Parameters
pathstring Path of particle effect
modeEGetParticleMode What path to return
Returns
bool Whether the path is filled in or not

Referenced by GetParticle().

◆ GetParticleParent()

override Object ParticleSource::GetParticleParent ( )
inlineprivate

Returns the parent of this Particle if there is one.

Returns
Object The parent or null if there is none

Definition at line 565 of file ParticleSource.c.

566 {
567 return Object.Cast(GetParent());
568 }
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:389

References GetParent().

Referenced by RandomizeOrientation(), and StopWiggle().

◆ GetStaticActiveCount()

proto static native int ParticleSource::GetStaticActiveCount ( )
staticprivate

Gets the amount of ParticleSource that are currently existing.

Returns
int Amount of ParticleSource that are currently existing

Referenced by PMTF::PrintActiveStats(), and TestCleanup().

◆ GetStaticCount()

proto static native int ParticleSource::GetStaticCount ( )
staticprivate

Gets the amount of ParticleSource that have been created since the start of the program.

Returns
int Amount of ParticleSource that have been created since the start of the program

◆ HasActiveParticle()

override bool ParticleSource::HasActiveParticle ( )
inlineprivate

Returns if there is any particle active.

Returns
bool Whether there is any particle active

Definition at line 580 of file ParticleSource.c.

581 {
583 }
proto bool HasActiveParticleNative()
Returns if there is any particle active.

References HasActiveParticleNative().

◆ HasActiveParticleNative()

proto bool ParticleSource::HasActiveParticleNative ( )
private

Returns if there is any particle active.

Returns
bool Whether there is any particle active

Referenced by HasActiveParticle().

◆ IncrementParticleParam()

override void ParticleSource::IncrementParticleParam ( int parameter_id,
float value )
inlineprotected

Increments the value of the given parameter relatively from the CURRENT value.

Note
It's a simple sum, so negative value decrements
Parameters
parameter_idint The parameter to adjust (enum EmitorParam)
valuefloat The value to sum

Definition at line 888 of file ParticleSource.c.

889 {
891 for (int i = 0; i < emitors; ++i)
892 {
893 float param;
896 }
897 }
proto void SetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, void value)
proto int GetParticleEmitorCount(notnull IEntity ent)

References GetParticleEmitorCount(), GetParticleParm(), and SetParticleParm().

◆ IncrementParticleParamFromOriginal()

override void ParticleSource::IncrementParticleParamFromOriginal ( int parameter_id,
float value )
inlineprotected

Increments the value of the given parameter relatively from the ORIGINAL value.

Note
It's a simple sum, so negative value decrements
Parameters
parameter_idint The parameter to adjust (enum EmitorParam)
valuefloat The value to sum

Definition at line 871 of file ParticleSource.c.

872 {
874 for (int i = 0; i < emitors; ++i)
875 {
876 float param;
879 }
880 }
proto void GetParticleParmOriginal(notnull IEntity ent, int emitor, EmitorParam parameter, out void value)

References GetParticleEmitorCount(), GetParticleParmOriginal(), and SetParticleParm().

◆ IsParticlePlaying()

override bool ParticleSource::IsParticlePlaying ( )
inlineprivate

Ask if the particle is still playing.

Returns
bool Whether the particle is playing

Definition at line 411 of file ParticleSource.c.

412 {
414 }
proto bool IsParticlePlayingNative()
Ask if the particle is still playing.

References IsParticlePlayingNative().

◆ IsParticlePlayingNative()

proto bool ParticleSource::IsParticlePlayingNative ( )
private

Ask if the particle is still playing.

Returns
bool Whether the particle is playing

Referenced by IsParticlePlaying().

◆ IsRepeat()

override bool ParticleSource::IsRepeat ( )
inlineprivate

Returns whether there is a repeating particle.

Returns
bool whether there is a repeating particle

Definition at line 612 of file ParticleSource.c.

613 {
614 return IsRepeatNative();
615 }
proto bool IsRepeatNative()
Returns whether there is a repeating particle.

References IsRepeatNative().

◆ IsRepeatNative()

proto bool ParticleSource::IsRepeatNative ( )
private

Returns whether there is a repeating particle.

Returns
bool whether there is a repeating particle

Referenced by IsRepeat().

◆ OnCheckAutoDelete()

void ParticleSource::OnCheckAutoDelete ( )
inlineprivate

Empty.

Definition at line 1008 of file ParticleSource.c.

1008{ ErrorEx("Should not be in use on ParticleSource."); }

References ErrorEx.

◆ OnParticleParented()

void ParticleSource::OnParticleParented ( IEntity parent)
inlineprotected

Event when the particle receives a parent.

Definition at line 709 of file ParticleSource.c.

710 {
711 m_ParentObject = Object.Cast(parent);
712
713 super.OnParticleParented(parent);
714 }
Object m_ParentObject
Parent Object the Particle is child of.
Definition Particle.c:48

References Particle::m_ParentObject.

◆ OnParticleStop()

void ParticleSource::OnParticleStop ( )
inlineprotected

Event when the particle stops.

Definition at line 742 of file ParticleSource.c.

743 {
744 if (IsWiggling())
745 {
746 StopWiggle();
747 delete m_RandomizeOri;
748 }
749
750 super.OnParticleStop();
751 }
ref Timer m_RandomizeOri
Used for Wiggle API, calls the Wiggle functionality.
Definition Particle.c:44
bool IsWiggling()
Checks if particle is currently wiggling.
Definition Particle.c:730
override void StopWiggle()
Stops randomized wiggle.

References Particle::IsWiggling(), Particle::m_RandomizeOri, and StopWiggle().

◆ OnParticleUnParented()

void ParticleSource::OnParticleUnParented ( IEntity parent)
inlineprotected

Event when the particle is orphaned.

Definition at line 719 of file ParticleSource.c.

720 {
722
723 // Since we have lost the parent, we will need to refresh the wiggle
724 // As it uses a cached local position, which is now no longer correct
726 {
731
732 StopWiggle();
734 }
735
736 super.OnParticleUnParented(parent);
737 }
vector m_DefaultPos
Used for Wiggle API, to restore after unparenting.
Definition Particle.c:33
vector m_DefaultWorldOri
Used for Wiggle API, to restore after unparenting.
Definition Particle.c:35
vector m_DefaultOri
Used for Wiggle API, to restore after unparenting.
Definition Particle.c:31
bool m_WiggleProcessing
Used for Wiggle API, to signal that wiggle API is currently doing work.
Definition Particle.c:27
vector m_DefaultWorldPos
Used for Wiggle API, to restore after unparenting.
Definition Particle.c:37
float m_MaxOriWiggle
Used for Wiggle API, Wiggle room [-m_MaxOriWiggle, m_MaxOriWiggle].
Definition Particle.c:40
float m_MaxOriInterval
Used for Wiggle API, Interval for wiggling [0, m_MaxOriInterval[.
Definition Particle.c:42
override void SetWiggle(float random_angle, float random_interval)
Makes the particle change direction by random_angle every random_interval seconds.

References Particle::IsWiggling(), Particle::m_DefaultOri, Particle::m_DefaultPos, Particle::m_DefaultWorldOri, Particle::m_DefaultWorldPos, Particle::m_MaxOriInterval, Particle::m_MaxOriWiggle, Particle::m_ParentObject, Particle::m_WiggleProcessing, SetWiggle(), and StopWiggle().

◆ OnToDelete()

void ParticleSource::OnToDelete ( )
inlineprivate

Empty.

Definition at line 1011 of file ParticleSource.c.

1011{ ErrorEx("Should not be in use on ParticleSource."); }

References ErrorEx.

◆ Orphan()

proto native void ParticleSource::Orphan ( )
private

null the owner of this ParticleSource

◆ ParticleInit()

void ParticleSource::ParticleInit ( )
inlineprotected

Empty - Only needed for Particle.

Definition at line 137 of file ParticleSource.c.

137{}

◆ Play() [1/2]

static override Particle ParticleSource::Play ( int particle_id,
Object parent_obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0" )
inlinestaticprotected

Legacy function for backwards compatibility with 1.01 and below.

Definition at line 296 of file ParticleSource.c.

297 {
299 }
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.

References particle_id, and PlayOnObject().

◆ Play() [2/2]

static override Particle ParticleSource::Play ( int particle_id,
vector global_pos )
inlinestaticprotected

Legacy function for backwards compatibility with 1.01 and below.

Definition at line 315 of file ParticleSource.c.

316 {
318 }
static override Particle PlayInWorld(int particle_id, vector global_pos)
Creates a particle emitter on the given position and activates it.

References particle_id, and PlayInWorld().

◆ PlayInWorld()

static override Particle ParticleSource::PlayInWorld ( int particle_id,
vector global_pos )
inlinestaticprotected

Creates a particle emitter on the given position and activates it.

Parameters
particle_idint Particle ID registered in ParticleList
global_posVector Position where the particel will be created
Returns
Particle Created particle instance

Definition at line 307 of file ParticleSource.c.

308 {
310 }

References CreateParticle(), and particle_id.

Referenced by Play().

◆ PlayOnObject()

static override Particle ParticleSource::PlayOnObject ( int particle_id,
Object parent_obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0",
bool force_world_rotation = false )
inlinestaticprotected

Creates a particle emitter, attaches it on the given object and activates it.

Parameters
particle_idint Particle ID registered in ParticleList
parent_objObject Instance on which this particle will be attached
local_posvector Attachment position local to the parent (Optional)
local_orivector Orientation local to the parent (Pitch, Yaw, Roll in degrees) (Optional)
force_world_rotationbool Forces particle's orientation to rotate relative to the world and not with the object (Optional)
Returns
Particle Created particle instance

Definition at line 288 of file ParticleSource.c.

References CreateParticle(), and particle_id.

Referenced by Play().

◆ PlayParticleEx()

override bool ParticleSource::PlayParticleEx ( int particle_id = -1,
int flags = 0 )
inlineprivate

Method to tell the particle to start playing.

Parameters
particle_idint Particle ID registered in ParticleList to start playing
Returns
bool Whether the particle successfully started

Definition at line 340 of file ParticleSource.c.

341 {
342 if (particle_id > -1)
343 {
344 // Here we can just do it directly
345 // While with the old system it will not work when the particle is already created
347 }
348
349 return PlayParticleNative(flags);
350 }
bool SetParticleByID(int id)
Assigns a particle to the ParticleSource.
proto bool PlayParticleNative(int flags)
Method to tell the particle to start playing.

References particle_id, PlayParticleNative(), and SetParticleByID().

◆ PlayParticleNative()

proto bool ParticleSource::PlayParticleNative ( int flags)
private

Method to tell the particle to start playing.

Note
Will call OnParticleStart when successful
Returns
bool Whether the particle successfully started

Referenced by PlayParticleEx().

◆ RandomizeOrientation()

void ParticleSource::RandomizeOrientation ( )
inlineprivate

Randomizes a new orientation and applies it.

Definition at line 966 of file ParticleSource.c.

967 {
968 if (ToDelete())
969 return;
970
971 m_WiggleProcessing = true;
972
973 if (!m_RandomizeOri.IsRunning())
974 m_RandomizeOri.Run(Math.RandomFloat(0, m_MaxOriInterval), this, "RandomizeOrientation", null, false);
975
976 int flags = ParticlePropertiesFlags.NONE;
977
979 flags = ParticlePropertiesFlags.FORCE_WORLD_ROT;
980
981 ParticleProperties prop = new ParticleProperties(m_DefaultPos, flags, GetParticleParent(), m_DefaultOri + RandWiggleVector(), GetOwner());
983
984 m_WiggleProcessing = false;
985 }
Definition EnMath.c:7
bool m_ForceOrientationRelativeToWorld
Used for Wiggle API, to restore after unparenting.
Definition Particle.c:29
vector RandWiggleVector()
Helper to get a randomized wiggle vector.
Definition Particle.c:794
override Object GetParticleParent()
Returns the parent of this Particle if there is one.
proto native Class GetOwner()
Get the owner of this ParticleSource.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].

References ApplyProperties(), GetOwner(), GetParticleParent(), Particle::m_DefaultOri, Particle::m_DefaultPos, Particle::m_ForceOrientationRelativeToWorld, Particle::m_MaxOriInterval, Particle::m_RandomizeOri, Particle::m_WiggleProcessing, Math::RandomFloat(), and Particle::RandWiggleVector().

◆ ResetParticle()

override bool ParticleSource::ResetParticle ( )
inlineprivate

Method to tell the particle to reset.

Returns
bool Whether the particle successfully reset

Definition at line 381 of file ParticleSource.c.

382 {
383 return ResetParticleNative();
384 }
proto native bool ResetParticleNative()
Method to tell the particle to reset.

References ResetParticleNative().

◆ ResetParticleNative()

proto native bool ParticleSource::ResetParticleNative ( )
private

Method to tell the particle to reset.

Returns
bool Whether the particle successfully reset

Referenced by ResetParticle().

◆ RestartParticle()

override bool ParticleSource::RestartParticle ( )
inlineprivate

Method to tell the particle to restart (reset + play)

Returns
bool Whether the particle successfully restarted

Definition at line 396 of file ParticleSource.c.

397 {
398 return RestartParticleNative();
399 }
proto native bool RestartParticleNative()
Method to tell the particle to restart (reset + play)

References RestartParticleNative().

◆ RestartParticleNative()

proto native bool ParticleSource::RestartParticleNative ( )
private

Method to tell the particle to restart (reset + play)

Returns
bool Whether the particle successfully restarted

Referenced by RestartParticle().

◆ ScaleParticleParam()

override void ParticleSource::ScaleParticleParam ( int parameter_id,
float coef )
inlineprotected

Scales the given parameter on all emitors relatively to their CURRENT value.

Parameters
parameter_idint The parameter to adjust (enum EmitorParam)
coeffloat The multiplier to apply

Definition at line 854 of file ParticleSource.c.

855 {
857 for (int i = 0; i < emitors; ++i)
858 {
859 float value;
861 SetParticleParm(this, i, parameter_id, value * coef);
862 }
863 }

References GetParticleEmitorCount(), GetParticleParm(), and SetParticleParm().

◆ ScaleParticleParamFromOriginal()

override void ParticleSource::ScaleParticleParamFromOriginal ( int parameter_id,
float coef )
inlineprotected

Scales the given parameter on all emitors relatively to their ORIGINAL value.

Parameters
parameter_idint The parameter to adjust (enum EmitorParam)
coeffloat The multiplier to apply

Definition at line 838 of file ParticleSource.c.

839 {
841 for (int i = 0; i < emitors; ++i)
842 {
843 float value;
845 SetParticleParm(this, i, parameter_id, value * coef);
846 }
847 }

References GetParticleEmitorCount(), GetParticleParmOriginal(), and SetParticleParm().

◆ SetOwner()

proto native void ParticleSource::SetOwner ( Class owner)
private

◆ SetParameter()

override void ParticleSource::SetParameter ( int emitter,
int parameter,
float value )
inlineprotected

Set the value of a parameter of an emitor in the particle.

Parameters
emitterint The emitter to apply the new value to, -1 for all emitter
parameterint The parameter to apply the new value to (enum EmitorParam)
valuefloat The value to apply

Definition at line 804 of file ParticleSource.c.

805 {
807 }

References SetParticleParm().

◆ SetParticle()

bool ParticleSource::SetParticle ( string path)
inlineprivate

Assigns a particle to the ParticleSource.

Note
Intentionally private, as it is best to use 'SetParticleByID' instead from script, because ParticleList
Parameters
pathstring Path of particle effect
Returns
bool Whether the creating and assigning of particle was successful

Definition at line 437 of file ParticleSource.c.

438 {
439 return SetParticleNative(path);
440 }
proto native bool SetParticleNative(string path)
Assigns a particle to the ParticleSource.

References path, and SetParticleNative().

Referenced by SetParticleByID().

◆ SetParticleAutoDestroyFlags()

proto native void ParticleSource::SetParticleAutoDestroyFlags ( ParticleAutoDestroyFlags flags)
protected

Enables the particle to automatically clean up itself when ending or stopping.

Note
Is enabled by default (ALL)
Looping particles never end
ParticleSource belonging to a ParticleManager will ignore these
Parameters
flagsParticleAutoDestroyFlags Flags enabling when the particle should be auto destroyed

Referenced by DisableAutoDestroy().

◆ SetParticleByID()

bool ParticleSource::SetParticleByID ( int id)
inlineprivate

Assigns a particle to the ParticleSource.

Parameters
idint ID of particle registered in ParticleList
Returns
bool Whether the creating and assigning of particle was successful

Definition at line 447 of file ParticleSource.c.

448 {
450 }
bool SetParticle(string path)
Assigns a particle to the ParticleSource.

References ParticleList::GetParticleFullPath(), and SetParticle().

Referenced by PlayParticleEx(), and SetSource().

◆ SetParticleNative()

proto native bool ParticleSource::SetParticleNative ( string path)
private

Assigns a particle to the ParticleSource.

Parameters
pathstring Path of particle effect
Returns
bool Whether the creating and assigning of particle was successful

Referenced by SetParticle().

◆ SetParticleParam()

override void ParticleSource::SetParticleParam ( int parameter_id,
float value )
inlineprotected

Set the value of a parameter of all emitors in the particle.

Parameters
parameterint The parameter to apply the new value to (enum EmitorParam)
valuefloat The value to apply

Definition at line 793 of file ParticleSource.c.

794 {
796 }

References SetParticleParm().

◆ SetSource()

override void ParticleSource::SetSource ( int particle_id)
inlineprivate

Sets particle id.

Note
Purely here for backwards compatibility with Particle
Parameters
particle_idint Particle ID registered in ParticleList to start playing

Definition at line 457 of file ParticleSource.c.

458 {
460 }

References particle_id, and SetParticleByID().

◆ SetWiggle()

override void ParticleSource::SetWiggle ( float random_angle,
float random_interval )
inlineprotected

Makes the particle change direction by random_angle every random_interval seconds.

Note
This does not actually work on Particle with no parent, it should on ParticleSource
Parameters
random_anglefloat Will be the range [-random_angle, random_angle[ to wiggle between
random_intervalfloat Will be the time range [0, random_interval] to wiggle next time

Definition at line 913 of file ParticleSource.c.

914 {
915 if (random_angle != 0 || random_interval != 0)
916 {
917 if (IsWiggling())
918 {
921 return;
922 }
923
924 // We need the position to be accurate before storing it
925 Update();
926
927 // These are only ever used within the Wiggle API
928 // To restore the properties after wiggling
929 // So let's only set them within the Wiggle API c:
930
932 m_DefaultOri = GetLocalYawPitchRoll();
933 m_DefaultWorldPos = GetWorldPosition();
934 m_DefaultWorldOri = GetYawPitchRoll();
935 m_ForceOrientationRelativeToWorld = IsHierarchyPositionOnly();
936 }
937
939 }
vector GetLocalPosition()
Get the local position of the Effect.
Definition Effect.c:470
proto native volatile void Update()

References GetLocalPosition(), Particle::IsWiggling(), Particle::m_DefaultOri, Particle::m_DefaultPos, Particle::m_DefaultWorldOri, Particle::m_DefaultWorldPos, Particle::m_ForceOrientationRelativeToWorld, Particle::m_MaxOriInterval, Particle::m_MaxOriWiggle, and Update().

Referenced by OnParticleUnParented().

◆ StopParticle()

override bool ParticleSource::StopParticle ( int flags = 0)
inlineprivate

Method to tell the particle to stop playing.

Parameters
flagsint Flags to pass to the stopping (StopParticleFlags)
Returns
bool Whether the particle successfully stopped

Definition at line 366 of file ParticleSource.c.

367 {
368 return StopParticleNative(flags);
369 }
proto bool StopParticleNative(int flags)
Method to tell the particle to stop playing.

References StopParticleNative().

Referenced by FireworksLauncher::OnFiringStartClient(), and FireworksLauncherClientEvent::~FireworksLauncherClientEvent().

◆ StopParticleNative()

proto bool ParticleSource::StopParticleNative ( int flags)
private

Method to tell the particle to stop playing.

Note
The particle is not immediately stopped by default, instead it will gradually fade If this is however desired, then pass in StopParticleFlags.IMMEDIATE
Parameters
flagsint Flags to pass to the stopping (StopParticleFlags)
Returns
bool Whether the particle successfully stopped

Referenced by StopParticle().

◆ StopWiggle()

override void ParticleSource::StopWiggle ( )
inlineprotected

Stops randomized wiggle.

Definition at line 944 of file ParticleSource.c.

945 {
946 bool wiggling = IsWiggling();
947
948 super.StopWiggle();
949
950 if (wiggling)
951 {
952 // Restore pre-wiggle orientation
953 int flags = ParticlePropertiesFlags.NONE;
954
956 flags = ParticlePropertiesFlags.FORCE_WORLD_ROT;
957
958 ParticleProperties prop = new ParticleProperties(m_DefaultPos, flags, GetParticleParent(), m_DefaultOri, GetOwner());
960 }
961 }

References ApplyProperties(), GetOwner(), GetParticleParent(), Particle::IsWiggling(), Particle::m_DefaultOri, Particle::m_DefaultPos, and Particle::m_ForceOrientationRelativeToWorld.

Referenced by OnParticleStop(), and OnParticleUnParented().

◆ UpdateState()

void ParticleSource::UpdateState ( )
inlineprivate

Empty.

Definition at line 996 of file ParticleSource.c.

996{ ErrorEx("Should not be in use on ParticleSource."); }

References ErrorEx.


The documentation for this class was generated from the following file: