void Awake() { background = FindObjectOfType<BackgroundScript>(); prompt = FindObjectOfType<PromptScript>(); }
// Token: 0x06001283 RID: 4739 RVA: 0x0008A390 File Offset: 0x00088590 private void Update() { if (this.ShowWindow) { this.GameWindow.localScale = Vector3.Lerp(this.GameWindow.localScale, new Vector3(1f, 1f, 1f), Time.deltaTime * 10f); if (this.InputManager.TappedUp) { this.Subject--; this.UpdateHighlight(); } else if (this.InputManager.TappedDown) { this.Subject++; this.UpdateHighlight(); } if (Input.GetButtonDown("A")) { this.ShowWindow = false; this.PlayGames(); this.PromptBar.ClearButtons(); this.PromptBar.UpdateButtons(); this.PromptBar.Show = false; } if (Input.GetButtonDown("B")) { this.Yandere.CanMove = true; this.ShowWindow = false; this.PromptBar.ClearButtons(); this.PromptBar.UpdateButtons(); this.PromptBar.Show = false; } } else if (this.GameWindow.localScale.x > 0.1f) { this.GameWindow.localScale = Vector3.Lerp(this.GameWindow.localScale, Vector3.zero, Time.deltaTime * 10f); } else { this.GameWindow.localScale = Vector3.zero; this.GameWindow.gameObject.SetActive(false); } if (this.Gaming) { this.targetRotation = Quaternion.LookRotation(new Vector3(this.ComputerGames[this.GameID].transform.position.x, this.Yandere.transform.position.y, this.ComputerGames[this.GameID].transform.position.z) - this.Yandere.transform.position); this.Yandere.transform.rotation = Quaternion.Slerp(this.Yandere.transform.rotation, this.targetRotation, Time.deltaTime * 10f); this.Yandere.MoveTowardsTarget(new Vector3(24.32233f, 4f, 12.58998f)); this.Timer += Time.deltaTime; if (this.Timer > 5f) { this.Yandere.PowerUp.transform.parent.gameObject.SetActive(true); this.Yandere.MyController.radius = 0.2f; this.Yandere.CanMove = true; this.Yandere.EmptyHands(); this.Gaming = false; this.ActivateBenefit(); } } else if (this.Timer < 5f) { this.ID = 1; while (this.ID < this.ComputerGames.Length) { PromptScript promptScript = this.ComputerGames[this.ID]; if (promptScript.Circle[0].fillAmount == 0f) { promptScript.Circle[0].fillAmount = 1f; if (!this.Yandere.Chased && this.Yandere.Chasers == 0) { this.GameID = this.ID; if (this.ID == 1) { 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.Yandere.Character.GetComponent <Animation>().Play(this.Yandere.IdleAnim); this.Yandere.CanMove = false; this.GameWindow.gameObject.SetActive(true); this.ShowWindow = true; } else { this.PlayGames(); } } } this.ID++; } } if (this.Yandere.PowerUp.gameObject.activeInHierarchy) { this.Timer += Time.deltaTime; this.Yandere.PowerUp.transform.localPosition = new Vector3(this.Yandere.PowerUp.transform.localPosition.x, this.Yandere.PowerUp.transform.localPosition.y + Time.deltaTime, this.Yandere.PowerUp.transform.localPosition.z); this.Yandere.PowerUp.transform.LookAt(this.MainCamera.position); this.Yandere.PowerUp.transform.localEulerAngles = new Vector3(this.Yandere.PowerUp.transform.localEulerAngles.x, this.Yandere.PowerUp.transform.localEulerAngles.y + 180f, this.Yandere.PowerUp.transform.localEulerAngles.z); if (this.Yandere.PowerUp.color != new Color(1f, 1f, 1f, 1f)) { this.Yandere.PowerUp.color = this.OriginalColor; } else { this.Yandere.PowerUp.color = new Color(1f, 1f, 1f, 1f); } if (this.Timer > 6f) { this.Yandere.PowerUp.transform.parent.gameObject.SetActive(false); base.gameObject.SetActive(false); } } }
private void Update() { if (!this.Clock.StopTime && !this.EventActive && this.Clock.HourTime > this.EventTime) { this.EventStudent = this.StudentManager.Students[2]; if (this.EventStudent != null && !this.EventStudent.Distracted && !this.EventStudent.Talking) { if (!this.EventStudent.WitnessedMurder && !this.EventStudent.Bullied) { if (this.EventStudent.Cosmetic.FemaleAccessories[3].activeInHierarchy) { if (SchemeGlobals.GetSchemeStage(2) < 100) { this.RingPrompt = this.EventStudent.Cosmetic.FemaleAccessories[3].GetComponent <PromptScript>(); this.RingCollider = this.EventStudent.Cosmetic.FemaleAccessories[3].GetComponent <BoxCollider>(); this.OriginalPosition = this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition; this.EventStudent.CurrentDestination = this.EventStudent.Destinations[this.EventStudent.Phase]; this.EventStudent.Pathfinding.target = this.EventStudent.Destinations[this.EventStudent.Phase]; this.EventStudent.Obstacle.checkTime = 99f; this.EventStudent.InEvent = true; this.EventStudent.Private = true; this.EventStudent.Prompt.Hide(); this.EventActive = true; if (this.EventStudent.Following) { this.EventStudent.Pathfinding.canMove = true; this.EventStudent.Pathfinding.speed = 1f; this.EventStudent.Following = false; this.EventStudent.Routine = true; this.Yandere.Follower = null; this.Yandere.Followers--; this.EventStudent.Subtitle.UpdateLabel(SubtitleType.StopFollowApology, 0, 3f); this.EventStudent.Prompt.Label[0].text = " Talk"; } } else { base.enabled = false; } } else { base.enabled = false; } } else { base.enabled = false; } } } if (this.EventActive) { if (this.EventStudent.DistanceToDestination < 0.5f) { this.EventStudent.Pathfinding.canSearch = false; this.EventStudent.Pathfinding.canMove = false; } if (this.EventStudent.Alarmed && this.Yandere.TheftTimer > 0f) { Debug.Log("Event ended because Sakyu saw theft."); this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent = this.EventStudent.LeftMiddleFinger; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition = this.OriginalPosition; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localEulerAngles = new Vector3(0f, 0f, 0f); this.RingCollider.gameObject.SetActive(true); this.RingCollider.enabled = false; this.EventStudent.RingReact = true; this.Yandere.Inventory.Ring = false; this.EndEvent(); return; } if (this.Clock.HourTime > this.EventTime + 0.5f || this.EventStudent.WitnessedMurder || this.EventStudent.Splashed || this.EventStudent.Alarmed || this.EventStudent.Dying || !this.EventStudent.Alive) { this.EndEvent(); return; } if (!this.EventStudent.Pathfinding.canMove) { if (this.EventPhase == 1) { this.Timer += Time.deltaTime; this.EventStudent.Character.GetComponent <Animation>().CrossFade(this.EventAnim[0]); this.EventPhase++; } else if (this.EventPhase == 2) { this.Timer += Time.deltaTime; if (this.Timer > this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].length) { this.EventStudent.Character.GetComponent <Animation>().CrossFade(this.EventStudent.EatAnim); this.EventStudent.Bento.transform.localPosition = new Vector3(-0.025f, -0.105f, 0f); this.EventStudent.Bento.transform.localEulerAngles = new Vector3(0f, 165f, 82.5f); this.EventStudent.Chopsticks[0].SetActive(true); this.EventStudent.Chopsticks[1].SetActive(true); this.EventStudent.Bento.SetActive(true); this.EventStudent.Lid.SetActive(false); this.RingCollider.enabled = true; this.EventPhase++; this.Timer = 0f; } else if (this.Timer > 4f) { if (this.EventStudent.Cosmetic.FemaleAccessories[3] != null) { this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent = null; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.position = new Vector3(-2.707666f, 12.4695f, -31.136f); this.EventStudent.Cosmetic.FemaleAccessories[3].transform.eulerAngles = new Vector3(-20f, 180f, 0f); } } else if (this.Timer > 2.5f) { this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent = this.EventStudent.RightHand; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition = this.HoldingPosition; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localEulerAngles = this.HoldingRotation; } } else if (this.EventPhase == 3) { if (this.Clock.HourTime > 13.375f) { this.EventStudent.Bento.SetActive(false); this.EventStudent.Chopsticks[0].SetActive(false); this.EventStudent.Chopsticks[1].SetActive(false); if (this.RingCollider != null) { this.RingCollider.enabled = false; } if (this.RingPrompt != null) { this.RingPrompt.Hide(); this.RingPrompt.enabled = false; } this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].time = this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].length; this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].speed = -1f; this.EventStudent.Character.GetComponent <Animation>().CrossFade((this.EventStudent.Cosmetic.FemaleAccessories[3] != null) ? this.EventAnim[0] : this.EventAnim[1]); this.EventPhase++; } } else if (this.EventPhase == 4) { this.Timer += Time.deltaTime; if (this.EventStudent.Cosmetic.FemaleAccessories[3] != null) { if (this.Timer > 2f) { this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent = this.EventStudent.RightHand; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition = this.HoldingPosition; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localEulerAngles = this.HoldingRotation; } if (this.Timer > 3f) { this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent = this.EventStudent.LeftMiddleFinger; this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition = this.OriginalPosition; this.RingCollider.enabled = false; } if (this.Timer > 6f) { this.EndEvent(); } } else if (this.Timer > 1.5f && this.Yandere.transform.position.z < 0f) { this.EventSubtitle.text = this.EventSpeech[0]; AudioClipPlayer.Play(this.EventClip[0], this.EventStudent.transform.position + Vector3.up, 5f, 10f, out this.VoiceClip, out this.CurrentClipLength); this.EventPhase++; } } else if (this.EventPhase == 5) { this.Timer += Time.deltaTime; if (this.Timer > 9.5f) { this.EndEvent(); } } float num = Vector3.Distance(this.Yandere.transform.position, this.EventStudent.transform.position); if (num < 11f) { if (num < 10f) { float num2 = Mathf.Abs((num - 10f) * 0.2f); if (num2 < 0f) { num2 = 0f; } if (num2 > 1f) { num2 = 1f; } this.EventSubtitle.transform.localScale = new Vector3(num2, num2, num2); return; } this.EventSubtitle.transform.localScale = Vector3.zero; } } } }