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

Function FastForwardEmitter

engine/particle/src/particle.cpp:345–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343 }
344
345 static void FastForwardEmitter(Prototype* prototype, Instance* instance, EmitterPrototype* emitter_prototype, Emitter* emitter, dmParticleDDF::Emitter* emitter_ddf, float time)
346 {
347 StartEmitter(instance, emitter);
348 float timer = 0.0f;
349 // Hard coded for now
350 float dt = 1.0f / 60.0f;
351 while (timer < time)
352 {
353 UpdateEmitter(prototype, instance, emitter_prototype, emitter, emitter_ddf, dt);
354 timer += dt;
355 }
356 }
357
358 static float CalculateReplayTime(float duration, float start_delay, float max_particle_life_time, float play_time)
359 {

Callers 2

ReloadInstanceFunction · 0.85
StartInstanceFunction · 0.85

Calls 2

StartEmitterFunction · 0.85
UpdateEmitterFunction · 0.85

Tested by

no test coverage detected