// Start is called before the first frame update void Start() { // Initialize components faceAnim = face.GetComponent <Animator>(); speechController = this.transform.GetComponent <TextAndSpeech>(); tedHead = FindObjectOfType <TeddyHead>(); if (this.transform.Find("Inventory") != null) { inv = this.transform.Find("Inventory").GetComponent <Inventory>(); } actCoord = FindObjectOfType <ActionSceneCoordinator>(); // Set blinking parameters isBlinking = true; blinkRefTime = 0; actualSecPerBlink = Random.Range(secPerBlink - secPerBlinkDelta, secPerBlink + secPerBlinkDelta); // Initialize head and eye rotations and directions headInitialRotation = head.transform.rotation; headInitialForwardDirection = head.forward; headUpDirection = head.up; foreach (Transform eye in eyes) { eyesInitialRotation.Add(eye.transform.rotation); } // Setting look parameters lookingAtPerson = false; lookingAtPersonDuration = 0; lookingAtPersonDurationRefTime = 0; turningAwayFromPerson = false; // Initialize action and interaction states speakingAndWaitingToCueOtherNPC = false; }
// 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; }
void Awake() { controller = this.GetComponent <CommsController>(); actCoord = FindObjectOfType <ActionSceneCoordinator>(); //currentLine = null; }