예제 #1
0
        void RestorePlayer()
        {
            if (mCurTrans != null)
            {
                if (mCurPlayer == null)
                {
                    Camera cam = mCurTrans.GetCameraTarget();
                    if (cam)
                    {
                        mCurPlayer = cam.GetComponent <ScreenTransPlayer>();
                        if (!mCurPlayer)
                        {
                            mCurPlayer = cam.gameObject.AddComponent <ScreenTransPlayer>();
                        }

                        mCurPlayer.Play(mCurTrans);
                    }
                }
            }
        }
예제 #2
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;
        }