Interface IParticleSystemObserver ​
Namespace: ValveResourceFormat.Particles
Assembly: ValveResourceFormat.dll
Watches a simulated particle system so a drawing layer can keep up with it. The simulation holds one observer per system. It draws nothing itself, so it runs without a graphics backend.
public interface IParticleSystemObserverProperties ​
ObservedEvents ​
The events IParticleSystemObserver.OnParticleEvent(ParticleCollection, ParticleEventType, ReadOnlySpan<int>) wants raised even when no child of the system emits from them. Kill events are always raised.
ParticleEventType ObservedEvents { get; }Property Value ​
Methods ​
OnFrameSimulated(ParticleCollection, ParticleSystemState) ​
Called after every simulated step of the system. It is not called while the system fast-forwards through a pre-simulation, and is called once when the pre-simulation is done.
void OnFrameSimulated(ParticleCollection particles, ParticleSystemState state)Parameters ​
particles ParticleCollection
The system's live particles.
state ParticleSystemState
The system's render state.
OnLightSourceUpdated(ParticleLightSource) ​
Called when a function of the system places, moves or puts out a scene light of its own, also while the system fast-forwards through a pre-simulation.
void OnLightSourceUpdated(ParticleLightSource light)Parameters ​
light ParticleLightSource
The light, which keeps its instance for the life of the system.
OnParticleEvent(ParticleCollection, ParticleEventType, ReadOnlySpan<int>) ​
Called when particles of the system raise an event, before particles being killed are removed, so indices still address them in particles.
void OnParticleEvent(ParticleCollection particles, ParticleEventType eventType, ReadOnlySpan<int> indices)Parameters ​
particles ParticleCollection
The system's live particles.
eventType ParticleEventType
The event, a single flag.
indices ReadOnlySpan<int>
The indices of the particles that raised it, ascending.
OnParticlesInitialized(ParticleCollection, ParticleSystemState, int, int) ​
Called once the initializers have run over particles the system just created, before their spawn events are raised.
void OnParticlesInitialized(ParticleCollection particles, ParticleSystemState state, int first, int count)Parameters ​
particles ParticleCollection
The system's live particles.
state ParticleSystemState
The system's render state.
first int
The index of the first new particle.
count int
How many particles were created.

