void ParticleSystemEffect::inheritedBegin() { if(getTheSystem() != NULL) { getTheSystem()->assignGenerators(*getMFGenerators()); getTheSystem()->attachUpdateProducer(getParentSceneObject()->getParentScene()); _SystemUpdatedConnection = getTheSystem()->connectSystemUpdated(boost::bind(&ParticleSystemEffect::handleSystemUpdated, this, _1)); _UpdateConnection = getParentSceneObject()->getParentScene()->connectUpdate(boost::bind(&ParticleSystemEffect::handleUpdate, this, _1)); } else { SWARNING << "ParticleSystemEffect::inheritedBegin(): Null Particle System. Not set yet?"; } _Age = 0.0; }
void Effect::begin() { if(!effectIsInitialized) { if(getParentSceneObject() != NULL) { effectIsInitialized = true; initEffect(); } else { SWARNING << "Effect::begin() :The effect is not associated with a Scene Object yet."; } } if(isPausedFlag) { SWARNING << "Effect::begin() :The effect is paused. Use unpause() instead of begin()"; } else if(effectIsInitialized) { inheritedBegin(); produceEffectBegan(); isPlayingFlag = true; } else { SWARNING << "Effect::begin() : The effect is not initialized yet."; } }
void EffectGroup::changed(ConstFieldMaskArg whichField, UInt32 origin, BitVector details) { Inherited::changed(whichField, origin, details); if((whichField & EffectListFieldMask) || (whichField & ParentSceneObjectFieldMask)) { for(UInt32 i(0); i < getMFEffectList()->size(); ++i) { getEffectList(i)->setParentSceneObject(const_cast<SceneObject*>(getParentSceneObject())); } } }
void AnimationEffect::initEffect() { theUpdateProducer = getEventProducer(getParentSceneObject()->getScene()); theInternalAnimationListener = InternalAnimationListener(this); }
void ParticleSystemEffect::inheritedUnpause() { getTheSystem()->attachUpdateProducer(getParentSceneObject()->getParentScene()); _SystemUpdatedConnection = getTheSystem()->connectSystemUpdated(boost::bind(&ParticleSystemEffect::handleSystemUpdated, this, _1)); _UpdateConnection = getParentSceneObject()->getParentScene()->connectUpdate(boost::bind(&ParticleSystemEffect::handleUpdate, this, _1)); }