Пример #1
0
        public void Play(ScreenTrans trans)
        {
            mPrevTrans = mCurrentTrans;

            mCurrentTrans = trans;
            if (mCurrentTrans)
            {
                mCurrentTrans.Prepare();

                enabled = true;
            }
            else
            {
                enabled = false;
            }
        }
Пример #2
0
        IEnumerator SceneManager.ITransition.Out()
        {
            if (transitionOut)
            {
                transitionOut.Play();

                while (transitionOut.isPlaying)
                {
                    yield return(null);
                }
            }
            else if (transitionIn)
            {
                transitionIn.Prepare();
                transitionIn.isRenderActive = true;
            }
        }
Пример #3
0
        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;
        }