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(); } }
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; }
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(); } } } }
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(); } } } }