// Token: 0x06000655 RID: 1621 RVA: 0x0005AF9C File Offset: 0x0005939C public IEnumerator GetPhotos() { Debug.Log("We were told to get photos."); if (!this.Corkboard) { for (int i = 1; i < 26; i++) { this.Hearts[i].gameObject.SetActive(false); } } for (int ID = 1; ID < 26; ID++) { if (PlayerGlobals.GetPhoto(ID)) { Debug.Log("Photo " + ID + " is ''true''."); string path = string.Concat(new object[] { "file:///", Application.streamingAssetsPath, "/Photographs/Photo_", ID, ".png" }); Debug.Log("Attempting to get " + path); WWW www = new WWW(path); yield return(www); if (www.error == null) { this.Photographs[ID].mainTexture = www.texture; if (!this.Corkboard && PlayerGlobals.GetSenpaiPhoto(ID)) { this.Hearts[ID].gameObject.SetActive(true); } } else { Debug.Log(string.Concat(new object[] { "Could not retrieve Photo ", ID, ". Maybe it was deleted from Streaming Assets? Setting Photo ", ID, " to ''false''." })); PlayerGlobals.SetPhoto(ID, false); } } } this.LoadingScreen.SetActive(false); if (!this.Corkboard) { this.PauseScreen.Sideways = true; } this.UpdateButtonPrompts(); base.enabled = true; base.gameObject.SetActive(true); yield break; }
// Token: 0x06001A08 RID: 6664 RVA: 0x000FDE1C File Offset: 0x000FC01C public static void WriteToGlobals(PlayerSaveData data) { PlayerGlobals.Alerts = data.alerts; PlayerGlobals.Enlightenment = data.enlightenment; PlayerGlobals.EnlightenmentBonus = data.enlightenmentBonus; PlayerGlobals.Headset = data.headset; PlayerGlobals.Kills = data.kills; PlayerGlobals.Numbness = data.numbness; PlayerGlobals.NumbnessBonus = data.numbnessBonus; PlayerGlobals.PantiesEquipped = data.pantiesEquipped; PlayerGlobals.PantyShots = data.pantyShots; Debug.Log("Is this being called anywhere?"); foreach (int photoID in data.photo) { PlayerGlobals.SetPhoto(photoID, true); } foreach (int photoID2 in data.photoOnCorkboard) { PlayerGlobals.SetPhotoOnCorkboard(photoID2, true); } foreach (KeyValuePair <int, Vector2> keyValuePair in data.photoPosition) { PlayerGlobals.SetPhotoPosition(keyValuePair.Key, keyValuePair.Value); } foreach (KeyValuePair <int, float> keyValuePair2 in data.photoRotation) { PlayerGlobals.SetPhotoRotation(keyValuePair2.Key, keyValuePair2.Value); } PlayerGlobals.Reputation = data.reputation; PlayerGlobals.Seduction = data.seduction; PlayerGlobals.SeductionBonus = data.seductionBonus; foreach (int photoID3 in data.senpaiPhoto) { PlayerGlobals.SetSenpaiPhoto(photoID3, true); } PlayerGlobals.SenpaiShots = data.senpaiShots; PlayerGlobals.SocialBonus = data.socialBonus; PlayerGlobals.SpeedBonus = data.speedBonus; PlayerGlobals.StealthBonus = data.stealthBonus; foreach (int studentID in data.studentFriend) { PlayerGlobals.SetStudentFriend(studentID, true); } foreach (string studentName in data.studentPantyShot) { PlayerGlobals.SetStudentPantyShot(studentName, true); } }
// Token: 0x0600079E RID: 1950 RVA: 0x0007429C File Offset: 0x0007269C private void Update() { if (this.Snapping) { if (this.Close) { this.currentPercent += 40f * 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.StudentManager.GhostChan.Look(); this.CheckPhoto(); this.SmartphoneCamera.targetTexture = null; this.Yandere.PhonePromptBar.Show = false; this.NotificationManager.SetActive(false); this.HeartbeatCamera.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"; } this.PromptBar.UpdateButtons(); this.PromptBar.Show = true; Time.timeScale = 0f; } } else { this.currentPercent += 40f * 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) { if (Physics.Raycast(this.SmartphoneCamera.transform.position, this.SmartphoneCamera.transform.TransformDirection(Vector3.forward), 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; } if (!this.FaceStudent.Alarmed && !this.FaceStudent.Distracted && !this.FaceStudent.InEvent && !this.FaceStudent.Wet && this.FaceStudent.Schoolwear > 0 && !this.FaceStudent.Fleeing && !this.FaceStudent.Following && !this.FaceStudent.ShoeRemoval.enabled && !this.FaceStudent.HoldingHands && this.FaceStudent.Actions[this.FaceStudent.Phase] != StudentActionType.Mourn && !this.FaceStudent.Guarding && 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.PhotoPatience > 0f) { if (this.FaceStudent.StudentID > 1) { if (this.Yandere.Bloodiness > 0f || (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; } } } } } 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, this.SmartphoneCamera.transform.TransformDirection(Vector3.forward), 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.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) { Application.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) { PlayerGlobals.SetSenpaiPhoto(this.Slot, true); } if (this.KittenShot) { TaskGlobals.SetKittenPhoto(this.Slot, true); this.TaskManager.UpdateTaskStatus(); } } else { this.DisplayError = true; } } else if (!this.PantiesX.activeInHierarchy) { this.StudentManager.CommunalLocker.RivalPhone.LewdPhotos = true; SchemeGlobals.SetSchemeStage(4, 3); this.Schemes.UpdateInstructions(); 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"; this.PromptBar.Label[3].text = "Interests"; 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(); } } else if (this.PhotoIcons.activeInHierarchy && Input.GetButtonDown("B")) { this.ResumeGameplay(); } } 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: 0x06000650 RID: 1616 RVA: 0x0005A1DC File Offset: 0x000585DC private void UpdatePhotoSelection() { if (Input.GetButtonDown("A")) { 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(); } if (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.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 (this.CanAdjust && Input.GetButtonDown("Y")) { int currentIndex2 = this.CurrentIndex; PlayerGlobals.SetSenpaiPhoto(currentIndex2, false); this.Hearts[currentIndex2].gameObject.SetActive(false); this.CanAdjust = false; this.Yandere.Sanity += 20f; this.UpdateButtonPrompts(); } if (this.InputManager.TappedRight) { this.Column = ((this.Column >= 5) ? 1 : (this.Column + 1)); } if (this.InputManager.TappedLeft) { this.Column = ((this.Column <= 1) ? 5 : (this.Column - 1)); } if (this.InputManager.TappedUp) { this.Row = ((this.Row <= 1) ? 5 : (this.Row - 1)); } if (this.InputManager.TappedDown) { this.Row = ((this.Row >= 5) ? 1 : (this.Row + 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); } }
// 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); } }