public void HandleMarkAnnotation(GameObject _head, GameObject _rightPointer) { if (!bMark) { Renderer[] renderers = currentAnimationGO.GetComponentsInChildren <Renderer>(); renderers[0].sharedMaterial = markMaterial; renderers[1].sharedMaterial = markMaterial; //currentAnimationGO.GetComponent<Renderer>().sharedMaterial.SetTexture("_MainTex", markTexture); currentAnimationGO.SetActive(true); currentAnnotation = markAnnotation = new MarkAnnotation(_video, _rightHand, _rightController, _head); markAnnotation.IsActive = true; markAnnotation.setAnnotationDurationTextMesh(_annotationDurationGO.GetComponent <TextMesh>()); markAnnotation.setID(currentAnnotationID); currentAnnotationID++; bMark = true; } }
private async Task getPins() { var marks = await Mark.GetRelevantMarks(); if (marks != null) { mapView.RemoveAnnotations(mapView.Annotations); foreach (Mark mark in marks) { var pin = new MarkAnnotation() { Coordinate = new CLLocationCoordinate2D(mark.Latitude, mark.Longitude), Category = (eCategories)mark.CategoriesCode }; mapView.AddAnnotation(pin); } } }
// 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(); }