public sealed class VfxSubEmitterOne system's particles emitting into another's.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two systems rather than one system with two kinds of particle. A shell and its sparks have different lifetimes, different forces, different renderers and different capacities — they are two effects that happen to be connected, and the connection is this object. Folding them into one graph would mean every operation carrying a test for which kind of particle it was looking at, which is the branch per particle this module's whole storage design exists to avoid.
The child's initializers are an offset, not a replacement. A child is initialized by its own graph and then moved to where its parent was, so an initializer that scatters particles through a sphere scatters them around the parent rather than around the origin. That is what an author writing "burst in a sphere" for a sub-emitter means, and it is the only reading under which the child graph is worth authoring separately at all.
Step this after both systems. A child spawned here waits until the next step to be updated, which is exactly what happens to a particle a spawner produces — Step updates before it spawns. Emitting between the two steps instead would age a child on the step it was born, and the two ways a particle can come into existence would disagree about how old it is.
It is as deterministic as everything else here. A child's randomness comes from the identifier the target buffer hands it, and the target hands them out in order. Two runs with the same steps produce the same children, which is what a replay and a golden image both need.
Fields and properties (6)
public VfxEmitEvent TriggerWhat triggers the emission.
public int CountHow many children one event produces.
public float IntervalSeconds between children, for a trail. Zero or less emits every step.
public float InheritVelocityHow much of a parent's velocity a child starts with, added to its own.
public int LastEmittedHow many children the last Step produced.
public int LastRefusedHow many it could not, because the target was full.
Methods (2)
public VfxSubEmitter(VfxSystem source, VfxSystem target, VfxEmitEvent trigger = Death, int count = 1, float interval = 0.1)Connects a system's particles to another system.
public void Step(float deltaTime)Emits whatever this step's events call for.
Used by (1)
- VfxSubEmitterTestsVixen.Vfx.Tests