// 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: 0x060018D9 RID: 6361 RVA: 0x000E6150 File Offset: 0x000E4350 private void UpdatePhotoViewing() { this.ViewPhoto.transform.localScale = Vector3.Lerp(this.ViewPhoto.transform.localScale, this.Corkboard ? new Vector3(5.8f, 5.8f, 5.8f) : new Vector3(6.5f, 6.5f, 6.5f), this.LerpSpeed); this.ViewPhoto.transform.localPosition = Vector3.Lerp(this.ViewPhoto.transform.localPosition, Vector3.zero, this.LerpSpeed); if (this.Corkboard && Input.GetButtonDown("A")) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.Photograph, base.transform.position, Quaternion.identity); gameObject.transform.parent = this.CorkboardPanel; gameObject.transform.localEulerAngles = Vector3.zero; gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localScale = new Vector3(1f, 1f, 1f); gameObject.GetComponent <UITexture>().mainTexture = this.Photographs[this.CurrentIndex].mainTexture; this.MovingPhotograph = gameObject; this.CanAdjust = false; this.Adjusting = true; this.Viewing = false; this.Moving = true; this.CorkboardPhotographs[this.Photos] = gameObject.GetComponent <HomeCorkboardPhotoScript>(); this.CorkboardPhotographs[this.Photos].ID = this.CurrentIndex; this.CorkboardPhotographs[this.Photos].ArrayID = this.Photos; this.Photos++; this.UpdateButtonPrompts(); } if (Input.GetButtonDown("B")) { this.Viewing = false; if (this.Corkboard) { this.Cursor.Highlight.transform.position = new Vector3(this.Cursor.Highlight.transform.position.x, 100f, this.Cursor.Highlight.transform.position.z); this.CanAdjust = true; } else { for (int i = 1; i < 26; i++) { if (PlayerGlobals.GetSenpaiPhoto(i)) { this.Hearts[i].gameObject.SetActive(true); this.CanAdjust = true; } } } this.UpdateButtonPrompts(); } }
// Token: 0x06000656 RID: 1622 RVA: 0x0005AFB8 File Offset: 0x000593B8 public void UpdateButtonPrompts() { if (this.Moving) { this.PromptBar.Label[0].text = "Place"; this.PromptBar.Label[1].text = string.Empty; this.PromptBar.Label[2].text = string.Empty; this.PromptBar.Label[4].text = "Move"; this.PromptBar.Label[5].text = "Move"; } else if (this.Adjusting) { if (this.Cursor.Photograph != null) { this.PromptBar.Label[0].text = "Adjust"; this.PromptBar.Label[2].text = "Remove"; } else { this.PromptBar.Label[0].text = string.Empty; this.PromptBar.Label[2].text = string.Empty; } this.PromptBar.Label[1].text = "Back"; this.PromptBar.Label[3].text = string.Empty; this.PromptBar.Label[4].text = "Move"; this.PromptBar.Label[5].text = "Move"; } else if (!this.Viewing) { int currentIndex = this.CurrentIndex; if (this.Photographs[currentIndex].mainTexture != this.NoPhoto) { this.PromptBar.Label[0].text = "View"; this.PromptBar.Label[2].text = "Delete"; } else { this.PromptBar.Label[0].text = string.Empty; this.PromptBar.Label[2].text = string.Empty; } if (!this.Corkboard) { this.PromptBar.Label[3].text = ((!PlayerGlobals.GetSenpaiPhoto(currentIndex)) ? string.Empty : "Use"); } else { this.PromptBar.Label[3].text = "Corkboard"; } this.PromptBar.Label[1].text = "Back"; this.PromptBar.Label[4].text = "Choose"; this.PromptBar.Label[5].text = "Choose"; } else { if (this.Corkboard) { this.PromptBar.Label[0].text = "Place"; } else { this.PromptBar.Label[0].text = string.Empty; } this.PromptBar.Label[2].text = string.Empty; this.PromptBar.Label[3].text = string.Empty; this.PromptBar.Label[4].text = string.Empty; this.PromptBar.Label[5].text = string.Empty; } this.PromptBar.UpdateButtons(); this.PromptBar.Show = true; }
// Token: 0x06001A07 RID: 6663 RVA: 0x000FDC0C File Offset: 0x000FBE0C public static PlayerSaveData ReadFromGlobals() { PlayerSaveData playerSaveData = new PlayerSaveData(); playerSaveData.alerts = PlayerGlobals.Alerts; playerSaveData.enlightenment = PlayerGlobals.Enlightenment; playerSaveData.enlightenmentBonus = PlayerGlobals.EnlightenmentBonus; playerSaveData.headset = PlayerGlobals.Headset; playerSaveData.kills = PlayerGlobals.Kills; playerSaveData.numbness = PlayerGlobals.Numbness; playerSaveData.numbnessBonus = PlayerGlobals.NumbnessBonus; playerSaveData.pantiesEquipped = PlayerGlobals.PantiesEquipped; playerSaveData.pantyShots = PlayerGlobals.PantyShots; foreach (int num in PlayerGlobals.KeysOfPhoto()) { if (PlayerGlobals.GetPhoto(num)) { playerSaveData.photo.Add(num); } } foreach (int num2 in PlayerGlobals.KeysOfPhotoOnCorkboard()) { if (PlayerGlobals.GetPhotoOnCorkboard(num2)) { playerSaveData.photoOnCorkboard.Add(num2); } } foreach (int num3 in PlayerGlobals.KeysOfPhotoPosition()) { playerSaveData.photoPosition.Add(num3, PlayerGlobals.GetPhotoPosition(num3)); } foreach (int num4 in PlayerGlobals.KeysOfPhotoRotation()) { playerSaveData.photoRotation.Add(num4, PlayerGlobals.GetPhotoRotation(num4)); } playerSaveData.reputation = PlayerGlobals.Reputation; playerSaveData.seduction = PlayerGlobals.Seduction; playerSaveData.seductionBonus = PlayerGlobals.SeductionBonus; foreach (int num5 in PlayerGlobals.KeysOfSenpaiPhoto()) { if (PlayerGlobals.GetSenpaiPhoto(num5)) { playerSaveData.senpaiPhoto.Add(num5); } } playerSaveData.senpaiShots = PlayerGlobals.SenpaiShots; playerSaveData.socialBonus = PlayerGlobals.SocialBonus; playerSaveData.speedBonus = PlayerGlobals.SpeedBonus; playerSaveData.stealthBonus = PlayerGlobals.StealthBonus; foreach (int num6 in PlayerGlobals.KeysOfStudentFriend()) { if (PlayerGlobals.GetStudentFriend(num6)) { playerSaveData.studentFriend.Add(num6); } } foreach (string text in PlayerGlobals.KeysOfStudentPantyShot()) { if (PlayerGlobals.GetStudentPantyShot(text)) { playerSaveData.studentPantyShot.Add(text); } } return(playerSaveData); }
// Token: 0x060018DF RID: 6367 RVA: 0x000E7018 File Offset: 0x000E5218 public void UpdateButtonPrompts() { if (this.NamingBully) { if (this.Photographs[this.CurrentIndex].mainTexture != this.NoPhoto && PlayerGlobals.GetBullyPhoto(this.CurrentIndex) > 0) { if (PlayerGlobals.GetBullyPhoto(this.CurrentIndex) > 0) { this.PromptBar.Label[0].text = "Name Bully"; } else { this.PromptBar.Label[0].text = string.Empty; } } else { this.PromptBar.Label[0].text = string.Empty; } this.PromptBar.Label[1].text = string.Empty; this.PromptBar.Label[2].text = string.Empty; this.PromptBar.Label[3].text = string.Empty; this.PromptBar.Label[4].text = "Move"; this.PromptBar.Label[5].text = "Move"; } else if (this.Moving || this.MovingString) { this.PromptBar.Label[0].text = "Place"; this.PromptBar.Label[1].text = string.Empty; this.PromptBar.Label[2].text = string.Empty; this.PromptBar.Label[3].text = string.Empty; this.PromptBar.Label[4].text = "Move"; this.PromptBar.Label[5].text = "Move"; if (!this.MovingString) { this.PromptBar.Label[2].text = "Resize"; this.PromptBar.Label[3].text = "Resize"; } } else if (this.Adjusting) { if (this.Cursor.Photograph != null) { this.PromptBar.Label[0].text = "Adjust"; this.PromptBar.Label[1].text = string.Empty; this.PromptBar.Label[2].text = "Remove"; this.PromptBar.Label[3].text = string.Empty; } else if (this.Cursor.Tack != null) { this.PromptBar.Label[2].text = "Remove"; } else { this.PromptBar.Label[0].text = string.Empty; this.PromptBar.Label[2].text = string.Empty; } this.PromptBar.Label[1].text = "Back"; this.PromptBar.Label[3].text = "Place Pin"; this.PromptBar.Label[4].text = "Move"; this.PromptBar.Label[5].text = "Move"; } else if (!this.Viewing) { int currentIndex = this.CurrentIndex; if (this.Photographs[currentIndex].mainTexture != this.NoPhoto) { this.PromptBar.Label[0].text = "View"; this.PromptBar.Label[2].text = "Delete"; } else { this.PromptBar.Label[0].text = string.Empty; this.PromptBar.Label[2].text = string.Empty; } if (!this.Corkboard) { this.PromptBar.Label[3].text = (PlayerGlobals.GetSenpaiPhoto(currentIndex) ? "Use" : string.Empty); } else { this.PromptBar.Label[3].text = "Corkboard"; } this.PromptBar.Label[1].text = "Back"; this.PromptBar.Label[4].text = "Choose"; this.PromptBar.Label[5].text = "Choose"; } else { if (this.Corkboard) { this.PromptBar.Label[0].text = "Place"; } else { this.PromptBar.Label[0].text = string.Empty; } this.PromptBar.Label[2].text = string.Empty; this.PromptBar.Label[3].text = string.Empty; this.PromptBar.Label[4].text = string.Empty; this.PromptBar.Label[5].text = string.Empty; } this.PromptBar.UpdateButtons(); this.PromptBar.Show = true; }
// 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); } }