MCPcopy Create free account
hub / github.com/defold/defold / UpdateEmitter

Function UpdateEmitter

engine/particle/src/particle.cpp:617–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615 static void Simulate(Instance* instance, Emitter* emitter, EmitterPrototype* prototype, dmParticleDDF::Emitter* ddf, float dt);
616
617 static void UpdateEmitter(Prototype* prototype, Instance* instance, EmitterPrototype* emitter_prototype, Emitter* emitter, dmParticleDDF::Emitter* emitter_ddf, float dt)
618 {
619 // Don't update emitter if time is standing still
620 if (IsSleeping(emitter) || dt <= 0.0f)
621 return;
622
623 UpdateParticles(instance, emitter, emitter_ddf, dt);
624
625 UpdateEmitterState(instance, emitter, emitter_prototype, emitter_ddf, dt);
626
627 GenerateKeys(emitter, emitter_prototype->m_MaxParticleLifeTime);
628 SortParticles(emitter);
629
630 Simulate(instance, emitter, emitter_prototype, emitter_ddf, dt);
631 }
632
633 static void UpdateEmitterVelocity(Instance* instance, Emitter* emitter, dmParticleDDF::Emitter* emitter_ddf, float dt)
634 {

Callers 2

FastForwardEmitterFunction · 0.85
UpdateFunction · 0.85

Calls 6

UpdateParticlesFunction · 0.85
UpdateEmitterStateFunction · 0.85
GenerateKeysFunction · 0.85
SortParticlesFunction · 0.85
SimulateFunction · 0.85
IsSleepingFunction · 0.70

Tested by

no test coverage detected