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

Method onAdd

Engine/source/T3D/fx/fxShapeReplicator.cpp:487–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485//------------------------------------------------------------------------------
486
487bool fxShapeReplicator::onAdd()
488{
489 if(!Parent::onAdd())
490 return(false);
491
492 // Add the Replicator to the Replicator Set.
493 dynamic_cast<SimSet*>(Sim::findObject("fxReplicatorSet"))->addObject(this);
494
495 // Set Default Object Box.
496 mObjBox.minExtents.set( -0.5, -0.5, -0.5 );
497 mObjBox.maxExtents.set( 0.5, 0.5, 0.5 );
498 resetWorldBox();
499
500 // Add to Scene.
501 setRenderTransform(mObjToWorld);
502 addToScene();
503
504 // Register for notification when GhostAlways objects are done loading
505 NetConnection::smGhostAlwaysDone.notify( this, &fxShapeReplicator::onGhostAlwaysDone );
506
507 return true;
508}
509
510//------------------------------------------------------------------------------
511

Callers

nothing calls this directly

Calls 4

findObjectFunction · 0.50
addObjectMethod · 0.45
setMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected