PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
ParticleBase.c File Reference

Data Structures

class  ParticleEvents
 Invokers for ParticleBase events, called from events. More...
 

Functions

void ParticleBase ()
 ctor
 
override bool IsParticle ()
 Have script recognize this as a Particle without casting.
 
Playback

Methods regarding playing/stopping of particle

void PlayParticle (int particle_id=-1)
 Method to tell the particle to start playing.
 
bool PlayParticleEx (int particle_id=-1, int flags=0)
 Method to tell the particle to start playing.
 
bool StopParticle (int flags=0)
 Method to tell the particle to stop playing.
 
bool ResetParticle ()
 Method to tell the particle to reset.
 
bool RestartParticle ()
 Method to tell the particle to restart (reset + play)
 
bool IsParticlePlaying ()
 Ask if the particle is still playing.
 
ParticleEvents GetEvents ()
 Get the events.
 
Events

ParticleBase events For ParticleSource, these are handed on C++ side For more information, read ParticleEvents

protected void OnParticleStart ()
 Event when the particle starts.
 
protected void OnParticleStop ()
 Event when the particle stops.
 
protected void OnParticleReset ()
 Event when the particle is restarted.
 
protected void OnParticleEnd ()
 Event when the particle ends.
 
protected void OnParticleParented (IEntity parent)
 Event when the particle receives a parent.
 
protected void OnParticleUnParented (IEntity parent)
 Event when the particle is orphaned.
 

Variables

class ParticleEvents m_IsPlaying
 Engine base class with internal functionality.
 
protected ref ParticleEvents m_EventInvokers
 Event invokers.
 

Function Documentation

◆ GetEvents()

ParticleEvents GetEvents ( )

Get the events.

Returns
ParticleEvents If there is any events set, this will return them so that additional functionality can be bound to them

References m_EventInvokers.

Referenced by OnAllocation(), OnAllocationEnd(), OnEnd(), OnHeaderLoad(), OnLoad(), OnParticleEnd(), OnParticleParented(), OnParticleReset(), OnParticleStart(), OnParticleStop(), OnParticleUnParented(), OnPlay(), and OnStop().

◆ IsParticle()

override bool IsParticle ( )

Have script recognize this as a Particle without casting.

◆ IsParticlePlaying()

bool IsParticlePlaying ( )

Ask if the particle is still playing.

Returns
bool Whether the particle is playing

References ErrorEx.

◆ OnParticleEnd()

protected void OnParticleEnd ( )

Event when the particle ends.

Note
Looping particles will never end

References ParticleEvents::Event_OnParticleEnd, GetEvents(), and ScriptInvoker::Invoke().

Referenced by Particle::OnCheckAutoDelete().

◆ OnParticleParented()

protected void OnParticleParented ( IEntity  parent)

Event when the particle receives a parent.

References ParticleEvents::Event_OnParticleParented, GetEvents(), and ScriptInvoker::Invoke().

◆ OnParticleReset()

protected void OnParticleReset ( )

Event when the particle is restarted.

References ParticleEvents::Event_OnParticleReset, GetEvents(), and ScriptInvoker::Invoke().

◆ OnParticleStart()

protected void OnParticleStart ( )

Event when the particle starts.

References ParticleEvents::Event_OnParticleStart, GetEvents(), ScriptInvoker::Invoke(), and m_IsPlaying.

Referenced by Particle::PlayParticleEx().

◆ OnParticleStop()

protected void OnParticleStop ( )

◆ OnParticleUnParented()

protected void OnParticleUnParented ( IEntity  parent)

Event when the particle is orphaned.

References ParticleEvents::Event_OnParticleUnParented, GetEvents(), and ScriptInvoker::Invoke().

◆ ParticleBase()

void ParticleBase ( )

ctor

References m_EventInvokers.

◆ PlayParticle()

◆ PlayParticleEx()

bool PlayParticleEx ( int  particle_id = -1,
int  flags = 0 
)

Method to tell the particle to start playing.

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

References ErrorEx.

◆ ResetParticle()

bool ResetParticle ( )

Method to tell the particle to reset.

Returns
bool Whether the particle successfully reset

References ErrorEx.

◆ RestartParticle()

bool RestartParticle ( )

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

Returns
bool Whether the particle successfully restarted

References ErrorEx.

◆ StopParticle()

bool StopParticle ( int  flags = 0)

Method to tell the particle to stop playing.

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

References ErrorEx.

Referenced by ParticleFireEndStop(), ParticleFireStartStop(), ParticleNormalFireStop(), ParticleNormalSmokeStop(), ParticleSmallFireStop(), ParticleSmallSmokeStop(), ParticleSteamEndStop(), ParticleSteamExtinguishingStop(), ParticleWetNoIgniteStop(), and StopAllParticlesAndSounds().

Variable Documentation

◆ m_EventInvokers

protected ref ParticleEvents m_EventInvokers

Event invokers.

Referenced by GetEvents(), and ParticleBase().

◆ m_IsPlaying

class ParticleEvents m_IsPlaying

Engine base class with internal functionality.

Note
Is NOT intended for direct creation As this does not have an actual particle Use either Particle or ParticleSource Whether the particle is currently playing