Ejemplo n.º 1
0
    // 更新
    public void StateUpdate()
    {
        // 是否加载完成
        if (async != null && !async.isDone)
        {
            m_transitionScene.Progress(async.progress);
            return;
        }

        // 通知新的State开始
        if (m_bRunBegin == false && m_State != null)
        {
            if (async != null && async.isDone)
            {
                m_transitionScene.StateEnd();
                async = null;
            }
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_bRunBegin = true && m_State != null)
        {
            m_State.StateUpdate();
        }
    }
    //更新
    public void StateUpdate()
    {
        //加载中就直接跳出
        if (A != null)
        {
            if (A.isDone && A.progress < 0.8f)
            {
                return;
            }
        }



        //通知新的State开始
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     if (actstate != null)
     {
         actstate.StateUpdate();
         Debug.Log(actstate + "実行中");
     }
 }
Ejemplo n.º 4
0
        internal void StateUpdate()
        {
            if (loadSceneOperation == null || !loadSceneOperation.isDone)
            {
                return;
            }

            if (!isBegin)
            {
                sceneState.StateBegin();
                isBegin = true;
            }

            sceneState.StateUpdate();
        }
Ejemplo n.º 5
0
 public void StateUpdate()
 {
     if (Application.isLoadingLevel)
     {
         return;
     }
     if (m_State != null && m_bRunBegin == false)
     {
         m_State.StateBegin();
         m_bRunBegin = true;
     }
     if (m_State == null)
     {
         m_State.StateUpdate();
     }
 }
Ejemplo n.º 6
0
 public void StateUpdate()
 {
     if (mAO != null && mAO.isDone != true)
     {
         return;
     }
     if (mIsRunedStart == false && mAO != null && mAO.isDone)
     {
         mState.StateStart();
         mIsRunedStart = true;
     }
     if (mState != null)
     {
         mState.StateUpdate();
     }
 }
    public void StateUpdate()
    {
        if (m_AO != null && !m_AO.isDone)
        {
            return;
        }

        if (!isRunStart && m_AO != null && m_AO.isDone)
        {
            state.StateStart();
            isRunStart = true;
        }
        if (state != null)
        {
            state.StateUpdate();
        }
    }
Ejemplo n.º 8
0
    public void StateUpdate()
    {
        if (_async != null && _async.isDone == false)
        {
            return;                                                 //场景正在切换
        }
        if (_isStart == false && _async != null && _async.isDone == true)
        {
            _state.StateStart();
            _isStart = true;
        }

        if (_state != null)
        {
            _state.StateUpdate();
        }
    }
Ejemplo n.º 9
0
    } //设置场景状态,加载场景,清理上一个场景等操作

    public void StateUpdate()
    {
        if (mAO != null && mAO.isDone == false)
        {
            return;                                                    //当前场景正在加载但是没有完成,直接返回
        }
        if (mIsRunStart == false && mAO != null && mAO.isDone == true) //同样判断当前场景是否加载完,但是需要跳过初始场景
        {
            mState.StateStart();
            mIsRunStart = true;
        }

        if (mState != null)
        {
            mState.StateUpdate();
        }
    } //更新场景,当场景加载完毕时,启动初始化方法,初始化场景
Ejemplo n.º 10
0
    public void StateUpdate()
    {
        if (mStateAO != null && mStateAO.isDone == false)
        {
            return;
        }

        if (mIsRunStart == false && mStateAO != null && mStateAO.isDone == true)
        {
            mISceneState.StateStart();
            mIsRunStart = true;
        }

        if (mISceneState != null)
        {
            mISceneState.StateUpdate();
        }
    }
Ejemplo n.º 11
0
    public void StateUpdate()
    {
        //当场景还在加载时,不执行StateUpdate()
        if (mAO != null && mAO.isDone == false)
        {
            return;
        }

        if (mAO != null && mAO.isDone == true && !mIsRunStart)
        {
            mState.StateStart();
            mIsRunStart = true;
        }
        if (mState != null)
        {
            mState.StateUpdate();
        }
    }
