示例#1
0
 public void UpdateScene()
 {
     if (startLoadTime == 0)
     {
         startLoadTime = getCurrentTimeSeconds();
     }
     if (scene_now != null && scene_now.loadfinished)
     {
         _scene_now.StateUpdate();
     }
     if (_scene_next != null && !_scene_next.loadfinished && getCurrentTimeSeconds() - startLoadTime > 1)   // 讀取
     {
         _scene_next.LoadScene().MoveNext();
         progress = _scene_next.progress;
         loading  = true;
         if (_scene_next.loadfinished)
         {
             //Debug.Log("Loading Finish");
         }
     }
     else
     {
         loading = false;
     }
     if (_scene_next != null && _scene_next.loadfinished)
     {
         if (immediately)
         {
             ChangeSceneState();
         }
     }
 }
示例#2
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();
     }
 }
示例#3
0
 //主系统中Update一直调用的函数
 public void StateUpdate()
 {
     //如果正在加载场景直接返回
     if (Application.isLoadingLevel)
         return;
     //执行update
     if (m_State != null && m_bRunBegin == false)
     {
         m_State.StateBegin();
         m_bRunBegin = true;
     }
     if (m_State != null)
     {
         m_State.StateUpdate();
     }
 }
    /// <summary>
    /// 状态的更新
    /// </summary>
    public void UpdateState()
    {
        //正在进行切换
        if (asOpe != null && !asOpe.isDone)
        {
            return;
        }

        //如果切换完毕
        if (asOpe != null && asOpe.isDone && !isFinishStart)
        {
            mState.StateStart();
            isFinishStart = true;
        }

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