protected override void PerformAction() { if (importType != (int)ImportTypes.NONE) { FirstPersonInteractor player = this.GetPlayer(); if (player != null) { player.setWorldActive("Annotation"); // Add summary annotation log to journal if (addToJournal && annotationType == (int)AnnotationTypes.SUMMARY) { player.GetComponentInChildren <Journal> ().AddToJournal(this); } // Display full annotation FullAnnotationGui annotationGui = player.GetComponentInChildren <FullAnnotationGui> (); if (!annotationGui.isUIActive()) { annotationGui.ActivateGui(this); } } } }
void Update() { FirstPersonInteractor player = this.GetPlayer(); if (player != null) { FullAnnotationGui annotationGui = player.GetComponentInChildren <FullAnnotationGui> (); if (annotationGui.isUIActive()) { if (Input.GetKey(KeyCode.Q)) { annotationGui.DeactivateGui(); player.setWorldActive("Annotation"); } } } }