MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / start

Method start

Engine/source/afx/afxEffectWrapper.cpp:844–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

842}
843
844bool afxEffectWrapper::start(F32 timestamp)
845{
846 if (!ea_is_enabled())
847 {
848 Con::warnf("afxEffectWrapper::start() -- effect type of %s is currently disabled.", mDatablock->getName());
849 return false;
850 }
851
852 afxConstraint* life_constraint = getLifeConstraint();
853 if (life_constraint)
854 mCond_alive = life_constraint->getLivingState();
855
856 mElapsed = timestamp;
857
858 for (S32 i = 0; i < MAX_XFM_MODIFIERS; i++)
859 {
860 if (!mXfm_modifiers[i])
861 break;
862 else
863 mXfm_modifiers[i]->start(timestamp);
864 }
865
866 if (!ea_start())
867 {
868 // subclass should print error message if applicable, so no message here.
869 return false;
870 }
871
872 update(0.0f);
873 return !isAborted();
874}
875
876bool afxEffectWrapper::test_life_conds()
877{

Callers

nothing calls this directly

Calls 4

updateFunction · 0.85
getLivingStateMethod · 0.80
warnfFunction · 0.50
getNameMethod · 0.45

Tested by

no test coverage detected