comparison src/modules/graphics/opengl/ParticleSystem.cpp @ 1408:107d80a59bca

Added ParticleSystem:emit(num) (issue #577)
author Alex Szpakowski <slime73@gmail.com>
date Wed, 27 Mar 2013 01:09:53 -0300
parents f0795108d4c0
children e952fc68069d
comparison
equal deleted inserted replaced
1407:c1da4c0e65f7 1408:107d80a59bca
476 pLast = pStart; 476 pLast = pStart;
477 life = lifetime; 477 life = lifetime;
478 emitCounter = 0; 478 emitCounter = 0;
479 } 479 }
480 480
481 void ParticleSystem::emit(int num)
482 {
483 if (!active)
484 return;
485
486 for (int i = 0; i < num; i++)
487 {
488 if (isFull())
489 return;
490
491 add();
492 }
493 }
494
481 bool ParticleSystem::isActive() const 495 bool ParticleSystem::isActive() const
482 { 496 {
483 return active; 497 return active;
484 } 498 }
485 499