예제 #1
0
    IEnumerator startScannerEffect()
    {
        Debug.Log("debugging --- go");
        scannerEffectScrip.startPainting();
        yield return(new WaitForSeconds(0.1f));

        churchAnimator.SetTrigger("go");
        scannerEffectScrip.startPainting();
        Debug.Log("debugging --- go end");
    }
예제 #2
0
    IEnumerator scanningEvents()
    {
        Debug.Log("scanning1");
        painting.startFade();
        yield return(new WaitForSeconds(3f));

        scanScript.startPainting();
        church.animation.SetTrigger("go");
        img.color = m_NewColor;
    }
예제 #3
0
    IEnumerator setText(int txt)
    {
        Debug.Log("debugging --- " + txt);
        switch (txt)
        {
        case 1:
            instructionsTextBox.text = texts[txt];
            yield return(new WaitForSeconds(2f));

            foundPlanes = false;
            break;

        case 2:
            foundPlanes = true;
            yield return(new WaitForSeconds(1f));

            StartCoroutine(fadeOut(scanFloorIcon));
            instructionsTextBox.text = texts[txt];                     //Look at the centre panel of the painting
            arScript.active          = true;
            break;

        //case 3:
        //    yield return new WaitForSeconds(1f);
        //    // StartCoroutine(fadeOut(scanFloorIcon, 1f));
        //    instructionsTextBox.text = texts[txt]; //Now take a few steps back and mind the bench!
        //    sCol.SetActive(true);
        //    break;
        //case 4:
        //    yield return new WaitForSeconds(0.5f);
        //    instructionsTextBox.text = texts[txt]; //Look back at the painting at tap start
        //    paintingCol.SetActive(true);
        //    paintingCol.GetComponent<paintingRaycast>().active = true;
        //    startButton.interactable = true;
        //    StartCoroutine(fadeIn(startButtonCanvas, 1f));
        //case 5:
        //    sCol.SetActive(false);
        //    paintingCol.SetActive(false);
        //    scannerEffectDemo.startPainting();
        //    churchMove.SetTrigger("go");
        //    StartCoroutine(fadeOut(startButtonCanvas, 1f));
        //    StartCoroutine(fadeOut(subtitleBox));
        //    break;
        case 3:
            yield return(new WaitForSeconds(1f));

            // StartCoroutine(fadeOut(scanFloorIcon, 1f));
            churchMove.SetTrigger("go");
            instructionsTextBox.text = texts[txt];
            yield return(new WaitForSeconds(5f));

            StartCoroutine(fadeOut(subtitleBox));
            scannerEffectDemo.startPainting();
            break;
        }
    }
예제 #4
0
    void AddImageAnchor(ARImageAnchor arImageAnchor)
    {
        Debug.LogFormat("image anchor added[{0}] : tracked => {1}", arImageAnchor.identifier, arImageAnchor.isTracked);
        if (arImageAnchor.referenceImageName == referenceImage.imageName)
        {
            Vector3    position = UnityARMatrixOps.GetPosition(arImageAnchor.transform);
            Quaternion rotation = UnityARMatrixOps.GetRotation(arImageAnchor.transform);

            imageAnchorGO = Instantiate <GameObject> (prefabToGenerate, position, rotation);
            if (!paintingStarted)
            {
                Debug.Log("debugging seen the painting");
                paintingStarted = true;
                Debug.Log("debugging seen the painting 01");
                // ScannerOrigin.position = cam.WorldToScreenPoint(position);
                ScannerOrigin.position = new Vector3(position.x + 0.66f, position.y + 0.66f, position.z);
                Debug.Log("debugging seen the painting 02");
                scanScript.startPainting();
                Debug.Log("debugging scanner pos " + ScannerOrigin.position);
            }
        }
    }