Exemplo n.º 1
0
 public void CheckPlayer()
 {
     if (PhotonSceneManager.GetInstance().currentRole != null)
     {
         currentState = StepXmlState.Wait;
     }
 }
Exemplo n.º 2
0
    public void FinishStep()
    {
        for (int i = 0; i < step_BaseList.Count; i++)
        {
            step_BaseList[i].AllFinish();
        }

        step_Animation.PlayAnimation("End");
        PhotonNetwork.player.SetStepState(true);
        Debug.Log("本地完成一个步骤");
        currentState = StepXmlState.Other;;
        Invoke("DeleySetCheckOther", 2);
    }
Exemplo n.º 3
0
    /// <summary>
    /// 检测其他玩家的步骤
    /// </summary>
    public void CheckOtherPlayer()
    {
        bool stepFinish = true;

        if (!CheckAllIsFinish())
        {
            stepFinish = false;
            return;
        }
        if (stepFinish)
        {
            currentState = StepXmlState.FinishOther;
        }
    }
Exemplo n.º 4
0
    /// <summary>
    /// 检测步骤
    /// </summary>
    public void CheckStep()
    {
        bool stepFinish = true;

        for (int i = 0; i < step_BaseList.Count; i++)
        {
            if (!step_BaseList[i].IsFinish())
            {
                stepFinish = false;
                return;
            }
        }
        if (stepFinish)
        {
            currentState = StepXmlState.Finish;
        }
    }
Exemplo n.º 5
0
 /// <summary>
 /// 下一个步骤
 /// </summary>
 public void NextStep()
 {
     stepIndex++;
     if (stepIndex < stepLength)
     {
         PhotonNetwork.player.SetStepState(false);
         step_CurrPlayerList.Clear();
         StartStep(stepList[stepIndex]);
         currentState = StepXmlState.Run;
         step_Animation.PlayAnimation("Begin");
     }
     else
     {
         currentState = StepXmlState.End;
         Debug.Log("所有的步骤结束了");
     }
     Debug.Log("NextStep");
 }
Exemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     currentState   = StepXmlState.None;
     step_Animation = GetComponent <StepXmlAnimationManager>();
 }
Exemplo n.º 7
0
 public void FinishOtherStep()
 {
     currentState = StepXmlState.Wait;
     Debug.Log("网络同步完成一个步骤");
 }
Exemplo n.º 8
0
 /// <summary>
 /// 增加延迟修改状态,避免多客户端数据同步延迟的问题
 /// </summary>
 void DeleySetCheckOther()
 {
     Debug.Log("等待2秒后");
     currentState = StepXmlState.CheckOther;
 }