// Start is called before the first frame update void Start() { camMaster = FindObjectOfType <CameraMaster>(); bCam = FindObjectOfType <BodyCam>(); ted = FindObjectOfType <Teddy>(); rightEye = FindObjectOfType <TeddyRightEye>(); fearMeter = FindObjectOfType <Fear>(); HideMeshesAndColliders(); SetTint(); }
// Start is called before the first frame update void Start() { rigid = this.GetComponent <Rigidbody>(); coll = this.GetComponent <Collider>(); bCam = FindObjectOfType <BodyCam>(); camMaster = FindObjectOfType <CameraMaster>(); leftEye = FindObjectOfType <TeddyLeftEye>(); rightEye = FindObjectOfType <TeddyRightEye>(); tedHeadVision = FindObjectOfType <HeadVision>(); useRefPosition = null; }
private Quaternion returnRotLeft, returnRotRight, initialRotBody; // For resetting rotation void Start() { view = FindObjectOfType <BodyCam>(); ted = FindObjectOfType <Teddy>(); anim = ted.GetComponent <Animator>(); rigid = ted.GetComponent <Rigidbody>(); leftEye = FindObjectOfType <TeddyLeftEye>(); rightEye = FindObjectOfType <TeddyRightEye>(); leftEyeColl = leftEye.GetComponent <Collider>(); rightEyeColl = rightEye.GetComponent <Collider>(); leftEyeRigid = leftEye.GetComponent <Rigidbody>(); rightEyeRigid = rightEye.GetComponent <Rigidbody>(); headd = GameObject.Find("head"); mainOverlay.enabled = false; // mainOverlay is used for special screens, like loading, static, and jamming; off at start topRightInsert.enabled = false; // Picture within picture is off at start leftEyeColl.enabled = false; rightEyeColl.enabled = false; leftEyeRigid.isKinematic = true; rightEyeRigid.isKinematic = true; view.bodyCamActive = true; leftEyeLodged = true; // Eyes lodged at start rightEyeLodged = true; // leftEyeTransitioning = false; // Eyes not in process of lodging/dislodging at start rightEyeTransitioning = false; // jammed = false; // No jamming at start jamView = false; // clearView = true; // initialPosBody = view.transform.localPosition; // Set initial positions for body and eyes initialPosLeft = leftEye.transform.localPosition; // initialPosRight = rightEye.transform.localPosition; // initialRotBody = view.transform.localRotation; // Set initial rotations for body and eyes returnRotLeft = leftEye.transform.localRotation; // returnRotRight = rightEye.transform.localRotation; // Debug.Log(view.transform.localEulerAngles); // Troubleshoot eye rotation--what is the initial orientation, for reference? }
// Use this for initialization void Start() { camMaster = FindObjectOfType <CameraMaster>(); bCam = FindObjectOfType <BodyCam>(); ted = FindObjectOfType <Teddy>(); rightEye = FindObjectOfType <TeddyRightEye>(); fearMeter = FindObjectOfType <Fear>(); tedDoorInside = tedDoorTrigInside.GetComponent <AutoDoor>(); tedDoorOutside = tedDoorTrigOutside.GetComponent <AutoDoor>(); anim = tedDoorToAnimate.GetComponent <Animator>(); animDup = tedDoorToAnimateDup.GetComponent <Animator>(); doorCollider = tedDoorToAnimate.GetComponent <Collider>(); statusWindow = FindObjectOfType <StatusPopup>(); doorOpen = false; tedInsideOrOut = false; wholeDoorTransportFromLocation = wholeDoorSetup.position; tedTransportFromLocation = ted.transform.position; rightEyeTransportFromLocation = rightEye.transform.position; }
// Use this for initialization void Start() { view = FindObjectOfType <BodyCam>(); ted = FindObjectOfType <Teddy>(); anim = ted.GetComponent <Animator>(); rigid = ted.GetComponent <Rigidbody>(); tedHead = FindObjectOfType <TeddyHead>(); animHead = tedHead.GetComponent <Animator>(); wkDesk = FindObjectOfType <WorkDesk>(); commsImg = commsEnter.transform.parent.GetComponent <RawImage>(); leftEye = FindObjectOfType <TeddyLeftEye>(); rightEye = FindObjectOfType <TeddyRightEye>(); //leftEyeColl = leftEye.GetComponent<Collider>(); rightEyeColl = rightEye.GetComponent <Collider>(); //leftEyeRigid = leftEye.GetComponent<Rigidbody>(); rightEyeRigid = rightEye.GetComponent <Rigidbody>(); //headd = GameObject.Find("tedhead"); reticleImg = GameObject.Find("Reticle").GetComponent <RawImage>(); leftEyepatch = leftEye.transform.Find("lefteyepatch"); rightEyepatch = rightEye.transform.Find("righteyepatch"); gamePaused = false; mainOverlay.enabled = false; // mainOverlay is used for special screens, like loading, static, and jamming; off at start topRightInsert.enabled = false; // Picture within picture is off at start //leftEyeColl.enabled = false; rightEyeColl.enabled = false; //leftEyeRigid.isKinematic = true; rightEyeRigid.isKinematic = true; view.bodyCamActive = true; leftEyeLodged = true; // Eyes lodged at start rightEyeLodged = true; // leftEyeTransitioning = false; // Eyes not in process of lodging/dislodging at start rightEyeTransitioning = false; // jammed = false; // No jamming at start jamView = false; // clearView = true; // currentHallucinationFrameIndex = 0; hallucinationFrameTimeIndex = 0; reticleEnabled = true; hallucinating = false; atTedsRoom = false; commsEnabled = false; commsEnter.enabled = false; commsEnter.DeactivateInputField(); commsEnter.GetComponent <Image>().enabled = false; englishOrSolar = true; leftEyeAvailable = false; reticlePressTime = 0; reticlePressed = false; if (headbob) { headdRT = headdActualRT; headd = headActual; } else { headdRT = headdRefRT; headd = headNoBob; } //camTarget = null; //smoothdamp attempt initialPosBody = view.transform.localPosition; // Set initial positions for body and eyes initialPosLeft = leftEye.transform.localPosition; // initialPosRight = rightEye.transform.localPosition; // initialRotBody = view.transform.localRotation; // Set initial rotations for body and eyes returnRotLeft = leftEye.transform.localRotation; // returnRotRight = rightEye.transform.localRotation; SwitchCam(view.gameObject, headd, initialPosBody, initialRotBody); initialRotBody = view.transform.localRotation; eyeDislodgeTimer = 0.2f; eyeDislodgeTimerRef = 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; }