Beispiel #1
0
    void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        WebCam.Init();         //웹캠 초기화
        webcam = WebCam.Front; //현재 웹캠을 가져옴
        webcam.Play();         //play한다.

        //판을 이동시킨다.
        var transform = backgroundQuad.transform;

        transform.localPosition = new Vector3(0, 0, 70);
        transform.localScale    = new Vector3(-640.0f / 480, 480.0f / 480, 1) * 120;

        //텍스쳐를 만들고 메테리얼에 붙여둔다.
        tex2d = new Texture2D(webcam.requestedWidth, webcam.requestedHeight, TextureFormat.ARGB32, false);
        capture.mainTexture = tex2d;

        module = Alchera.Module.Face();
        //Debug.Log(module);
        Debug.Log(module.Version);

        startFlag     = false;
        pauseFlag     = false;
        quitSceneFlag = false;
        detectPanel.SetActive(true);
        pauseview.SetActive(false); //일시정지를 안보이게 한다.
        ReadyImage.SetActive(false);

        startSureFlag = true;
    }
Beispiel #2
0
    void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        WebCam.Init();         //웹캠 초기화
        webcam = WebCam.Front; //현재 웹캠을 가져옴
        webcam.Play();         //play한다.

        //판을 이동시킨다.
        var transform = backgroundQuad.transform;

        transform.localPosition = new Vector3(0, 0, 70);
        transform.localScale    = new Vector3(-640.0f / 480, 480.0f / 480, 1) * 120;

        //텍스쳐를 만들고 메테리얼에 붙여둔다.
        tex2d = new Texture2D(webcam.requestedWidth, webcam.requestedHeight, TextureFormat.ARGB32, false);
        capture.mainTexture = tex2d;

        module = Alchera.Module.Face();
        //Debug.Log(module);
        Debug.Log(module.Version);

        startFlag     = false;
        pauseFlag     = false;
        debugFlag     = false;
        badFlag       = false;
        detectFlag    = false;
        quitSceneFlag = false;
        detectPanel.SetActive(true);
        DebugPanel.SetActive(false);
        pauseview.SetActive(false); //일시정지를 안보이게 한다.
        playerMesh              = player.GetComponent <MeshRenderer>();
        faceMesh                = face1.GetComponent <MeshRenderer>();
        playerMesh.enabled      = false;
        faceMesh.enabled        = false;
        faceMesh.material.color = new Color(1, 1, 1, 0.2f);

        startSureFlag = true;
    }