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

Method update

Engine/source/afx/afxMagicSpell.cpp:601–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601void CastingPhrase_C::update(F32 dt, F32 timestamp)
602{
603 Parent::update(dt, timestamp);
604
605 if (!mNotify_castbar)
606 return;
607
608 if (mDur > 0 && mNum_loops > 0)
609 {
610 F32 nfrac = (timestamp - mStartTime)/(mDur*mNum_loops);
611 if (nfrac - mCastbar_progress > 1.0f/200.0f)
612 {
613 mCastbar_progress = (nfrac < 1.0f) ? nfrac : 1.0f;
614 onCastingProgressUpdate_callback(mCastbar_progress);
615 }
616 }
617}
618
619void CastingPhrase_C::stop(F32 timestamp)
620{

Callers 2

process_serverMethod · 0.45
process_clientMethod · 0.45

Calls 1

updateFunction · 0.85

Tested by

no test coverage detected