private void Start() { bCam = FindObjectOfType <BodyCam>(); steeringWheelInitialRotation = steeringWheel.localRotation; if (smallBumpVolumeWheels != 0 && bigBumpVolumeWheels != 0 && continuousSoundsVolumeWheels != 0) { if (axleInfos.Count > 0) { foreach (AxleInfo axl in axleInfos) { if (axl.leftWheel.transform.GetComponent <VehicleGroundCollisions>()) { axl.leftWheel.transform.GetComponent <VehicleGroundCollisions>().SetVolumeLevels(smallBumpVolumeWheels, bigBumpVolumeWheels, continuousSoundsVolumeWheels); } if (axl.rightWheel.transform.GetComponent <VehicleGroundCollisions>()) { axl.rightWheel.transform.GetComponent <VehicleGroundCollisions>().SetVolumeLevels(smallBumpVolumeWheels, bigBumpVolumeWheels, continuousSoundsVolumeWheels); } } } } if (interiorInteractables.Count > 0) { foreach (Collider interactable in interiorInteractables) { interactable.enabled = false; } } }
// Start is called before the first frame update void Start() { agent = this.GetComponent <NavMeshAgent>(); rigid = this.GetComponent <Rigidbody>(); anim = this.GetComponent <Animator>(); ted = FindObjectOfType <Teddy>(); tedBody = FindObjectOfType <BodyCam>(); sight = viewFinder.GetComponent <viewCylinder>(); badge = GetComponentInChildren <ID>(); camControl = FindObjectOfType <CameraMaster>(); initialMotivation = motivationLevel; initialCuriosity = curiosityLevel; initialAlert = alertLevel; initialThreat = threatLevel; initialFear = fearLevel; initialFriendliness = friendlinessLevel; initialHumor = humorLevel; if (this.transform.Find("Chatter") != null) { speech = this.transform.Find("Chatter").GetComponent <Chatter>(); } numOfFriends = friends.Length; friendAI = new CyclopsAI[numOfFriends]; for (int i = 0; i < numOfFriends; i++) { friendAI[i] = friends[i].GetComponent <CyclopsAI>(); } contacted = false; conversationStarted = false; waypointIndex = Random.Range(0, waypoints.Length - 1); targetLastKnownLocation = target.position; //alertMultiplier = 10; timeStartAttack = -100; lookTimerStart = 0; lookTimer = Random.Range(lookTimerMin, lookTimerMax) + lookTimerAnimationDelay; hitTed = false; animResumeSpeed = 0; behavior = State.Idle; gotPinched = false; //agent.autoRepath = true; }
// 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; }
// Start is called before the first frame update void Start() { agent = this.GetComponent <NavMeshAgent>(); rigid = this.GetComponent <Rigidbody>(); anim = this.GetComponent <Animator>(); ted = FindObjectOfType <Teddy>(); tedBody = FindObjectOfType <BodyCam>(); //sight = viewFinder.GetComponent<viewCylinder>(); badge = GetComponentInChildren <ID>(); camControl = FindObjectOfType <CameraMaster>(); initialMotivation = motivationLevel; initialCuriosity = curiosityLevel; initialAlert = alertLevel; initialThreat = threatLevel; initialFear = fearLevel; initialFriendliness = friendlinessLevel; initialHumor = humorLevel; if (this.transform.Find("Chatter") != null) { speech = this.transform.Find("Chatter").GetComponent <Chatter>(); } contacted = false; conversationStarted = false; waypointIndex = Random.Range(0, waypoints.Length - 1); targetLastKnownLocation = target.position; //alertMultiplier = 10; timeStartAttack = -100; lookTimerStart = 0; lookTimer = Random.Range(lookTimerMin, lookTimerMax) + lookTimerAnimationDelay; isLooking = false; hitTed = false; animResumeSpeed = 0; refFakeTedFadeTime = Time.time; DeactivateFakeTed(); behavior = State.Idle; }
// Use this for initialization void Start() { ted = FindObjectOfType <Teddy>(); tedHead = FindObjectOfType <TeddyHead>(); //dave = FindObjectOfType<Dave>(); camMaster = FindObjectOfType <CameraMaster>(); cam = GameObject.Find("RightEyeCam"); bCam = FindObjectOfType <BodyCam>(); bCamCamera = FindObjectOfType <BodyCam>().GetComponent <Camera>(); leftEye = FindObjectOfType <TeddyLeftEye>(); scanner = FindObjectOfType <InfoScan>(); scanText = scanner.GetComponent <Text>(); rigid = this.GetComponent <Rigidbody>(); coll = this.GetComponent <Collider>(); commsControl = FindObjectOfType <CommsController>(); toolSelect = FindObjectOfType <ToolSelector>(); rightEyeActive = false; // Right eye starts inactive rightEyeLock = false; // Right eye starts locked (really??) tedTrack = false; //rigid.velocity = Vector3.zero; //rigid.angularVelocity = Vector3.zero; sixDOF = false; // Non-6dof on start rightLight.enabled = false; // Eye light off on start lockIndicator.enabled = true; sixDOFIndicator.enabled = true; scanStart = 0; storedSpeed = rightEyeSpeed; scanObject = null; previousTargetedID = null; hostID = ted.transform.GetComponent <IDCharacter>(); targetedGhost = null; targetedSpeech = null; targetedAI = null; targetedAudio = null; targetInfoCleared = false; scanFrom = 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() { bc = FindObjectOfType <BodyCam>(); audioFX = this.GetComponent <AudioSource>(); camControl = FindObjectOfType <CameraMaster>(); laserNumberTotal = laser.Length; origin = new Vector3[laserNumberTotal]; endpoint = new Vector3[laserNumberTotal]; laserLengthRef = new Vector3[laserNumberTotal]; laserDir = new Vector3[laserNumberTotal]; laserLength = new float[laserNumberTotal]; textColor = new string[laserNumberTotal]; resultBgd.enabled = false; result.enabled = false; for (int i = 0; i < laserNumberTotal; i++) { origin[i] = Vector3.zero; endpoint[i] = Vector3.zero; laserLength[i] = 0; } foreach (GameObject las in laser) { las.GetComponent <MeshRenderer>().enabled = false; las.transform.parent = null; } //textColor[0] = "07FFFAFF"; //textColor[1] = "FFC21CFF"; //textColor[2] = "FF05D5FF"; //textColor[3] = "0905FFFF"; laserNumber = 0; laserPending = false; tool = ToolChoice.None; laserState = Traj.Limbo; }
// 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() { scan = this.GetComponent <Text>(); bCam = FindObjectOfType <BodyCam>(); camMaster = FindObjectOfType <CameraMaster>(); panels = bgdPanels.GetComponent <Panels>(); //for (int i = 0; i < bbRend.Length; i++) { // bbRend[i] = this.transform.Find("TargetInfoBox").Find("Bounding Box Lines").GetChild(i).GetComponent<LineRenderer>(); //} scan.supportRichText = true; infoMsg.supportRichText = true; creditChitTxt.supportRichText = true; notepadPickupTxt.supportRichText = true; targetingReticle.enabled = false; scan.color = DisplayModeColor; scan.enabled = false; displayText = displayModeText; //idleText = "Scanning..."; moneyPanelIsExpanding = false; moneyPanelIsShrinking = false; moneyPanelSize = creditChitBgd.rectTransform.sizeDelta; moneyPanelTextSize = creditChitTxt.rectTransform.sizeDelta; creditChitBgd.rectTransform.sizeDelta = moneyPanelSize * 0.1f; creditChitTxt.rectTransform.sizeDelta = moneyPanelTextSize * 0.1f; showBoundBoxOfCurrentID = false; boundingBoxLineStretchTimerRef = 0; onTarget = false; }
// 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; }
// Start is called before the first frame update void Awake() { footstepAudio = this.GetComponent <AudioSource>(); view = FindObjectOfType <BodyCam>(); }
// 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; }