Example #1
0
    public void ToggleUIPanel(GameObject g)
    {
        if (g.activeSelf == true)
        {
            uiFader.FadeOutPanel(g);

            if (g = GameObject.Find("Textbox"))
            {
                textInput.currentField.interactable = false;
                textInput.currentField.onEndEdit.RemoveAllListeners();
            }
        }

        else
        {
            uiFader.FadeInPanel(g);

            if (g = GameObject.Find("Textbox"))
            {
                textInput.currentField.interactable = true;
                textInput.currentField.ActivateInputField();
                textInput.currentField.onEndEdit.AddListener(textInput.AcceptStringInput);
            }
        }
    }
Example #2
0
    public void QuitHacking()
    {
        //UpdateFmod to appropriate intense levels
        if (HackingController.importantFileFound)
        {
            HackingController.hackingIntensity.setValue(7);
            GameController.RunFunctionAfterDelay(200, ResetHackingTrack);
        }

        else
        {
            HackingController.hackingIntensity.setValue(1);
            HackingController.hackingTrack.setVolume(0);
            HackingController.hackingTrack.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
            controller.roomNavigation.defaultTrack.start();
        }

        Debug.Log("Hacking over");
        controller.hacking = false;

        //Switch UI's over
        uiFader.FadeOutPanel(controller.hackingUI);

        //Switch the current input fields around, then run ActivateFields
        textInput.currentField    = textInput.inputField;
        textInput.notCurrentField = textInput.hackingInputField;

        ActivateFields();

        //clear the hacking log so it becomes clear next time hacking is initiated

        controller.hackingActionLog.Clear();
        controller.hackingDisplayText.text = null;

        //Switch the display output to begin logging/outputting to the non hacking display once again
        controller.currentActionLog   = controller.textModeActionLog;
        controller.currentDisplayText = controller.defaultDisplayText;

        controller.LogStringWithReturn("You key your Quikterm(tm) off and stash it back in your coat.");
    }