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

Method SetControllerVariable

trinity/Eve/SpaceObject/EveSpaceObject2.cpp:3752–3776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3750}
3751
3752void EveSpaceObject2::SetControllerVariable( const char* name, float value )
3753{
3754 auto found = find_if( begin( m_controllerVariables ), end( m_controllerVariables ), [name]( auto& x ) { return x.first == name; } );
3755 if( found == end( m_controllerVariables ) )
3756 {
3757 m_controllerVariables.push_back( { name, value } );
3758 }
3759 else
3760 {
3761 found->second = value;
3762 }
3763 for( auto it = begin( m_controllers ); it != end( m_controllers ); ++it )
3764 {
3765 ( *it )->SetVariable( name, value );
3766 }
3767 for( auto it = begin( m_effectChildren ); it != end( m_effectChildren ); ++it )
3768 {
3769 auto child = *it;
3770 child->SetControllerVariable( name, value );
3771 }
3772 for( auto it = begin( m_overlayEffects ); it != end( m_overlayEffects ); ++it )
3773 {
3774 ( *it )->SetControllerVariable( name, value );
3775 }
3776}
3777
3778void EveSpaceObject2::HandleControllerEvent( const char* name )
3779{

Callers 1

OnListModifiedMethod · 0.45

Calls 3

beginFunction · 0.50
endFunction · 0.50
SetVariableMethod · 0.45

Tested by

no test coverage detected