Ejemplo n.º 1
0
    public void HandleSpeechAnnotation()
    {
        if (!bSpeechToText)
        {
            Renderer[] renderers = currentAnimationGO.GetComponentsInChildren <Renderer>();
            renderers[0].sharedMaterial = speechMaterial;
            renderers[1].sharedMaterial = speechMaterial;

            //currentAnimationGO.GetComponent<Renderer>().sharedMaterial.SetTexture("_MainTex", speechTexture);
            currentAnimationGO.SetActive(true);
            currentAnnotation         = speechAnnotation = new SpeechAnnotation(_video, _rightHand, _rightController, _head);
            speechAnnotation.IsActive = true;
            speechAnnotation.setAnnotationDurationTextMesh(_annotationDurationGO.GetComponent <TextMesh>());
            speechAnnotation.setID(currentAnnotationID);
            currentAnnotationID++;
            bSpeechToText = true;
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    public void init()
    {
        IsAnnotationActive = false;

        currentAnimationGO = GameObject.Instantiate(Resources.Load("Prefabs/CurrentAnnotation")) as GameObject;
        currentAnimationGO.SetActive(false);

        bVisualEffect  = false;
        bScribbler     = false;
        bSpeechToText  = false;
        bMark          = false;
        IsPlayingVideo = false;

        //Load menu buttons materials
        speechMaterial = Resources.Load("Materials/speechToTextMat") as Material;

        scribblerMaterial = Resources.Load("Materials/scribblerMat") as Material;

        visualEffectsMaterial = Resources.Load("Materials/highlightPointsMat") as Material;

        markMaterial = Resources.Load("Materials/markMat") as Material;

        deleteTexture = Resources.Load("Textures/deleteActive") as Texture;

        scribblerAnnotation    = null;
        visualEffectAnnotation = null;
        markAnnotation         = null;
        speechAnnotation       = null;
        staticAnnotationList   = new List <StaticAnnotation>();

        currentTime         = 0.0f;
        currentAnnotationID = 0;
        currentAnnotation   = null;

        inputManager = GameObject.Find("Controller (right)").GetComponentInChildren <InputManager>();
        currentAnnotationSelected = -1;
        DrawAnnotationsOnTimeline();
    }