Пример #1
0
    private void Update()
    {
        if (currentARState == ARState.None)
        {
            return;
        }

        if (Input.touchCount < 0)
        {
            return;
        }

        if (currentARState == ARState.Tracking)
        {
            //平面感知
            TrackingPlane();
        }
        else if (currentARState == ARState.Ready)
        {
            currentARState = ARState.Wait;
            uiManager.DisplayDebug(currentARState.ToString());

            //ゲーム開始の準備
            StartCoroutine(PraparateGameReady());
        }
        else if (currentARState == ARState.Play)
        {
            uiManager.DisplayDebug(currentARState.ToString());
        }
    }
Пример #2
0
    private IEnumerator PraparateGameReady()
    {
        //TODO 準備処理を書く

        yield return(new WaitForSeconds(2.0f));

        currentARState = ARState.Play;

        uiManager.DisplayDebug(currentARState.ToString());

        if (isARDebug == true)
        {
            StartCoroutine(fieldAutoScroller.StartFieldScroll());
        }

        //平面検知を非表示
        planeDetection.SetAllPlaneActivate(false);
    }