MCPcopy Create free account
hub / github.com/carbonengine/trinity / SetCount

Method SetCount

trinity/Eve/SpaceObject/EveSwarm.cpp:984–998  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Sets swarmer count --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

982// Sets swarmer count
983// --------------------------------------------------------------------------------
984void EveSwarm::SetCount( int count )
985{
986 while( m_count != count )
987 {
988 if( m_count > count )
989 {
990 RemoveSwarmer();
991 }
992 else
993 {
994 AddSwarmer();
995 }
996 m_targetIndex = TriRandInt( m_count );
997 }
998}
999
1000void EveSwarm::RegisterComponents()
1001{

Callers 4

FillMeshAreaVectorMethod · 0.45
SetupImpactEffectsMethod · 0.45
AddSwarmerMethod · 0.45
RemoveSwarmerMethod · 0.45

Calls 1

TriRandIntFunction · 0.85

Tested by

no test coverage detected