//-----------------------------------------------------------------------------------------------
void Scenario::Update( double deltaSeconds )
{
	m_updateFunction( *this, deltaSeconds );

	// Update players
	for( unsigned int actorIndex = 0; actorIndex < m_actors.size(); ++ actorIndex )
	{
		Actor& actor = *m_actors[ actorIndex ];
		if( actor.m_isPlayer )
		{
			actor.UpdateAsPlayer( deltaSeconds, *this );
		}
	}

	// Update all NPCs
	for( unsigned int actorIndex = 0; actorIndex < m_actors.size(); ++ actorIndex )
	{
		Actor& actor = *m_actors[ actorIndex ];
		if( !actor.m_isPlayer )
		{
			actor.Update( deltaSeconds, *this );
		}
	}
}
Exemplo n.º 2
0
 void updateTimerFired()
 {
     m_updateFunction();
 }
Exemplo n.º 3
0
void CompositingRunLoop::updateTimerFired()
{
    m_updateFunction();
    m_lastUpdateTime = monotonicallyIncreasingTime();
}
Exemplo n.º 4
0
 void updateTimerFired()
 {
     m_updateFunction();
     m_lastUpdateTime = monotonicallyIncreasingTime();
 }