示例#1
0
    IEnumerator  WaitPhone()//判断电话输入,
    {
        while (true)
        {
            if (!stage.inputField.IsActive())
            {
                stage.ActInputF(true);
            }

            if (stage.strPhoneNum.Length == 5)
            {
                yield return(new WaitForSeconds(0.5f));

                StageData stageData = storyData.GetStageDataByPhone(stage.strPhoneNum, lastStage);
                if (stageData == null)
                {
                    stage.ActInputF(true);
                    stage.ErrorPhone();
                    //Debug.Log("error phone");
                }
                else
                {
                    lastStage = curStage;
                    curStage  = stageData.ID;

                    stage.onMaskEnd = Select;
                    stage.SelectMask();
                    yield break;
                }
            }

            yield return(null);
        }
    }