Ejemplo n.º 12
0
    public void StateUpdate()
    {
        if (m_Ao != null && m_Ao.isDone == false)
        {
            Debug.Log("正在加载场景");
            return;
        }

        if (m_Ao != null && m_Ao.isDone == true && m_IsRunStart == false)
        {
            m_State.StateStart();
            m_IsRunStart = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
    // 更新
    public void StateUpdate()
    {
        // 是否还在载入
        if (m_Async != null && m_Async.isDone)
        {
            m_Async = null;
            // 通知新的State开始
            if (m_State != null && m_bRunBegin == false)
            {
                m_State.StateBegin();
                m_bRunBegin = true;
            }

            if (m_State != null)
            {
                m_State.StateUpdate();
            }
        }
    }
Ejemplo n.º 14
0
    public void StateUpdate()
    {
        if (sceneAsync != null && !sceneAsync.isDone)
        {
            return;
        }
        //else
        //    sceneAsync.allowSceneActivation = true;
        if (sceneState != null && runBegin == false)
        {
            sceneState.StateBegin();
            runBegin = true;
        }

        if (sceneState != null)
        {
            sceneState.StateUpdate();
        }
    }
Ejemplo n.º 15
0
    /// <summary>
    /// 更新
    /// </summary>
    public void StateUpdate()
    {
        if (operation != null && operation.isDone == false)
        {
            return;
        }

        if (operation != null)
        {
            if (operation.isDone && m_bRunBegin == false)
            {
                m_State.StateBegin();
                m_bRunBegin = true;
            }
        }
        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 16
0
    public void StateUpdate()
    {
        //Is loading...
        if (m_nowAsycOperation != null && !m_nowAsycOperation.isDone)
        {
            return;
        }

        //let new scene start
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
    /// <summary>
    /// 状态更新
    /// </summary>
    public void StateUpdate()
    {
        // 是否在加载中
        if (SceneInfoManager.isLoadingLevel)
        {
            return;
        }

        // 通知新的State开始	(每一个换到一个新场景,之后就跑一次)
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
    public void StateUpdate()
    {
        // if still loading level
        if (Application.isLoadingLevel)
        {
            return;
        }

        // Start new State
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 19
0
    // 更新
    public void StateUpdate()
    {
        // 是否還在載入
        if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().isLoaded == false)
        {
            return;
        }


        // 通知新的State開始
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 20
0
    /// <summary>
    /// 状态更新
    /// </summary>
    public void StateUpdate()
    {
        //是否还在载入
        if (Application.isLoadingLevel)
        {
            return;
        }

        // 通知新的State開始
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            //调用状态的状态更新
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 21
0
    /// <summary>
    /// 状态更新
    /// </summary>
    public void StateUpdate()
    {
        // 正在切换场景
        if (mAO != null && !mAO.isDone)
        {
            return;
        }

        // 场景是否加载完成
        if (mAO != null && mAO.isDone && !mIsRunStartState)
        {
            // 设置开始状态
            mSceneState.StateStart();
            mIsRunStartState = true;
        }
        // 设置状态更新
        if (mSceneState != null)
        {
            mSceneState.StateUpdate();
        }
    }
Ejemplo n.º 22
0
    /// <summary>
    /// 更新
    /// </summary>
    public void StateUpdate()
    {
        // 是否還在載入
        if (!SceneManager.GetActiveScene().isLoaded)
        {
            Debug.Log("還在載入: " + SceneManager.GetActiveScene().name);
            return;
        }

        // 通知新的State開始
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 23
0
    public void UpdateState()
    {
        //场景加载ing,直接返回
        if (m_AO != null && !m_AO.isDone)
        {
            return;
        }

        //场景加载完毕,直接切换场景
        if (m_AO != null && m_AO.isDone && !m_IsRunState)
        {
            m_SceneState.StateStart();
            m_IsRunState = true;
        }

        //场景运行中
        if (m_SceneState != null)
        {
            m_SceneState.StateUpdate();
        }
    }
    //------------------------------------------------------


    //状态的更新
    public void StateUpdate()
    {
        //如果场景未加载完毕则返回
        if (_async != null && !_async.isDone)
        {
            return;
        }

        //首次运行
        if (_mstate != null && _mRunBegin == false)
        {
            _mRunBegin = true;
            _mstate.StateStart();
        }

        //不断更新
        if (_mstate != null)
        {
            _mstate.StateUpdate();
        }
    }
Ejemplo n.º 25
0
    public void StartUpdate()
    {
        // 如果场景还没加载完 说明目前场景属于过度阶段 则不需要进行更新 直接return
        if (mAO != null && mAO.isDone == false)
        {
            return;
        }

        // 如果场景刚刚加载完 将mAO置空 执行 StateStart() 事件
        if (mAO != null && mAO.isDone == true)
        {
            mAO = null;
            mState.StateStart();
        }

        // 如果目前 mState 不为空 执行 StateUpdate()
        if (mState != null)
        {
            mState.StateUpdate();
        }
    }
Ejemplo n.º 26
0
    // 更新
    public void StateUpdate()
    {
        //是否還在載入
        if (!asyncOperation.isDone)
        {
            return;
        }



        // 通知新的State開始
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
    /// <summary>
    /// 更新
    /// </summary>
    public void StateUpdate()
    {
        //Debug.Log(asyncOperation.progress);
        //场景是否加载完成
        if (asyncOperation != null && !asyncOperation.isDone)
        {
            return;
        }

        //通知新的State开始
        if (m_State != null && m_bRunBegin == false)
        {
            m_bRunBegin = true;
            m_State.StateBegin();
        }

        //更新
        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 28
0
    /// <summary>
    /// 更新
    /// </summary>
    public void StateUpdate()
    {
        //场景是否还在加载
        if (m_AsyncOperation != null)
        {
            if (!m_AsyncOperation.isDone)
            {
                return;
            }
        }

        //通知新的State开始
        if (m_State != null && m_bRunBegin == false)
        {
            m_State.StateBegin();
            m_bRunBegin = true;
        }

        if (m_State != null)
        {
            m_State.StateUpdate();
        }
    }
Ejemplo n.º 29
0
    /// <summary>
    /// Start跟Update在這裡運作
    /// </summary>
    public void StateUpdate()
    {
        //Debug.Log(asyn);
        //是否載入場景
        if (asyn != null)
        {
            if (asyn.progress < 1)
            {
                return;
            }
        }

        //通知新的State開始
        if (m_SceneState != null && m_bRunBegin == false)
        {
            m_SceneState.StateBegin();
            m_bRunBegin = true;
        }

        if (m_SceneState != null)
        {
            m_SceneState.StateUpdate();
        }
    }