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

Method GetStateByName

trinity/Controllers/Tr2StateMachine.cpp:194–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194Tr2StateMachineState* Tr2StateMachine::GetStateByName( const char* name ) const
195{
196 for( auto it = begin( m_states ); it != end( m_states ); ++it )
197 {
198 if( ( *it )->GetName() == name )
199 {
200 return *it;
201 }
202 }
203 return nullptr;
204}
205
206float Tr2StateMachine::GetMachineRunTime() const
207{

Callers 2

SetStartStateByNameMethod · 0.80
UpdateDestinationMethod · 0.80

Calls 3

beginFunction · 0.50
endFunction · 0.50
GetNameMethod · 0.45

Tested by

no test coverage detected