示例#1
0
    void Awake()
    {
        controller = this.GetComponent <CommsController>();
        commsNav   = FindObjectOfType <CommsNavigation>();
        inputField.onEndEdit.AddListener(AcceptStringInput);

        inputIsEmpty = false;
    }
示例#2
0
    // Use this for initialization
    void Awake()
    {
        commsNavigation  = FindObjectOfType <CommsNavigation>();
        commsDisplay     = GetComponent <Text>();
        responseText     = this.transform.Find("ResponseText").GetComponent <Text>();
        responseTextCopy = this.transform.Find("ResponseTextCopy").GetComponent <Text>();
        commsImg         = this.transform.parent.GetComponent <RawImage>();
        panels           = bgdPanels.GetComponent <PanelsBottom>();
        dateScreen       = FindObjectOfType <DatingScreen>();
        camMaster        = FindObjectOfType <CameraMaster>();
        musicBox         = FindObjectOfType <MusicPlayer>();
        scanner          = FindObjectOfType <InfoScan>();
        actCoord         = FindObjectOfType <ActionSceneCoordinator>();

        rightEye = FindObjectOfType <TeddyRightEye>();
        bCam     = FindObjectOfType <BodyCam>();

        commsDisplay.enabled     = false;
        commsImg.enabled         = false;
        responseText.enabled     = false;
        responseTextCopy.enabled = false;           // responseTextCopy is only used for determining the line count of individual responses; it is never displayed
        panels.HideInfoBgdPanel();

        textActivated = false;
        textActive    = false;

        commsDisplay.supportRichText     = true;
        responseText.supportRichText     = true;
        responseTextCopy.supportRichText = true;

        currentText           = "";
        currentResponseText   = "";
        listOfResponses       = "";
        responseTextCopy.text = "";

        currentResponseNumber = 0;
        readyForSelection     = false;

        portrait.enabled      = false;
        portraitFrame.enabled = false;

        unravellingText             = false;
        unravellingResponseText     = false;
        showingLoadingText          = false;
        isUnravelled                = false;
        unravellingTextStartTimeSet = false;

        char[] tempChars = loadingString.ToCharArray();
        for (int i = 0; i < tempChars.Length; i++)
        {
            loadingChars.Add(tempChars[i]);
        }

        skipUnravelling                = false;
        canSkipUnravelling             = false;
        unravellingTextCharIndex       = 0;
        loadingStringCharIndex         = 0;
        unravellingTextTimeRef         = 0;
        unravellingResponseTextTimeRef = 0;
        loadingTextTimeRef             = 0;

        closeEnoughToCommunicate = false;

        isUsingStardater = false;
        isInDatingChat   = false;
    }