// Token: 0x06001A1D RID: 6685 RVA: 0x000FF260 File Offset: 0x000FD460 public static void WriteToGlobals(TaskSaveData data) { foreach (int photoID in data.kittenPhoto) { TaskGlobals.SetKittenPhoto(photoID, true); } foreach (int photoID2 in data.guitarPhoto) { TaskGlobals.SetGuitarPhoto(photoID2, true); } foreach (KeyValuePair <int, int> keyValuePair in data.taskStatus) { TaskGlobals.SetTaskStatus(keyValuePair.Key, keyValuePair.Value); } }
private void Update() { bool selfie = this.Yandere.Selfie; if (this.Snapping) { if (this.Yandere.Noticed) { this.Yandere.Shutter.ResumeGameplay(); this.Yandere.StopAiming(); } else if (this.Close) { this.currentPercent += 60f * Time.unscaledDeltaTime; while (this.currentPercent >= 1f) { this.Frame = Mathf.Min(this.Frame + 1, 8); this.currentPercent -= 1f; } this.Sprite.spriteName = "Shutter" + this.Frame.ToString(); if (this.Frame == 8) { this.StudentManager.GhostChan.gameObject.SetActive(true); this.PhotoDescription.SetActive(false); this.PhotoDescLabel.text = ""; this.StudentManager.GhostChan.Look(); this.CheckPhoto(); if (this.PhotoDescLabel.text == "") { this.PhotoDescLabel.text = "Cannot determine subject of photo. Try again."; } this.PhotoDescription.SetActive(true); this.SmartphoneCamera.targetTexture = null; this.Yandere.PhonePromptBar.Show = false; this.NotificationManager.SetActive(false); this.HeartbeatCamera.SetActive(false); this.Yandere.SelfieGuide.SetActive(false); this.MainCamera.enabled = false; this.PhotoIcons.SetActive(true); this.SubPanel.SetActive(false); this.Panel.SetActive(false); this.Close = false; this.PromptBar.ClearButtons(); this.PromptBar.Label[0].text = "Save"; this.PromptBar.Label[1].text = "Delete"; if (!this.Yandere.RivalPhone) { this.PromptBar.Label[2].text = "Send"; } else if (this.PantiesX.activeInHierarchy) { this.PromptBar.Label[0].text = ""; } this.PromptBar.UpdateButtons(); this.PromptBar.Show = true; Time.timeScale = 0.0001f; } } else { this.currentPercent += 60f * Time.unscaledDeltaTime; while (this.currentPercent >= 1f) { this.Frame = Mathf.Max(this.Frame - 1, 1); this.currentPercent -= 1f; } this.Sprite.spriteName = "Shutter" + this.Frame.ToString(); if (this.Frame == 1) { this.Sprite.color = new Color(this.Sprite.color.r, this.Sprite.color.g, this.Sprite.color.b, 0f); this.Snapping = false; } } } else if (this.Yandere.Aiming) { this.TargetStudent = 0; this.Timer += Time.deltaTime; if (this.Timer > 0.5f) { Vector3 direction; if (!this.Yandere.Selfie) { direction = this.SmartphoneCamera.transform.TransformDirection(Vector3.forward); } else { direction = this.SelfieRayParent.TransformDirection(Vector3.forward); } if (Physics.Raycast(this.SmartphoneCamera.transform.position, direction, out this.hit, float.PositiveInfinity, this.OnlyPhotography)) { if (this.hit.collider.gameObject.name == "Face") { GameObject gameObject = this.hit.collider.gameObject.transform.root.gameObject; this.FaceStudent = gameObject.GetComponent <StudentScript>(); if (this.FaceStudent != null) { this.TargetStudent = this.FaceStudent.StudentID; if (this.TargetStudent > 1) { this.ReactionDistance = 1.66666f; } else { this.ReactionDistance = this.FaceStudent.VisionDistance; } bool enabled = this.FaceStudent.ShoeRemoval.enabled; if (!this.FaceStudent.Alarmed && !this.FaceStudent.Dying && !this.FaceStudent.Distracted && !this.FaceStudent.InEvent && !this.FaceStudent.Wet && this.FaceStudent.Schoolwear > 0 && !this.FaceStudent.Fleeing && !this.FaceStudent.Following && !enabled && !this.FaceStudent.HoldingHands && this.FaceStudent.Actions[this.FaceStudent.Phase] != StudentActionType.Mourn && !this.FaceStudent.Guarding && !this.FaceStudent.Confessing && !this.FaceStudent.DiscCheck && !this.FaceStudent.TurnOffRadio && !this.FaceStudent.Investigating && !this.FaceStudent.Distracting && !this.FaceStudent.WitnessedLimb && !this.FaceStudent.WitnessedWeapon && !this.FaceStudent.WitnessedBloodPool && !this.FaceStudent.WitnessedBloodyWeapon && Vector3.Distance(this.Yandere.transform.position, gameObject.transform.position) < this.ReactionDistance && this.FaceStudent.CanSeeObject(this.Yandere.gameObject, this.Yandere.transform.position + Vector3.up)) { if (this.MissionMode) { this.PenaltyTimer += Time.deltaTime; if (this.PenaltyTimer > 1f) { this.FaceStudent.Reputation.PendingRep -= -10f; this.PenaltyTimer = 0f; } } if (!this.FaceStudent.CameraReacting) { if (this.FaceStudent.enabled && !this.FaceStudent.Stop) { if ((this.FaceStudent.DistanceToDestination < 5f && this.FaceStudent.Actions[this.FaceStudent.Phase] == StudentActionType.Graffiti) || (this.FaceStudent.DistanceToDestination < 5f && this.FaceStudent.Actions[this.FaceStudent.Phase] == StudentActionType.Bully)) { this.FaceStudent.PhotoPatience = 0f; this.FaceStudent.KilledMood = true; this.FaceStudent.Ignoring = true; this.PenaltyTimer = 1f; this.Penalize(); } else if (this.FaceStudent.PhotoPatience > 0f) { if (this.FaceStudent.StudentID > 1) { if ((this.Yandere.Bloodiness > 0f && !this.Yandere.Paint) || (double)this.Yandere.Sanity < 33.33333) { this.FaceStudent.Alarm += 200f; } else { this.FaceStudent.CameraReact(); } } else { this.FaceStudent.Alarm += Time.deltaTime * (100f / this.FaceStudent.DistanceToPlayer) * this.FaceStudent.Paranoia * this.FaceStudent.Perception * this.FaceStudent.DistanceToPlayer * 2f; this.FaceStudent.YandereVisible = true; } } else { this.Penalize(); } } } else { this.FaceStudent.PhotoPatience = Mathf.MoveTowards(this.FaceStudent.PhotoPatience, 0f, Time.deltaTime); if (this.FaceStudent.PhotoPatience > 0f) { this.FaceStudent.CameraPoseTimer = 1f; if (this.MissionMode) { this.FaceStudent.PhotoPatience = 0f; } } } } } } else if (this.hit.collider.gameObject.name == "Panties" || this.hit.collider.gameObject.name == "Skirt") { GameObject gameObject2 = this.hit.collider.gameObject.transform.root.gameObject; if (Physics.Raycast(this.SmartphoneCamera.transform.position, direction, out this.hit, float.PositiveInfinity, this.OnlyCharacters)) { if (Vector3.Distance(this.Yandere.transform.position, gameObject2.transform.position) < 5f) { if (this.hit.collider.gameObject == gameObject2) { if (!this.Yandere.Lewd) { this.Yandere.NotificationManager.DisplayNotification(NotificationType.Lewd); } this.Yandere.Lewd = true; } else { this.Yandere.Lewd = false; } } else { this.Yandere.Lewd = false; } } } else { this.Yandere.Lewd = false; } } else { this.Yandere.Lewd = false; } } } else { this.Timer = 0f; } if (this.TookPhoto) { this.ResumeGameplay(); } if (!this.DisplayError) { if (this.PhotoIcons.activeInHierarchy && !this.Snapping && !this.TextMessages.gameObject.activeInHierarchy) { if (Input.GetButtonDown("A")) { if (!this.Yandere.RivalPhone) { bool flag = !this.BullyX.activeInHierarchy; bool flag2 = !this.SenpaiX.activeInHierarchy; this.PromptBar.transform.localPosition = new Vector3(this.PromptBar.transform.localPosition.x, -627f, this.PromptBar.transform.localPosition.z); this.PromptBar.ClearButtons(); this.PromptBar.Show = false; this.PhotoIcons.SetActive(false); this.ID = 0; this.FreeSpace = false; while (this.ID < 26) { this.ID++; if (!PlayerGlobals.GetPhoto(this.ID)) { this.FreeSpace = true; this.Slot = this.ID; this.ID = 26; } } if (this.FreeSpace) { ScreenCapture.CaptureScreenshot(Application.streamingAssetsPath + "/Photographs/Photo_" + this.Slot.ToString() + ".png"); this.TookPhoto = true; Debug.Log("Setting Photo " + this.Slot + " to ''true''."); PlayerGlobals.SetPhoto(this.Slot, true); if (flag) { Debug.Log("Saving a bully photo!"); int studentID = this.BullyPhotoCollider.transform.parent.gameObject.GetComponent <StudentScript>().StudentID; if (this.StudentManager.Students[studentID].Club != ClubType.Bully) { PlayerGlobals.SetBullyPhoto(this.Slot, studentID); } else { PlayerGlobals.SetBullyPhoto(this.Slot, this.StudentManager.Students[studentID].DistractionTarget.StudentID); } } if (flag2) { PlayerGlobals.SetSenpaiPhoto(this.Slot, true); } if (this.AirGuitarShot) { TaskGlobals.SetGuitarPhoto(this.Slot, true); this.TaskManager.UpdateTaskStatus(); } if (this.KittenShot) { TaskGlobals.SetKittenPhoto(this.Slot, true); this.TaskManager.UpdateTaskStatus(); } if (this.HorudaShot) { TaskGlobals.SetHorudaPhoto(this.Slot, true); this.TaskManager.UpdateTaskStatus(); } if (this.OsanaShot && SchemeGlobals.GetSchemeStage(4) == 6) { SchemeGlobals.SetSchemeStage(4, 7); this.Yandere.PauseScreen.Schemes.UpdateInstructions(); } } else { this.DisplayError = true; } } else if (!this.PantiesX.activeInHierarchy) { if (SchemeGlobals.GetSchemeStage(1) == 5) { SchemeGlobals.SetSchemeStage(1, 6); this.Schemes.UpdateInstructions(); } this.StudentManager.CommunalLocker.RivalPhone.LewdPhotos = true; this.ResumeGameplay(); } } if (!this.Yandere.RivalPhone && Input.GetButtonDown("X")) { this.Panel.SetActive(true); this.MainMenu.SetActive(false); this.PauseScreen.Show = true; this.PauseScreen.Panel.enabled = true; this.PromptBar.ClearButtons(); this.PromptBar.Label[1].text = "Exit"; if (this.PantiesX.activeInHierarchy) { this.PromptBar.Label[3].text = "Interests"; } else { this.PromptBar.Label[3].text = ""; } this.PromptBar.UpdateButtons(); if (!this.InfoX.activeInHierarchy) { this.PauseScreen.Sideways = true; StudentGlobals.SetStudentPhotographed(this.Student.StudentID, true); this.ID = 0; while (this.ID < this.Student.Outlines.Length) { this.Student.Outlines[this.ID].enabled = true; this.ID++; } this.StudentInfo.UpdateInfo(this.Student.StudentID); this.StudentInfo.gameObject.SetActive(true); } else if (!this.TextMessages.gameObject.activeInHierarchy) { this.PauseScreen.Sideways = false; this.TextMessages.gameObject.SetActive(true); this.SpawnMessage(); } } if (Input.GetButtonDown("B")) { this.ResumeGameplay(); return; } } else if (this.PhotoIcons.activeInHierarchy && Input.GetButtonDown("B")) { this.ResumeGameplay(); return; } } else { float t = Time.unscaledDeltaTime * 10f; this.ErrorWindow.transform.localScale = Vector3.Lerp(this.ErrorWindow.transform.localScale, new Vector3(1f, 1f, 1f), t); if (Input.GetButtonDown("A")) { this.ResumeGameplay(); } } }
// Token: 0x060018D8 RID: 6360 RVA: 0x000E5B8C File Offset: 0x000E3D8C private void UpdatePhotoSelection() { if (Input.GetButtonDown("A")) { if (!this.NamingBully) { UITexture uitexture = this.Photographs[this.CurrentIndex]; if (uitexture.mainTexture != this.NoPhoto) { this.ViewPhoto.mainTexture = uitexture.mainTexture; this.ViewPhoto.transform.position = uitexture.transform.position; this.ViewPhoto.transform.localScale = uitexture.transform.localScale; this.Destination.position = uitexture.transform.position; this.Viewing = true; if (!this.Corkboard) { for (int i = 1; i < 26; i++) { this.Hearts[i].gameObject.SetActive(false); } } this.CanAdjust = false; } this.UpdateButtonPrompts(); } else if (this.Photographs[this.CurrentIndex].mainTexture != this.NoPhoto && PlayerGlobals.GetBullyPhoto(this.CurrentIndex) > 0) { this.Yandere.Police.EndOfDay.FragileTarget = PlayerGlobals.GetBullyPhoto(this.CurrentIndex); this.Yandere.StudentManager.FragileOfferHelp.Continue(); this.PauseScreen.MainMenu.SetActive(true); this.Yandere.RPGCamera.enabled = true; base.gameObject.SetActive(false); this.PauseScreen.Show = false; this.PromptBar.Show = false; this.NamingBully = false; Time.timeScale = 1f; } } if (!this.NamingBully && Input.GetButtonDown("B")) { this.PromptBar.ClearButtons(); this.PromptBar.Label[0].text = "Accept"; this.PromptBar.Label[1].text = "Exit"; this.PromptBar.Label[4].text = "Choose"; this.PromptBar.Label[5].text = "Choose"; this.PromptBar.UpdateButtons(); this.PauseScreen.MainMenu.SetActive(true); this.PauseScreen.Sideways = false; this.PauseScreen.PressedB = true; base.gameObject.SetActive(false); this.UpdateButtonPrompts(); } if (Input.GetButtonDown("X")) { this.ViewPhoto.mainTexture = null; int currentIndex = this.CurrentIndex; if (this.Photographs[currentIndex].mainTexture != this.NoPhoto) { this.Photographs[currentIndex].mainTexture = this.NoPhoto; PlayerGlobals.SetPhoto(currentIndex, false); PlayerGlobals.SetSenpaiPhoto(currentIndex, false); TaskGlobals.SetGuitarPhoto(currentIndex, false); TaskGlobals.SetKittenPhoto(currentIndex, false); this.Hearts[currentIndex].gameObject.SetActive(false); this.TaskManager.UpdateTaskStatus(); } this.UpdateButtonPrompts(); } if (this.Corkboard) { if (Input.GetButtonDown("Y")) { this.CanAdjust = false; this.Cursor.gameObject.SetActive(true); this.Adjusting = true; this.UpdateButtonPrompts(); } } else if (Input.GetButtonDown("Y") && PlayerGlobals.GetSenpaiPhoto(this.CurrentIndex)) { int currentIndex2 = this.CurrentIndex; PlayerGlobals.SetSenpaiPhoto(currentIndex2, false); this.Hearts[currentIndex2].gameObject.SetActive(false); this.CanAdjust = false; this.Yandere.Sanity += 20f; this.UpdateButtonPrompts(); AudioSource.PlayClipAtPoint(this.Sighs[UnityEngine.Random.Range(0, this.Sighs.Length)], this.Yandere.Head.position); } if (this.InputManager.TappedRight) { this.Column = ((this.Column < 5) ? (this.Column + 1) : 1); } if (this.InputManager.TappedLeft) { this.Column = ((this.Column > 1) ? (this.Column - 1) : 5); } if (this.InputManager.TappedUp) { this.Row = ((this.Row > 1) ? (this.Row - 1) : 5); } if (this.InputManager.TappedDown) { this.Row = ((this.Row < 5) ? (this.Row + 1) : 1); } bool flag = this.InputManager.TappedRight || this.InputManager.TappedLeft; bool flag2 = this.InputManager.TappedUp || this.InputManager.TappedDown; if (flag || flag2) { this.Highlight.transform.localPosition = new Vector3(this.HighlightX, this.HighlightY, this.Highlight.transform.localPosition.z); this.UpdateButtonPrompts(); } this.ViewPhoto.transform.localScale = Vector3.Lerp(this.ViewPhoto.transform.localScale, new Vector3(1f, 1f, 1f), this.LerpSpeed); this.ViewPhoto.transform.position = Vector3.Lerp(this.ViewPhoto.transform.position, this.Destination.position, this.LerpSpeed); if (this.Corkboard) { this.Gallery.transform.localPosition = new Vector3(this.Gallery.transform.localPosition.x, Mathf.Lerp(this.Gallery.transform.localPosition.y, 0f, Time.deltaTime * 10f), this.Gallery.transform.localPosition.z); } }