// Token: 0x060019F6 RID: 6646 RVA: 0x000FD688 File Offset: 0x000FB888 public static void WriteToGlobals(DatingSaveData data) { DatingGlobals.Affection = data.affection; DatingGlobals.AffectionLevel = data.affectionLevel; foreach (int complimentID in data.complimentGiven) { DatingGlobals.SetComplimentGiven(complimentID, true); } foreach (int checkID in data.suitorCheck) { DatingGlobals.SetSuitorCheck(checkID, true); } DatingGlobals.SuitorProgress = data.suitorProgress; foreach (KeyValuePair <int, int> keyValuePair in data.suitorTrait) { DatingGlobals.SetSuitorTrait(keyValuePair.Key, keyValuePair.Value); } foreach (int topicID in data.topicDiscussed) { DatingGlobals.SetTopicDiscussed(topicID, true); } foreach (KeyValuePair <int, int> keyValuePair2 in data.traitDemonstrated) { DatingGlobals.SetTraitDemonstrated(keyValuePair2.Key, keyValuePair2.Value); } }
// Token: 0x060012FB RID: 4859 RVA: 0x00099400 File Offset: 0x00097600 private void Update() { if (this.Testing) { this.Prompt.enabled = true; } else if (this.LoveManager.RivalWaiting) { if (this.Rival == null) { this.Suitor = this.StudentManager.Students[this.LoveManager.SuitorID]; this.Rival = this.StudentManager.Students[this.LoveManager.RivalID]; } if (this.Rival.MeetTimer > 0f && this.Suitor.MeetTimer > 0f) { this.Prompt.enabled = true; } } else if (this.Prompt.enabled) { this.Prompt.Hide(); this.Prompt.enabled = false; } if (this.Prompt.Circle[0].fillAmount == 0f) { this.Prompt.Circle[0].fillAmount = 1f; if (!this.Yandere.Chased && this.Yandere.Chasers == 0 && !this.Rival.Hunted) { this.Suitor.CharacterAnimation.cullingType = AnimationCullingType.AlwaysAnimate; this.Rival.CharacterAnimation.cullingType = AnimationCullingType.AlwaysAnimate; this.Suitor.CharacterAnimation.enabled = true; this.Rival.CharacterAnimation.enabled = true; this.Suitor.enabled = false; this.Rival.enabled = false; this.Rival.CharacterAnimation["f02_smile_00"].layer = 1; this.Rival.CharacterAnimation.Play("f02_smile_00"); this.Rival.CharacterAnimation["f02_smile_00"].weight = 0f; this.StudentManager.Clock.StopTime = true; this.Yandere.RPGCamera.enabled = false; this.HeartbeatCamera.SetActive(false); this.Yandere.Headset.SetActive(true); this.Yandere.CanMove = false; this.Yandere.EmptyHands(); if (this.Yandere.YandereVision) { this.Yandere.ResetYandereEffects(); this.Yandere.YandereVision = false; } this.Yandere.transform.position = this.PeekSpot.position; this.Yandere.transform.eulerAngles = this.PeekSpot.eulerAngles; this.Yandere.CharacterAnimation.Play("f02_treePeeking_00"); this.MainCamera.transform.position = new Vector3(48f, 3f, -44f); this.MainCamera.transform.eulerAngles = new Vector3(15f, 90f, 0f); this.WisdomLabel.text = "Wisdom: " + DatingGlobals.GetSuitorTrait(2).ToString(); this.GiftIcons[1].enabled = CollectibleGlobals.GetGiftPurchased(6); this.GiftIcons[2].enabled = CollectibleGlobals.GetGiftPurchased(7); this.GiftIcons[3].enabled = CollectibleGlobals.GetGiftPurchased(8); this.GiftIcons[4].enabled = CollectibleGlobals.GetGiftPurchased(9); this.Matchmaking = true; this.UpdateTopics(); Time.timeScale = 1f; } } if (this.Matchmaking) { if (this.CurrentAnim != string.Empty && this.Rival.CharacterAnimation[this.CurrentAnim].time >= this.Rival.CharacterAnimation[this.CurrentAnim].length) { this.Rival.CharacterAnimation.Play(this.Rival.IdleAnim); } if (this.Phase == 1) { this.Panel.alpha = Mathf.MoveTowards(this.Panel.alpha, 0f, Time.deltaTime); this.Timer += Time.deltaTime; this.MainCamera.transform.position = Vector3.Lerp(Camera.main.transform.position, new Vector3(54f, 1.25f, -45.25f), this.Timer * 0.02f); this.MainCamera.transform.eulerAngles = Vector3.Lerp(this.MainCamera.transform.eulerAngles, new Vector3(0f, 45f, 0f), this.Timer * 0.02f); if (this.Timer > 5f) { this.Suitor.CharacterAnimation.Play("insertEarpiece_00"); this.Suitor.CharacterAnimation["insertEarpiece_00"].time = 0f; this.Suitor.CharacterAnimation.Play("insertEarpiece_00"); this.Suitor.Earpiece.SetActive(true); this.MainCamera.transform.position = new Vector3(45.5f, 1.25f, -44.5f); this.MainCamera.transform.eulerAngles = new Vector3(0f, -45f, 0f); this.Rotation = -45f; this.Timer = 0f; this.Phase++; return; } } else if (this.Phase == 2) { this.Timer += Time.deltaTime; if (this.Timer > 4f) { this.Suitor.Earpiece.transform.parent = this.Suitor.Head; this.Suitor.Earpiece.transform.localPosition = new Vector3(0f, -1.12f, 1.14f); this.Suitor.Earpiece.transform.localEulerAngles = new Vector3(45f, -180f, 0f); this.MainCamera.transform.position = Vector3.Lerp(this.MainCamera.transform.position, new Vector3(45.11f, 1.375f, -44f), (this.Timer - 4f) * 0.02f); this.Rotation = Mathf.Lerp(this.Rotation, 90f, (this.Timer - 4f) * 0.02f); this.MainCamera.transform.eulerAngles = new Vector3(this.MainCamera.transform.eulerAngles.x, this.Rotation, this.MainCamera.transform.eulerAngles.z); if (this.Rotation > 89.9f) { this.Rival.CharacterAnimation["f02_turnAround_00"].time = 0f; this.Rival.CharacterAnimation.CrossFade("f02_turnAround_00"); this.AffectionBar.localScale = new Vector3(this.Affection / 100f, this.AffectionBar.localScale.y, this.AffectionBar.localScale.z); this.DialogueLabel.text = this.Greetings[this.AffectionLevel]; this.CalculateMultiplier(); this.DatingSimHUD.gameObject.SetActive(true); this.Timer = 0f; this.Phase++; return; } } } else if (this.Phase == 3) { this.DatingSimHUD.alpha = Mathf.MoveTowards(this.DatingSimHUD.alpha, 1f, Time.deltaTime); if (this.Rival.CharacterAnimation["f02_turnAround_00"].time >= this.Rival.CharacterAnimation["f02_turnAround_00"].length) { this.Rival.transform.eulerAngles = new Vector3(this.Rival.transform.eulerAngles.x, -90f, this.Rival.transform.eulerAngles.z); this.Rival.CharacterAnimation.Play("f02_turnAround_00"); this.Rival.CharacterAnimation["f02_turnAround_00"].time = 0f; this.Rival.CharacterAnimation["f02_turnAround_00"].speed = 0f; this.Rival.CharacterAnimation.Play("f02_turnAround_00"); this.Rival.CharacterAnimation.CrossFade(this.Rival.IdleAnim); Time.timeScale = 1f; this.PromptBar.ClearButtons(); this.PromptBar.Label[0].text = "Confirm"; this.PromptBar.Label[1].text = "Back"; this.PromptBar.Label[4].text = "Select"; this.PromptBar.UpdateButtons(); this.PromptBar.Show = true; this.Phase++; return; } } else if (this.Phase == 4) { if (this.AffectionGrow) { this.Affection = Mathf.MoveTowards(this.Affection, 100f, Time.deltaTime * 10f); this.CalculateAffection(); } this.Rival.Cosmetic.MyRenderer.materials[2].SetFloat("_BlendAmount", this.Affection * 0.01f); this.Rival.CharacterAnimation["f02_smile_00"].weight = this.Affection * 0.01f; this.Highlight.localPosition = new Vector3(this.Highlight.localPosition.x, Mathf.Lerp(this.Highlight.localPosition.y, this.HighlightTarget, Time.deltaTime * 10f), this.Highlight.localPosition.z); for (int i = 1; i < this.Options.Length; i++) { Transform transform = this.Options[i]; transform.localPosition = new Vector3(Mathf.Lerp(transform.localPosition.x, (i == this.Selected) ? 750f : 800f, Time.deltaTime * 10f), transform.localPosition.y, transform.localPosition.z); } this.AffectionBar.localScale = new Vector3(Mathf.Lerp(this.AffectionBar.localScale.x, this.Affection / 100f, Time.deltaTime * 10f), this.AffectionBar.localScale.y, this.AffectionBar.localScale.z); if (!this.SelectingTopic && !this.Complimenting && !this.ShowingOff && !this.GivingGift) { this.Topics.localScale = Vector3.Lerp(this.Topics.localScale, Vector3.zero, Time.deltaTime * 10f); this.ComplimentSet.localScale = Vector3.Lerp(this.ComplimentSet.localScale, Vector3.zero, Time.deltaTime * 10f); this.ShowOff.localScale = Vector3.Lerp(this.ShowOff.localScale, Vector3.zero, Time.deltaTime * 10f); this.GiveGift.localScale = Vector3.Lerp(this.GiveGift.localScale, Vector3.zero, Time.deltaTime * 10f); if (this.InputManager.TappedUp) { this.Selected--; this.UpdateHighlight(); } if (this.InputManager.TappedDown) { this.Selected++; this.UpdateHighlight(); } if (Input.GetButtonDown("A") && this.Labels[this.Selected].color.a == 1f) { if (this.Selected == 1) { this.SelectingTopic = true; this.Negative = true; return; } if (this.Selected == 2) { this.SelectingTopic = true; this.Negative = false; return; } if (this.Selected == 3) { this.Complimenting = true; return; } if (this.Selected == 4) { this.ShowingOff = true; return; } if (this.Selected == 5) { this.GivingGift = true; return; } if (this.Selected == 6) { this.PromptBar.ClearButtons(); this.PromptBar.Label[0].text = "Confirm"; this.PromptBar.UpdateButtons(); this.CalculateAffection(); this.DialogueLabel.text = this.Farewells[this.AffectionLevel]; this.Phase++; return; } } } else if (this.SelectingTopic) { this.Topics.localScale = Vector3.Lerp(this.Topics.localScale, new Vector3(1f, 1f, 1f), Time.deltaTime * 10f); if (this.InputManager.TappedUp) { this.Row--; this.UpdateTopicHighlight(); } else if (this.InputManager.TappedDown) { this.Row++; this.UpdateTopicHighlight(); } if (this.InputManager.TappedLeft) { this.Column--; this.UpdateTopicHighlight(); } else if (this.InputManager.TappedRight) { this.Column++; this.UpdateTopicHighlight(); } if (Input.GetButtonDown("A") && this.TopicIcons[this.TopicSelected].color.a == 1f) { this.SelectingTopic = false; UISprite uisprite = this.TopicIcons[this.TopicSelected]; uisprite.color = new Color(uisprite.color.r, uisprite.color.g, uisprite.color.b, 0.5f); DatingGlobals.SetTopicDiscussed(this.TopicSelected, true); this.DetermineOpinion(); if (!ConversationGlobals.GetTopicLearnedByStudent(this.Opinion, this.LoveManager.RivalID)) { ConversationGlobals.SetTopicLearnedByStudent(this.Opinion, this.LoveManager.RivalID, true); } if (this.Negative) { UILabel uilabel = this.Labels[1]; uilabel.color = new Color(uilabel.color.r, uilabel.color.g, uilabel.color.b, 0.5f); if (this.Opinion == 2) { this.DialogueLabel.text = "Hey! Just so you know, I take offense to that..."; this.Rival.CharacterAnimation.CrossFade("f02_refuse_00"); this.CurrentAnim = "f02_refuse_00"; this.Affection -= 1f; this.CalculateAffection(); } else if (this.Opinion == 1) { this.DialogueLabel.text = this.Negatives[this.AffectionLevel]; this.Rival.CharacterAnimation.CrossFade("f02_lookdown_00"); this.CurrentAnim = "f02_lookdown_00"; this.Affection += (float)this.Multiplier; this.CalculateAffection(); } else if (this.Opinion == 0) { this.DialogueLabel.text = "Um...okay."; } } else { UILabel uilabel2 = this.Labels[2]; uilabel2.color = new Color(uilabel2.color.r, uilabel2.color.g, uilabel2.color.b, 0.5f); if (this.Opinion == 2) { this.DialogueLabel.text = this.Positives[this.AffectionLevel]; this.Rival.CharacterAnimation.CrossFade("f02_lookdown_00"); this.CurrentAnim = "f02_lookdown_00"; this.Affection += (float)this.Multiplier; this.CalculateAffection(); } else if (this.Opinion == 1) { this.DialogueLabel.text = "To be honest with you, I strongly disagree..."; this.Rival.CharacterAnimation.CrossFade("f02_refuse_00"); this.CurrentAnim = "f02_refuse_00"; this.Affection -= 1f; this.CalculateAffection(); } else if (this.Opinion == 0) { this.DialogueLabel.text = "Um...all right."; } } if (this.Affection > 100f) { this.Affection = 100f; } else if (this.Affection < 0f) { this.Affection = 0f; } } if (Input.GetButtonDown("B")) { this.SelectingTopic = false; return; } } else if (this.Complimenting) { this.ComplimentSet.localScale = Vector3.Lerp(this.ComplimentSet.localScale, new Vector3(1f, 1f, 1f), Time.deltaTime * 10f); if (this.InputManager.TappedUp) { this.Line--; this.UpdateComplimentHighlight(); } else if (this.InputManager.TappedDown) { this.Line++; this.UpdateComplimentHighlight(); } if (this.InputManager.TappedLeft) { this.Side--; this.UpdateComplimentHighlight(); } else if (this.InputManager.TappedRight) { this.Side++; this.UpdateComplimentHighlight(); } if (Input.GetButtonDown("A") && this.ComplimentLabels[this.ComplimentSelected].color.a == 1f) { UILabel uilabel3 = this.Labels[3]; uilabel3.color = new Color(uilabel3.color.r, uilabel3.color.g, uilabel3.color.b, 0.5f); this.Complimenting = false; this.DialogueLabel.text = this.Compliments[this.ComplimentSelected]; DatingGlobals.SetComplimentGiven(this.ComplimentSelected, true); if (this.ComplimentSelected == 1 || this.ComplimentSelected == 4 || this.ComplimentSelected == 5 || this.ComplimentSelected == 8 || this.ComplimentSelected == 9) { this.Rival.CharacterAnimation.CrossFade("f02_lookdown_00"); this.CurrentAnim = "f02_lookdown_00"; this.Affection += (float)this.Multiplier; this.CalculateAffection(); } else { this.Rival.CharacterAnimation.CrossFade("f02_refuse_00"); this.CurrentAnim = "f02_refuse_00"; this.Affection -= 1f; this.CalculateAffection(); } if (this.Affection > 100f) { this.Affection = 100f; } else if (this.Affection < 0f) { this.Affection = 0f; } } if (Input.GetButtonDown("B")) { this.Complimenting = false; return; } } else if (this.ShowingOff) { this.ShowOff.localScale = Vector3.Lerp(this.ShowOff.localScale, new Vector3(1f, 1f, 1f), Time.deltaTime * 10f); if (this.InputManager.TappedUp) { this.TraitSelected--; this.UpdateTraitHighlight(); } else if (this.InputManager.TappedDown) { this.TraitSelected++; this.UpdateTraitHighlight(); } if (Input.GetButtonDown("A")) { UILabel uilabel4 = this.Labels[4]; uilabel4.color = new Color(uilabel4.color.r, uilabel4.color.g, uilabel4.color.b, 0.5f); this.ShowingOff = false; if (this.TraitSelected == 2) { Debug.Log(string.Concat(new object[] { "Wisdom trait is ", DatingGlobals.GetSuitorTrait(2), ". Wisdom Demonstrated is ", DatingGlobals.GetTraitDemonstrated(2), "." })); if (DatingGlobals.GetSuitorTrait(2) > DatingGlobals.GetTraitDemonstrated(2)) { DatingGlobals.SetTraitDemonstrated(2, DatingGlobals.GetTraitDemonstrated(2) + 1); this.DialogueLabel.text = this.ShowOffs[this.AffectionLevel]; this.Rival.CharacterAnimation.CrossFade("f02_lookdown_00"); this.CurrentAnim = "f02_lookdown_00"; this.Affection += (float)this.Multiplier; this.CalculateAffection(); } else if (DatingGlobals.GetSuitorTrait(2) == 0) { this.DialogueLabel.text = "Uh...that doesn't sound correct..."; } else if (DatingGlobals.GetSuitorTrait(2) == DatingGlobals.GetTraitDemonstrated(2)) { this.DialogueLabel.text = "Uh...you already told me about that..."; } } else { this.DialogueLabel.text = "Um...well...that sort of thing doesn't really matter to me..."; } if (this.Affection > 100f) { this.Affection = 100f; } else if (this.Affection < 0f) { this.Affection = 0f; } } if (Input.GetButtonDown("B")) { this.ShowingOff = false; return; } } else if (this.GivingGift) { this.GiveGift.localScale = Vector3.Lerp(this.GiveGift.localScale, new Vector3(1f, 1f, 1f), Time.deltaTime * 10f); if (this.InputManager.TappedUp) { this.GiftRow--; this.UpdateGiftHighlight(); } else if (this.InputManager.TappedDown) { this.GiftRow++; this.UpdateGiftHighlight(); } if (this.InputManager.TappedLeft) { this.GiftColumn--; this.UpdateGiftHighlight(); } else if (this.InputManager.TappedRight) { this.GiftColumn++; this.UpdateGiftHighlight(); } if (Input.GetButtonDown("A")) { if (this.GiftIcons[this.GiftSelected].enabled) { CollectibleGlobals.SetGiftPurchased(this.GiftSelected + 5, false); CollectibleGlobals.SetGiftGiven(this.GiftSelected, false); this.Rival.Cosmetic.CatGifts[this.GiftSelected].SetActive(true); UILabel uilabel5 = this.Labels[5]; uilabel5.color = new Color(uilabel5.color.r, uilabel5.color.g, uilabel5.color.b, 0.5f); this.GivingGift = false; this.DialogueLabel.text = this.GiveGifts[this.GiftSelected]; this.Rival.CharacterAnimation.CrossFade("f02_lookdown_00"); this.CurrentAnim = "f02_lookdown_00"; this.Affection += (float)this.Multiplier; this.CalculateAffection(); } if (this.Affection > 100f) { this.Affection = 100f; } else if (this.Affection < 0f) { this.Affection = 0f; } } if (Input.GetButtonDown("B")) { this.GivingGift = false; return; } } } else if (this.Phase == 5) { this.Speed += Time.deltaTime * 100f; this.AffectionSet.localPosition = new Vector3(this.AffectionSet.localPosition.x, this.AffectionSet.localPosition.y + this.Speed, this.AffectionSet.localPosition.z); this.OptionSet.localPosition = new Vector3(this.OptionSet.localPosition.x + this.Speed, this.OptionSet.localPosition.y, this.OptionSet.localPosition.z); if (this.Speed > 100f && Input.GetButtonDown("A")) { this.Phase++; return; } } else if (this.Phase == 6) { this.DatingSimHUD.alpha = Mathf.MoveTowards(this.DatingSimHUD.alpha, 0f, Time.deltaTime); if (this.DatingSimHUD.alpha == 0f) { this.DatingSimHUD.gameObject.SetActive(false); this.Phase++; return; } } else if (this.Phase == 7) { if (this.Panel.alpha == 0f) { this.Suitor.CharacterAnimation.cullingType = AnimationCullingType.BasedOnRenderers; this.LoveManager.RivalWaiting = false; this.LoveManager.Courted = true; this.Suitor.enabled = true; this.Rival.enabled = true; this.Suitor.CurrentDestination = this.Suitor.Destinations[this.Suitor.Phase]; this.Suitor.Pathfinding.target = this.Suitor.Destinations[this.Suitor.Phase]; this.Suitor.Prompt.Label[0].text = " Talk"; this.Suitor.Pathfinding.canSearch = true; this.Suitor.Pathfinding.canMove = true; this.Suitor.Pushable = false; this.Suitor.Meeting = false; this.Suitor.Routine = true; this.Suitor.MeetTimer = 0f; this.Rival.Cosmetic.MyRenderer.materials[2].SetFloat("_BlendAmount", 0f); this.Rival.CurrentDestination = this.Rival.Destinations[this.Rival.Phase]; this.Rival.Pathfinding.target = this.Rival.Destinations[this.Rival.Phase]; this.Rival.CharacterAnimation["f02_smile_00"].weight = 0f; this.Rival.Prompt.Label[0].text = " Talk"; this.Rival.Pathfinding.canSearch = true; this.Rival.Pathfinding.canMove = true; this.Rival.Pushable = false; this.Rival.Meeting = false; this.Rival.Routine = true; this.Rival.MeetTimer = 0f; this.StudentManager.Clock.StopTime = false; this.Yandere.RPGCamera.enabled = true; this.Suitor.Earpiece.SetActive(false); this.HeartbeatCamera.SetActive(true); this.Yandere.Headset.SetActive(false); DatingGlobals.Affection = this.Affection; if (this.AffectionLevel == 5) { this.LoveManager.ConfessToSuitor = true; } this.PromptBar.ClearButtons(); this.PromptBar.Show = false; if (this.StudentManager.Students[10] != null) { this.StudentManager.Students[10].CurrentDestination = this.StudentManager.Students[10].FollowTarget.transform; this.StudentManager.Students[10].Pathfinding.target = this.StudentManager.Students[10].FollowTarget.transform; } } else if (this.Panel.alpha == 1f) { this.Matchmaking = false; this.Yandere.CanMove = true; base.gameObject.SetActive(false); } this.Panel.alpha = Mathf.MoveTowards(this.Panel.alpha, 1f, Time.deltaTime); } } }