public void Play(ScreenTrans trans) { mPrevTrans = mCurrentTrans; mCurrentTrans = trans; if (mCurrentTrans) { mCurrentTrans.Prepare(); enabled = true; } else { enabled = false; } }
IEnumerator SceneManager.ITransition.Out() { if (transitionOut) { transitionOut.Play(); while (transitionOut.isPlaying) { yield return(null); } } else if (transitionIn) { transitionIn.Prepare(); transitionIn.isRenderActive = true; } }
IEnumerator DoProgress() { WaitForEndOfFrame wait = new WaitForEndOfFrame(); while (mProgress.Count > 0) { ProgressData curProg = mProgress.Dequeue(); mCurTrans = curProg.transition; mCurTrans.Prepare(); if (curProg.call != null) { curProg.call(mCurTrans, Action.Begin); } while (!mCurTrans.isDone) { //Debug.Log("playing: "+trans); RestorePlayer(); yield return(wait); } mPrevTrans = mCurTrans; if (curProg.call != null) { curProg.call(mCurTrans, Action.End); } mCurTrans = null; mCurPlayer = null; } mProgressRoutine = null; }