Exemplo n.º 1
0
void TransitionFadeIn::Update()
{
	Alpha += FadePerUpdate;
	if( Alpha >= SP_ONE )
	{
		// Swap to new stage
		Stage* t = Target;
		delete Framework::System->ProgramStages->Pop();		// Remove transition stage (this)
		t->Finish();
		Framework::System->ProgramStages->Push( t );
	} else {
		// Allow the target stage to process updates, so any animations will run
		Target->Update();
	}
}
Exemplo n.º 2
0
Stage* StageStack::Pop()
{
  Stage* result;

  // Remove stage from stack
  result = this->Current();
  result->Finish();
  Stack[StackIndex] = 0;
  StackIndex--;

  // If there's still an item on the stack, resume it
  if( StackIndex != -1 )
    this->Current()->Resume();

  return result;
}
Exemplo n.º 3
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.º 4
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();
			}
		}
	}
}