public static void Update() { if (BTAnimationPlayerManager.animationPlayerObject == null) { return; } if (BTDebugCamInputManager.IsKeyJustDown("ToggleAnimPlayer")) { ToggleAnimPlayer(); } if (BTAnimationPlayerManager.animationPlayerObject.activeInHierarchy) { if (BTDebugCamInputManager.IsKeyJustDown("ToggleAnimPlayerAnimation")) { PlayPauseAnimation(); } UpdateAnimUI(); } else { if (animationDict.Count != 0) { RestoreAnimationStates(); } } }
// Token: 0x06000679 RID: 1657 RVA: 0x0006BA40 File Offset: 0x00069C40 public void OnEelHit() { if (BTDebugCamInputManager.GetConfigHolder().hackConfig != null && BTDebugCamInputManager.GetConfigHolder().hackConfig.eelRoast_infiniteEels) { SanctuaryManager.pCurPetInstance.UpdateMeter(SanctuaryPetMeterType.HAPPINESS, this._PetHappiness); if (this._EelBlastColors != null && this._EelBlastColors.Length != 0 && this._EelBlastEffectObj != null) { int num = UnityEngine.Random.Range(0, this._EelBlastColors.Length); GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this._EelBlastEffectObj, this.mEelTransform.position, this._EelBlastEffectObj.transform.rotation); gameObject.transform.parent = this._PrtParent.transform; ParticleSystem.MainModule main = gameObject.GetComponent <ParticleSystem>().main; main.startColor = this._EelBlastColors[num]; if (this._EelHit3DScore != null) { Vector3 position = SanctuaryManager.pCurPetInstance.GetHeadPosition() + this._HappinessTextDragonOffset; GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this._EelHit3DScore.gameObject, position, this._EelHit3DScore.transform.rotation); TargetHit3DScore component = gameObject2.GetComponent <TargetHit3DScore>(); component.mDisplayScore = (int)this._PetHappiness; component.mDisplayText = this._PetHappinessText._Text; gameObject2.transform.parent = this._PrtParent.transform; } } } else { if (this.mIsDestroying) { return; } this._Active = false; this._RenderPath.gameObject.SetActive(false); this.mIsDestroying = true; SanctuaryManager.pCurPetInstance.UpdateMeter(SanctuaryPetMeterType.HAPPINESS, this._PetHappiness); if (this._EelBlastColors != null && this._EelBlastColors.Length != 0 && this._EelBlastEffectObj != null) { int num = UnityEngine.Random.Range(0, this._EelBlastColors.Length); GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this._EelBlastEffectObj, this.mEelTransform.position, this._EelBlastEffectObj.transform.rotation); gameObject.transform.parent = this._PrtParent.transform; ParticleSystem.MainModule main = gameObject.GetComponent <ParticleSystem>().main; main.startColor = this._EelBlastColors[num]; if (this._EelHit3DScore != null) { Vector3 position = SanctuaryManager.pCurPetInstance.GetHeadPosition() + this._HappinessTextDragonOffset; GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this._EelHit3DScore.gameObject, position, this._EelHit3DScore.transform.rotation); TargetHit3DScore component = gameObject2.GetComponent <TargetHit3DScore>(); component.mDisplayScore = (int)this._PetHappiness; component.mDisplayText = this._PetHappinessText._Text; gameObject2.transform.parent = this._PrtParent.transform; } } if (base.gameObject != null) { UnityEngine.Object.Destroy(base.gameObject, this._DestroyDelay); } } }
/* Access to UI Content * ============================================================================*/ /*============================================================================ * Access from Keybinds */ private void LateUpdate() { if (cutscenePlayerObject == null) { return; } UpdateAvailableCutscenes(); UpdateProgressUI(); if (BTDebugCamInputManager.IsKeyJustDown("ToggleCutscenePlayer")) { ToggleWindowVisibility(); } if (BTDebugCamInputManager.IsKeyJustDown("ToggleCutscenePlayerAnimation")) { TogglePlayCutscene(); } if ((cutscenePlayerObject.activeInHierarchy && unloockCameraMovementToggle.isOn) || (currentCutsceneObject != null && cameraOverrideCam != null)) { if (cameraOverrideCam == null) { previousCameraBeforeOverride = Camera.main; previousUICamera = Camera.current; previousCameraBeforeOverride.enabled = false; previousUICamera.enabled = false; cameraOverrideCam = this.gameObject.AddComponent <Camera>(); cameraOverrideCam.cullingMask = previousCameraBeforeOverride.cullingMask; BTDebugCam.SetMainCamera(cameraOverrideCam); } foreach (Camera cam in UnityEngine.Object.FindObjectsOfType <Camera>()) { if (cam != cameraOverrideCam) { cam.enabled = false; } } } else { if (cameraOverrideCam != null) { BTDebugCam.RemoveMainCamera(cameraOverrideCam); UnityEngine.Object.Destroy(cameraOverrideCam); cameraOverrideCam = null; previousCameraBeforeOverride.enabled = true; previousCameraBeforeOverride = null; previousUICamera.enabled = true; previousUICamera = null; } } }
// Token: 0x06000683 RID: 1667 RVA: 0x0006BCEC File Offset: 0x00069EEC private void SpawnEels() { if (BTDebugCamInputManager.GetConfigHolder().hackConfig != null && BTDebugCamInputManager.GetConfigHolder().hackConfig.eelRoast_spawnAllEels) { foreach (EelRoastMarkerInfo markerInfo in this._EelRoastInfos) { string randomEelPath = this.GetRandomEelPath(markerInfo); if (!string.IsNullOrEmpty(randomEelPath)) { string[] array = randomEelPath.Split(new char[] { '/' }); RsResourceManager.LoadAssetFromBundle(array[0] + "/" + array[1], array[2], new RsResourceEventHandler(this.ResourceEventHandler), typeof(GameObject), false, markerInfo); } else { UtDebug.Log("Eel Asset path is empty "); } } } else { if (this._EelRoastInfos == null || this._EelRoastInfos.Length < 1 || this._NoOfEelsToSpawn.Min < 1f || this._NoOfEelsToSpawn.Min > this._NoOfEelsToSpawn.Max) { return; } List <EelRoastMarkerInfo> list = new List <EelRoastMarkerInfo>(this._EelRoastInfos); int num = Mathf.Clamp(this._NoOfEelsToSpawn.GetRandomInt(), 1, this._EelRoastInfos.Length); for (int i = 0; i < num; i++) { int index = UnityEngine.Random.Range(0, list.Count); string randomEelPath = this.GetRandomEelPath(list[index]); if (!string.IsNullOrEmpty(randomEelPath)) { string[] array = randomEelPath.Split(new char[] { '/' }); RsResourceManager.LoadAssetFromBundle(array[0] + "/" + array[1], array[2], new RsResourceEventHandler(this.ResourceEventHandler), typeof(GameObject), false, list[index]); } else { UtDebug.Log("Eel Asset path is empty "); } list.RemoveAt(index); } } }
private void LateUpdate() { if (BTDebugCamInputManager.IsKeyJustDown("ToggleConsole")) { showConsole = !showConsole; } foreach (KeyValuePair <string, List <string> > kvp in configHolder.config.commandBinds) { if (BTDebugCamInputManager.AreKeysJustDown(kvp.Value)) { this.OnCommandSubmitted(kvp.Key, false); } } }
public static void Update() { if (BTDebugCamInputManager.IsKeyJustDown("DisableWater")) { DisableWater(); } if (BTDebugCamInputManager.IsKeyJustDown("ToggleFog")) { ToggleFog(); } if (BTDebugCamInputManager.IsKeyJustDown("ToggleSkybox")) { ToggleSkybox(); } if (BTDebugCamInputManager.IsKeyJustDown("ToggleUIElements")) { ToggleUIElements(); } HandleCameraInput(FindMainCamera()); }
public static void HandleCameraInput(Camera camera) { if (configHolder == null) { return; } if (camera == null) { return; } if (BTDebugCamInputManager.IsKeyJustDown("ToggleOrthographicMode")) { ToggleOrthographic(camera); } if (BTDebugCamInputManager.IsKeyDown("DebugCamFovReset")) { ResetFOV(camera); } if (BTDebugCamInputManager.IsKeyJustDown("DebugCamToggle")) { ToggleDebugCam(camera); } if (useDebugCam) { if (BTDebugCamInputManager.IsKeyJustDown("DeleteLookedAtObject")) { DeleteLookedAtObject(camera); } Vector3 movementInput = new Vector3(0f, 0f, 0f); float movementSpeed; if (BTDebugCamInputManager.IsKeyDown("DebugCamFastMovement")) { movementSpeed = configHolder.config.cameraFastSpeed; } else { movementSpeed = configHolder.config.cameraSpeed; } float forwardInput = 0f; float rightInput = 0f; if (BTDebugCamInputManager.IsKeyDown("DebugCamForward")) { forwardInput += movementSpeed; } if (BTDebugCamInputManager.IsKeyDown("DebugCamBack")) { forwardInput -= movementSpeed; } if (BTDebugCamInputManager.IsKeyDown("DebugCamRight")) { rightInput += movementSpeed; } if (BTDebugCamInputManager.IsKeyDown("DebugCamLeft")) { rightInput -= movementSpeed; } if (forwardInput != 0f) { Vector3 forward = (camRotationY == 90f) ? camera.transform.up : ((camRotationY != -90f) ? camera.transform.forward : (-camera.transform.up)); forward.y = 0f; movementInput += Vector3.Normalize(forward) * forwardInput; } if (rightInput != 0f) { Vector3 right = camera.transform.right; right.y = 0f; movementInput += Vector3.Normalize(right) * rightInput; } if (BTDebugCamInputManager.IsKeyDown("DebugCamUp")) { movementInput.y += movementSpeed; } if (BTDebugCamInputManager.IsKeyDown("DebugCamDown")) { movementInput.y -= movementSpeed; } camera.transform.position += movementInput; //mouse input; camRotationX += KAInput.GetAxis("CameraRotationX") * 0.2f; camRotationX += KAInput.GetAxis("CameraRotationY") * 0.2f; if (KAInput.GetMouseButton(1)) { camRotationX += (Input.mousePosition.x - mMousePrev.x) * 0.2f; camRotationY -= (Input.mousePosition.y - mMousePrev.y) * 0.2f; } if (camRotationX > 180f) { camRotationX -= 360f; } else if (camRotationX < -180f) { camRotationX += 360f; } if (camRotationY > 90f) { camRotationY = 90f; } else if (camRotationY < -90f) { camRotationY = -90f; } Quaternion rotation = Quaternion.Euler(camRotationY, camRotationX, 0f); camera.transform.rotation = rotation; mMousePrev = Input.mousePosition; float scrollInput = Input.mouseScrollDelta.y; if (camera.orthographic) { SetOrthographicSize(camera, camera.orthographicSize - (2f * scrollInput)); } else { SetFOV(camera, camera.fieldOfView - scrollInput); } } }