Beispiel #1
0
/**
 * If the particle system has exhausted and it is set to auto-remove, remove this
 * node from the scene so that this node and the particle system will be released.
 */
void CC3ParticleSystemBillboard::updateBeforeTransform( CC3NodeUpdatingVisitor* visitor )
{
	if ( m_pBillboard ) 
	{
		CCParticleSystem* ps = (CCParticleSystem*)m_pBillboard;
		if ( ps->isAutoRemoveOnFinish() && !ps->isActive() && ps->getParticleCount() == 0 )
		{
			CC3_TRACE("[bbd]2D particle system exhausted. Removing");
			visitor->requestRemovalOf( this );
		}
	}
}