Пример #1
0
void 
OpenSteer::OpenSteerDemo::popPhase (void)
{
    // update timer for current (old) phase: add in time since last switch
    updatePhaseTimers ();

    // restore old phase
    phase = phaseStack[--phaseStackIndex];
}
//-----------------------------------------------------------------------------
void 
	OpenSteer::OpenSteerDemo::popPhase (void)
{
	// update timer for current (old) phase: add in time since last switch
	updatePhaseTimers ();

	// restore old phase
	phase = phaseStack[--phaseStackIndex];
	updatePhaseActive = phase == OpenSteer::OpenSteerDemo::updatePhase;
	GlobalData::setDrawPhaseActive( phase == OpenSteer::OpenSteerDemo::drawPhase );
}
Пример #3
0
void 
OpenSteer::OpenSteerDemo::pushPhase (const int newPhase)
{
    // update timer for current (old) phase: add in time since last switch
    updatePhaseTimers ();

    // save old phase
    phaseStack[phaseStackIndex++] = phase;

    // set new phase
    phase = newPhase;

    // check for stack overflow
    if (phaseStackIndex >= phaseStackSize) errorExit ("phaseStack overflow");
}