Example #1
0
 public virtual void Clear()
 {
     if (mDeactiveCoroutine != null)
     {
         CoroutineUtil.StopCoroutine(mDeactiveCoroutine);
     }
 }
        public void Kill()
        {
            if (mCoroutine != null)
            {
                CoroutineUtil.StopCoroutine(mCoroutine);
            }

            isRunning = false;
        }
Example #3
0
        public static AsyncOperation UnloadScene(Scene pScene, Action <float> pOnProgress, Action pOnComplted)
        {
            if (!pScene.isLoaded)
            {
                pOnProgress(1f);
                return(null);
            }

            var sceneOperator = SceneManager.UnloadSceneAsync(pScene);

            CoroutineUtil.StartCoroutine(IEProcessOperation(sceneOperator, false, pOnProgress, pOnComplted));
            return(sceneOperator);
        }
Example #4
0
        public void AutoDeactive(float pCustomTime = 0)
        {
            if (mDeactiveCoroutine != null)
            {
                CoroutineUtil.StopCoroutine(mDeactiveCoroutine);
            }

            if (pCustomTime != 0)
            {
                mDeactiveCoroutine = CoroutineUtil.StartCoroutine(iEAutoDeactive(new WaitForSeconds(pCustomTime)));
            }
            else
            {
                mDeactiveCoroutine = CoroutineUtil.StartCoroutine(iEAutoDeactive(mWaitForDeactive));
            }
        }
Example #5
0
        public static AsyncOperation LoadScene(string pScene, bool pIsAdditive, bool pAutoActive, Action <float> pOnProgress, Action pOnCompleted, float pFixedLoadTime = 0)
        {
            var scene = SceneManager.GetSceneByName(pScene);

            if (scene.isLoaded)
            {
                pOnProgress.Raise(1);
                pOnCompleted.Raise();
                return(null);
            }

            var sceneOperator = SceneManager.LoadSceneAsync(pScene, pIsAdditive ? LoadSceneMode.Additive : LoadSceneMode.Single);

            sceneOperator.allowSceneActivation = false;
            CoroutineUtil.StartCoroutine(IEProcessOperation(sceneOperator, pAutoActive, pOnProgress, pOnCompleted, pFixedLoadTime));
            return(sceneOperator);
        }
Example #6
0
 private void MoveEmit(Transform pDestination, float pDuration, int pIndex)
 {
     CoroutineUtil.StartCoroutine(IEMoveEmit(pDestination, pDuration, pIndex));
 }
 public void Run()
 {
     mCoroutine = CoroutineUtil.StartCoroutine(IERun());
 }