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

Method SetControllerVariable

trinity/Eve/EveEffectRoot2.cpp:840–859  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

838
839// -----------------------------------------------------------------------------
840void EveEffectRoot2::SetControllerVariable( const char* name, float value )
841{
842 auto found = find_if( begin( m_controllerVariables ), end( m_controllerVariables ), [name]( auto& x ) { return x.first == name; } );
843 if( found == end( m_controllerVariables ) )
844 {
845 m_controllerVariables.push_back( { name, value } );
846 }
847 else
848 {
849 found->second = value;
850 }
851 for( auto it = begin( m_controllers ); it != end( m_controllers ); ++it )
852 {
853 ( *it )->SetVariable( name, value );
854 }
855 for( auto it = begin( m_effectChildren ); it != end( m_effectChildren ); ++it )
856 {
857 ( *it )->SetControllerVariable( name, value );
858 }
859}
860
861void EveEffectRoot2::HandleControllerEvent( const char* name )
862{

Callers 1

OnListModifiedMethod · 0.45

Calls 3

beginFunction · 0.50
endFunction · 0.50
SetVariableMethod · 0.45

Tested by

no test coverage detected