Class ParticleSystem
Namespace: ValveResourceFormat.ResourceTypes
Assembly: ValveResourceFormat.dll
Represents a particle system resource. Every accessor reads the upgraded tree, so callers always see the newest class names and member spellings regardless of the stored format.
public class ParticleSystem : KeyValuesOrNTROInheritance
object ← Block ← KeyValuesOrNTRO ← ParticleSystem
Inherited Members
KeyValuesOrNTRO.Type, KeyValuesOrNTRO.Data, KeyValuesOrNTRO.Format, KeyValuesOrNTRO.Read(BinaryReader), KeyValuesOrNTRO.Serialize(Stream), KeyValuesOrNTRO.WriteText(IndentedTextWriter), Block.Type, Block.Offset, Block.Size, Block.Resource, Block.Read(BinaryReader), Block.ToString(), Block.WriteText(IndentedTextWriter), Block.Serialize(Stream)
Extension Methods
ResourceDataExtensions.AsKeyValueCollection(Block)
Methods
Create(KVObject, KV3ID?)
Builds a particle system from the provided keyvalues.
public static ParticleSystem Create(KVObject data, KV3ID? format = null)Parameters
data KVObject
The particle system definition.
format KV3ID?
The KV3 format the definition is authored in. Defaults to the newest format, which is what a definition built in memory against the current schema is; pass an older one only for data that really is authored in it.
Returns
GetChildParticleNames(bool)
Gets the names of child particles.
public IEnumerable<string> GetChildParticleNames(bool enabledOnly = false)Parameters
enabledOnly bool
Whether to skip children disabled by .
Returns
GetChildren()
Gets the child entries of the particle system. Use to tell whether an entry runs, and for just the names.
public IEnumerable<KVObject> GetChildren()Returns
IEnumerable<KVObject>
GetConstraints()
Gets the constraints in the particle system, which are applied repeatedly after movement to pull particles back onto whatever they are constrained to.
public IEnumerable<KVObject> GetConstraints()Returns
IEnumerable<KVObject>
GetEmitters()
Gets the emitters in the particle system.
public IEnumerable<KVObject> GetEmitters()Returns
IEnumerable<KVObject>
GetForceGenerators()
Gets the force generators in the particle system, which accumulate forces on particles for the movement operators to integrate.
public IEnumerable<KVObject> GetForceGenerators()Returns
IEnumerable<KVObject>
GetInitializers()
Gets the initializers in the particle system.
public IEnumerable<KVObject> GetInitializers()Returns
IEnumerable<KVObject>
GetOperators()
Gets the operators in the particle system.
public IEnumerable<KVObject> GetOperators()Returns
IEnumerable<KVObject>
GetPreEmissionOperators()
Gets the pre-emission operators in the particle system, which run once per frame before any particle is emitted and act on the system rather than on individual particles.
public IEnumerable<KVObject> GetPreEmissionOperators()Returns
IEnumerable<KVObject>
GetRenderers()
Gets the renderers in the particle system.
public IEnumerable<KVObject> GetRenderers()Returns
IEnumerable<KVObject>
GetUpgradeTrace()
Gets the function entries traced through the conversion chain, reporting which entries survive, under which class name, and which the chain removes. The trace carries the upgraded tree it describes, so taking it before runs the chain once for both; taking it afterwards runs the chain a second time.
public IReadOnlyDictionary<string, IReadOnlyList<ParticleUpgradeTrace.TracedFunction>> GetUpgradeTrace()Returns
IReadOnlyDictionary<string, IReadOnlyList<ParticleUpgradeTrace.TracedFunction>>
GetUpgradedData()
Gets the particle system data upgraded through the vpcf format-conversion chain to the newest implemented format. Computed once and cached; the result is always a copy, so
is neither returned nor mutated.public KVObject GetUpgradedData()Returns
KVObject
IsChildEnabled(KVObject)
Gets whether a child entry runs. m_bDisableChild only removes a child from behavior version 5 on; older definitions keep disabled children.
public bool IsChildEnabled(KVObject childEntry)Parameters
childEntry KVObject
An entry of the m_Children array.
Returns
See Also
https://s2v.app/SchemaExplorer/cs2/particles/CParticleSystemDefinition

