Exemplo n.º 1
0
void TransitionStrips::Update()
{
	frameIndex++;
	if( frameIndex >= frameMax )
	{
		Stage* t = Target;
		if( FadeToNewStage )
		{
			// Swap to new stage
			delete Framework::System->ProgramStages->Pop();		// Remove transition stage (this)
			t->Resume();
			t->Finish();
			Framework::System->ProgramStages->Push( t );
		} else {
			// Pop off back to stage
			while( Framework::System->ProgramStages->Current() != t )
			{
				delete Framework::System->ProgramStages->Pop();
			}
		}
	}
}
Exemplo n.º 2
0
void TransitionFade::Update()
{
	Alpha += FadePerUpdate;
	if( Alpha >= SP_ONE )
	{
		Stage* t = Target;
		if( FadeToNewStage )
		{
			// Swap to new stage
			delete Framework::System->ProgramStages->Pop();		// Remove transition stage (this)
			t->Resume();
			t->Finish();
			Framework::System->ProgramStages->Push( t );
		} else {
			// Pop off back to stage
			while( Framework::System->ProgramStages->Current() != t )
			{
				delete Framework::System->ProgramStages->Pop();
			}
		}
	}
}