MCPcopy Create free account
hub / github.com/axmolengine/axmol / switchRender

Method switchRender

tests/cpp-tests/Source/ParticleTest/ParticleTest.cpp:2376–2385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2374}
2375
2376void ParticleBatchHybrid::switchRender(float dt)
2377{
2378 bool usingBatch = (_emitter->getBatchNode() != nullptr);
2379 _emitter->removeFromParentAndCleanup(false);
2380
2381 auto newParent = (usingBatch ? _parent2 : _parent1);
2382 newParent->addChild(_emitter);
2383
2384 AXLOGD("Particle: Using new parent: {}", usingBatch ? "Node" : "ParticleBatchNode");
2385}
2386
2387std::string ParticleBatchHybrid::title() const
2388{

Callers

nothing calls this directly

Calls 3

getBatchNodeMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected