Esempio n. 1
0
    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);
                }
            }
        }
    }
Esempio n. 2
0
    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");
                }
            }
        }
    }