Skip to content

Instantly share code, notes, and snippets.

@pixeldesu pixeldesu/StudentScript.cs Secret
Created Dec 1, 2019

Embed
What would you like to do?
567 kilobytes of Yandere Simulator quality disassembly. Enjoy!
using System;
using System.Collections.Generic;
using FIMSpace.FLook;
using Pathfinding;
using UnityEngine;
// Token: 0x0200052C RID: 1324
public class StudentScript : MonoBehaviour
{
// Token: 0x1700049C RID: 1180
// (get) Token: 0x060020A5 RID: 8357 RVA: 0x0015AB8A File Offset: 0x00158F8A
public bool Alive
{
get
{
return this.DeathType == DeathType.None;
}
}
// Token: 0x060020A6 RID: 8358 RVA: 0x0015AB98 File Offset: 0x00158F98
public void Start()
{
this.CounterAnim = "f02_teacherCounterB_00";
if (!this.Started)
{
this.CharacterAnimation = this.Character.GetComponent<Animation>();
this.MyBento = this.Bento.GetComponent<GenericBentoScript>();
this.Pathfinding.repathRate += (float)this.StudentID * 0.01f;
this.OriginalIdleAnim = this.IdleAnim;
this.OriginalLeanAnim = this.LeanAnim;
if (!this.StudentManager.LoveSick && SchoolAtmosphere.Type == SchoolAtmosphereType.Low && this.Club <= ClubType.Gaming)
{
this.IdleAnim = this.ParanoidAnim;
}
if (ClubGlobals.Club == ClubType.Occult)
{
this.Perception = 0.5f;
}
this.Hearts.emission.enabled = false;
this.Prompt.OwnerType = PromptOwnerType.Person;
this.Paranoia = 2f - SchoolGlobals.SchoolAtmosphere;
this.VisionDistance = ((PlayerGlobals.PantiesEquipped != 4) ? 10f : 5f) * this.Paranoia;
if (GameObject.Find("DetectionCamera") != null)
{
this.SpawnDetectionMarker();
}
StudentJson studentJson = this.JSON.Students[this.StudentID];
this.ScheduleBlocks = studentJson.ScheduleBlocks;
this.Persona = studentJson.Persona;
this.Class = studentJson.Class;
this.Crush = studentJson.Crush;
this.Club = studentJson.Club;
this.BreastSize = studentJson.BreastSize;
this.Strength = studentJson.Strength;
this.Hairstyle = studentJson.Hairstyle;
this.Accessory = studentJson.Accessory;
this.Name = studentJson.Name;
this.OriginalClub = this.Club;
if (StudentGlobals.GetStudentBroken(this.StudentID))
{
this.Cosmetic.RightEyeRenderer.gameObject.SetActive(false);
this.Cosmetic.LeftEyeRenderer.gameObject.SetActive(false);
this.Cosmetic.RightIrisLight.SetActive(false);
this.Cosmetic.LeftIrisLight.SetActive(false);
this.RightEmptyEye.SetActive(true);
this.LeftEmptyEye.SetActive(true);
this.Shy = true;
this.Persona = PersonaType.Coward;
}
if (this.Name == "Random")
{
this.Persona = (PersonaType)UnityEngine.Random.Range(1, 8);
if (this.Persona == PersonaType.Lovestruck)
{
this.Persona = PersonaType.PhoneAddict;
}
studentJson.Persona = this.Persona;
if (this.Persona == PersonaType.Heroic)
{
this.Strength = UnityEngine.Random.Range(1, 5);
studentJson.Strength = this.Strength;
}
}
this.Seat = this.StudentManager.Seats[this.Class].List[studentJson.Seat];
base.gameObject.name = string.Concat(new string[]
{
"Student_",
this.StudentID.ToString(),
" (",
this.Name,
")"
});
this.OriginalPersona = this.Persona;
if (this.StudentID == 81 && StudentGlobals.GetStudentBroken(81))
{
this.Persona = PersonaType.Coward;
}
if (this.Persona == PersonaType.Loner || this.Persona == PersonaType.Coward || this.Persona == PersonaType.Fragile)
{
this.CameraAnims = this.CowardAnims;
}
else if (this.Persona == PersonaType.TeachersPet || this.Persona == PersonaType.Heroic || this.Persona == PersonaType.Strict)
{
this.CameraAnims = this.HeroAnims;
}
else if (this.Persona == PersonaType.Evil || this.Persona == PersonaType.Spiteful || this.Persona == PersonaType.Violent)
{
this.CameraAnims = this.EvilAnims;
}
else if (this.Persona == PersonaType.SocialButterfly || this.Persona == PersonaType.Lovestruck || this.Persona == PersonaType.PhoneAddict || this.Persona == PersonaType.Sleuth)
{
this.CameraAnims = this.SocialAnims;
}
if (ClubGlobals.GetClubClosed(this.Club))
{
this.Club = ClubType.None;
}
this.DialogueWheel = GameObject.Find("DialogueWheel").GetComponent<DialogueWheelScript>();
this.ClubManager = GameObject.Find("ClubManager").GetComponent<ClubManagerScript>();
this.Reputation = GameObject.Find("Reputation").GetComponent<ReputationScript>();
this.Yandere = GameObject.Find("YandereChan").GetComponent<YandereScript>();
this.Police = GameObject.Find("Police").GetComponent<PoliceScript>();
this.Clock = GameObject.Find("Clock").GetComponent<ClockScript>();
this.Subtitle = this.Yandere.Subtitle;
this.CameraEffects = this.Yandere.MainCamera.GetComponent<CameraEffectsScript>();
this.RightEyeOrigin = this.RightEye.localPosition;
this.LeftEyeOrigin = this.LeftEye.localPosition;
this.Bento.GetComponent<GenericBentoScript>().StudentID = this.StudentID;
this.HealthBar.transform.parent.gameObject.SetActive(false);
this.VomitEmitter.gameObject.SetActive(false);
this.ChaseCamera.gameObject.SetActive(false);
this.Countdown.gameObject.SetActive(false);
this.MiyukiGameScreen.SetActive(false);
this.Chopsticks[0].SetActive(false);
this.Chopsticks[1].SetActive(false);
this.Sketchbook.SetActive(false);
this.SmartPhone.SetActive(false);
this.OccultBook.SetActive(false);
this.Paintbrush.SetActive(false);
this.EventBook.SetActive(false);
this.Handcuffs.SetActive(false);
this.Scrubber.SetActive(false);
this.Octodog.SetActive(false);
this.Palette.SetActive(false);
this.Eraser.SetActive(false);
this.Pencil.SetActive(false);
this.Bento.SetActive(false);
this.Pen.SetActive(false);
this.SpeechLines.Stop();
foreach (GameObject gameObject in this.ScienceProps)
{
if (gameObject != null)
{
gameObject.SetActive(false);
}
}
foreach (GameObject gameObject2 in this.Fingerfood)
{
if (gameObject2 != null)
{
gameObject2.SetActive(false);
}
}
this.OriginalOriginalWalkAnim = this.WalkAnim;
this.OriginalSprintAnim = this.SprintAnim;
this.OriginalWalkAnim = this.WalkAnim;
if (this.Persona == PersonaType.Evil)
{
this.ScaredAnim = this.EvilWitnessAnim;
}
if (this.Persona == PersonaType.PhoneAddict)
{
this.SmartPhone.transform.localPosition = new Vector3(0.01f, 0.005f, 0.01f);
this.SmartPhone.transform.localEulerAngles = new Vector3(0f, -160f, 165f);
this.Countdown.Speed = 0.1f;
this.SprintAnim = this.PhoneAnims[2];
this.PatrolAnim = this.PhoneAnims[3];
}
if (this.Club == ClubType.Bully)
{
if (!StudentGlobals.GetStudentBroken(this.StudentID))
{
this.IdleAnim = this.PhoneAnims[0];
this.BullyID = this.StudentID - 80;
}
if (TaskGlobals.GetTaskStatus(36) == 3 && !SchoolGlobals.ReactedToGameLeader)
{
this.StudentManager.ReactedToGameLeader = true;
ScheduleBlock scheduleBlock = this.ScheduleBlocks[4];
scheduleBlock.destination = "Shock";
scheduleBlock.action = "Shock";
}
}
if (!this.Male)
{
this.SkirtOrigins[0] = this.Skirt[0].transform.localPosition;
this.SkirtOrigins[1] = this.Skirt[1].transform.localPosition;
this.SkirtOrigins[2] = this.Skirt[2].transform.localPosition;
this.SkirtOrigins[3] = this.Skirt[3].transform.localPosition;
this.InstrumentBag[1].SetActive(false);
this.InstrumentBag[2].SetActive(false);
this.InstrumentBag[3].SetActive(false);
this.InstrumentBag[4].SetActive(false);
this.InstrumentBag[5].SetActive(false);
this.PickRandomGossipAnim();
this.DramaticCamera.gameObject.SetActive(false);
this.AnimatedBook.SetActive(false);
this.Handkerchief.SetActive(false);
this.PepperSpray.SetActive(false);
this.WateringCan.SetActive(false);
this.Sketchbook.SetActive(false);
this.Cigarette.SetActive(false);
this.CandyBar.SetActive(false);
this.Lighter.SetActive(false);
foreach (GameObject gameObject3 in this.Instruments)
{
if (gameObject3 != null)
{
gameObject3.SetActive(false);
}
}
this.Drumsticks[0].SetActive(false);
this.Drumsticks[1].SetActive(false);
if (this.Club >= ClubType.Teacher)
{
this.BecomeTeacher();
}
if (this.StudentManager.Censor && !this.Teacher)
{
this.Cosmetic.CensorPanties();
}
this.DisableEffects();
}
else
{
this.RandomCheerAnim = this.CheerAnims[UnityEngine.Random.Range(0, this.CheerAnims.Length)];
this.MapMarker.gameObject.SetActive(false);
this.DelinquentSpeechLines.Stop();
this.PinkSeifuku.SetActive(false);
this.WeaponBag.SetActive(false);
this.Earpiece.SetActive(false);
this.SetSplashes(false);
foreach (ParticleSystem particleSystem in this.LiquidEmitters)
{
particleSystem.gameObject.SetActive(false);
}
}
if (this.StudentID == 1)
{
this.MapMarker.gameObject.SetActive(true);
}
else if (this.StudentID == 2)
{
if (StudentGlobals.GetStudentDead(3) || StudentGlobals.GetStudentKidnapped(3) || this.StudentManager.Students[3].Slave)
{
ScheduleBlock scheduleBlock2 = this.ScheduleBlocks[2];
scheduleBlock2.destination = "Mourn";
scheduleBlock2.action = "Mourn";
this.IdleAnim = this.BulliedIdleAnim;
this.WalkAnim = this.BulliedWalkAnim;
}
}
else if (this.StudentID == 3)
{
if (StudentGlobals.GetStudentDead(2) || StudentGlobals.GetStudentKidnapped(2) || this.StudentManager.Students[2] == null || (this.StudentManager.Students[2] != null && this.StudentManager.Students[2].Slave))
{
ScheduleBlock scheduleBlock3 = this.ScheduleBlocks[2];
scheduleBlock3.destination = "Mourn";
scheduleBlock3.action = "Mourn";
this.IdleAnim = this.BulliedIdleAnim;
this.WalkAnim = this.BulliedWalkAnim;
}
}
else if (this.StudentID == 4)
{
this.IdleAnim = "f02_idleShort_00";
this.WalkAnim = "f02_newWalk_00";
}
else if (this.StudentID == 5)
{
this.LongSkirt = true;
this.Shy = true;
}
else if (this.StudentID == 6)
{
this.RelaxAnim = "crossarms_00";
this.CameraAnims = this.HeroAnims;
}
else if (this.StudentID == 7)
{
this.RunAnim = "runFeminine_00";
this.SprintAnim = "runFeminine_00";
this.RelaxAnim = "infirmaryRest_00";
this.OriginalSprintAnim = this.SprintAnim;
this.Cosmetic.Start();
base.gameObject.SetActive(false);
}
else if (this.StudentID == 8)
{
this.IdleAnim = this.BulliedIdleAnim;
this.WalkAnim = this.BulliedWalkAnim;
}
else if (this.StudentID == 9)
{
this.IdleAnim = "idleScholarly_00";
this.WalkAnim = "walkScholarly_00";
this.CameraAnims = this.HeroAnims;
}
else if (this.StudentID == 10)
{
UnityEngine.Object.Destroy(base.gameObject);
}
else if (this.StudentID == 11)
{
UnityEngine.Object.Destroy(base.gameObject);
}
else if (this.StudentID == 24 && this.StudentID == 25)
{
this.IdleAnim = "f02_idleGirly_00";
this.WalkAnim = "f02_walkGirly_00";
}
else if (this.StudentID == 26)
{
this.IdleAnim = "idleHaughty_00";
this.WalkAnim = "walkHaughty_00";
}
else if (this.StudentID == 28 || this.StudentID == 30)
{
if (this.StudentID == 30)
{
this.SmartPhone.GetComponent<Renderer>().material.mainTexture = this.KokonaPhoneTexture;
}
if (DatingGlobals.SuitorProgress == 2)
{
this.Partner = ((this.StudentID != 30) ? this.StudentManager.Students[30] : this.StudentManager.Students[28]);
ScheduleBlock scheduleBlock4 = this.ScheduleBlocks[4];
scheduleBlock4.destination = "Cuddle";
scheduleBlock4.action = "Cuddle";
}
}
else if (this.StudentID == 31)
{
this.IdleAnim = this.BulliedIdleAnim;
this.WalkAnim = this.BulliedWalkAnim;
}
else if (this.StudentID == 34 || this.StudentID == 35)
{
this.IdleAnim = "f02_idleShort_00";
this.WalkAnim = "f02_newWalk_00";
if (this.Paranoia > 1.66666f)
{
this.IdleAnim = this.ParanoidAnim;
this.WalkAnim = this.ParanoidWalkAnim;
}
}
else if (this.StudentID == 36)
{
if (TaskGlobals.GetTaskStatus(36) < 3)
{
this.IdleAnim = "slouchIdle_00";
this.WalkAnim = "slouchWalk_00";
this.ClubAnim = "slouchGaming_00";
}
else
{
this.IdleAnim = "properIdle_00";
this.WalkAnim = "properWalk_00";
this.ClubAnim = "properGaming_00";
}
if (this.Paranoia > 1.66666f)
{
this.IdleAnim = this.ParanoidAnim;
this.WalkAnim = this.ParanoidWalkAnim;
}
}
else if (this.StudentID == 39)
{
this.SmartPhone.GetComponent<Renderer>().material.mainTexture = this.MidoriPhoneTexture;
this.PatrolAnim = "f02_midoriTexting_00";
}
else if (this.StudentID == 51)
{
this.IdleAnim = "f02_idleConfident_01";
this.WalkAnim = "f02_walkConfident_01";
if (ClubGlobals.GetClubClosed(ClubType.LightMusic))
{
this.IdleAnim = this.BulliedIdleAnim;
this.WalkAnim = this.BulliedWalkAnim;
this.CameraAnims = this.CowardAnims;
this.Persona = PersonaType.Loner;
if (!SchoolGlobals.RoofFence)
{
ScheduleBlock scheduleBlock5 = this.ScheduleBlocks[2];
scheduleBlock5.destination = "Sulk";
scheduleBlock5.action = "Sulk";
ScheduleBlock scheduleBlock6 = this.ScheduleBlocks[4];
scheduleBlock6.destination = "Sulk";
scheduleBlock6.action = "Sulk";
ScheduleBlock scheduleBlock7 = this.ScheduleBlocks[7];
scheduleBlock7.destination = "Sulk";
scheduleBlock7.action = "Sulk";
ScheduleBlock scheduleBlock8 = this.ScheduleBlocks[8];
scheduleBlock8.destination = "Sulk";
scheduleBlock8.action = "Sulk";
}
else
{
ScheduleBlock scheduleBlock9 = this.ScheduleBlocks[2];
scheduleBlock9.destination = "Seat";
scheduleBlock9.action = "Sit";
ScheduleBlock scheduleBlock10 = this.ScheduleBlocks[4];
scheduleBlock10.destination = "Seat";
scheduleBlock10.action = "Sit";
ScheduleBlock scheduleBlock11 = this.ScheduleBlocks[7];
scheduleBlock11.destination = "Seat";
scheduleBlock11.action = "Sit";
ScheduleBlock scheduleBlock12 = this.ScheduleBlocks[8];
scheduleBlock12.destination = "Seat";
scheduleBlock12.action = "Sit";
}
}
}
else if (this.StudentID == 56)
{
this.IdleAnim = "idleConfident_00";
this.WalkAnim = "walkConfident_00";
this.SleuthID = 0;
}
else if (this.StudentID == 57)
{
this.IdleAnim = "idleChill_01";
this.WalkAnim = "walkChill_01";
this.SleuthID = 20;
}
else if (this.StudentID == 58)
{
this.IdleAnim = "idleChill_00";
this.WalkAnim = "walkChill_00";
this.SleuthID = 40;
}
else if (this.StudentID == 59)
{
this.IdleAnim = "f02_idleGraceful_00";
this.WalkAnim = "f02_walkGraceful_00";
this.SleuthID = 60;
}
else if (this.StudentID == 60)
{
this.IdleAnim = "f02_idleScholarly_00";
this.WalkAnim = "f02_walkScholarly_00";
this.CameraAnims = this.HeroAnims;
this.SleuthID = 80;
}
else if (this.StudentID == 61)
{
this.IdleAnim = "scienceIdle_00";
this.WalkAnim = "scienceWalk_00";
this.OriginalWalkAnim = "scienceWalk_00";
}
else if (this.StudentID == 62)
{
this.IdleAnim = "idleFrown_00";
this.WalkAnim = "walkFrown_00";
if (this.Paranoia > 1.66666f)
{
this.IdleAnim = this.ParanoidAnim;
this.WalkAnim = this.ParanoidWalkAnim;
}
}
else if (this.StudentID == 64 || this.StudentID == 65)
{
this.IdleAnim = "f02_idleShort_00";
this.WalkAnim = "f02_newWalk_00";
if (this.Paranoia > 1.66666f)
{
this.IdleAnim = this.ParanoidAnim;
this.WalkAnim = this.ParanoidWalkAnim;
}
}
else if (this.StudentID == 66)
{
this.IdleAnim = "pose_03";
this.OriginalWalkAnim = "walkConfident_00";
this.WalkAnim = "walkConfident_00";
this.ClubThreshold = 100f;
}
else if (this.StudentID == 69)
{
this.IdleAnim = "idleFrown_00";
this.WalkAnim = "walkFrown_00";
if (this.Paranoia > 1.66666f)
{
this.IdleAnim = this.ParanoidAnim;
this.WalkAnim = this.ParanoidWalkAnim;
}
}
else if (this.StudentID == 71)
{
this.IdleAnim = "f02_idleGirly_00";
this.WalkAnim = "f02_walkGirly_00";
}
this.OriginalWalkAnim = this.WalkAnim;
if (StudentGlobals.GetStudentGrudge(this.StudentID))
{
if (this.Persona != PersonaType.Coward && this.Persona != PersonaType.Evil)
{
this.CameraAnims = this.EvilAnims;
this.Reputation.PendingRep -= 10f;
this.PendingRep -= 10f;
this.ID = 0;
while (this.ID < this.Outlines.Length)
{
this.Outlines[this.ID].color = new Color(1f, 1f, 0f, 1f);
this.ID++;
}
}
this.Grudge = true;
this.CameraAnims = this.EvilAnims;
}
if (this.Persona == PersonaType.Sleuth)
{
if (SchoolGlobals.SchoolAtmosphere <= 0.8f || this.Grudge)
{
this.Indoors = true;
this.Spawned = true;
if (this.ShoeRemoval.Locker == null)
{
this.ShoeRemoval.Start();
}
this.ShoeRemoval.PutOnShoes();
this.SprintAnim = this.SleuthSprintAnim;
this.IdleAnim = this.SleuthIdleAnim;
this.WalkAnim = this.SleuthWalkAnim;
this.CameraAnims = this.HeroAnims;
this.SmartPhone.SetActive(true);
this.Countdown.Speed = 0.075f;
this.Sleuthing = true;
if (this.Male)
{
this.SmartPhone.transform.localPosition = new Vector3(0.06f, -0.02f, -0.02f);
}
else
{
this.SmartPhone.transform.localPosition = new Vector3(0.033333f, -0.015f, -0.015f);
}
this.SmartPhone.transform.localEulerAngles = new Vector3(12.5f, 120f, 180f);
if (this.Club == ClubType.None)
{
this.StudentManager.SleuthPhase = 3;
this.GetSleuthTarget();
}
else
{
this.SleuthTarget = this.StudentManager.Clubs.List[this.StudentID];
}
if (!this.Grudge)
{
ScheduleBlock scheduleBlock13 = this.ScheduleBlocks[2];
scheduleBlock13.destination = "Sleuth";
scheduleBlock13.action = "Sleuth";
ScheduleBlock scheduleBlock14 = this.ScheduleBlocks[4];
scheduleBlock14.destination = "Sleuth";
scheduleBlock14.action = "Sleuth";
ScheduleBlock scheduleBlock15 = this.ScheduleBlocks[7];
scheduleBlock15.destination = "Sleuth";
scheduleBlock15.action = "Sleuth";
}
else
{
this.StalkTarget = this.Yandere.transform;
this.SleuthTarget = this.Yandere.transform;
ScheduleBlock scheduleBlock16 = this.ScheduleBlocks[2];
scheduleBlock16.destination = "Stalk";
scheduleBlock16.action = "Stalk";
ScheduleBlock scheduleBlock17 = this.ScheduleBlocks[4];
scheduleBlock17.destination = "Stalk";
scheduleBlock17.action = "Stalk";
ScheduleBlock scheduleBlock18 = this.ScheduleBlocks[7];
scheduleBlock18.destination = "Stalk";
scheduleBlock18.action = "Stalk";
}
}
else if (SchoolGlobals.SchoolAtmosphere <= 0.9f)
{
this.WalkAnim = this.ParanoidWalkAnim;
this.CameraAnims = this.HeroAnims;
}
}
if (!this.Slave)
{
if (this.StudentManager.Bullies > 1)
{
if (this.StudentID == 81 || this.StudentID == 83 || this.StudentID == 85)
{
if (this.Persona != PersonaType.Coward)
{
this.Pathfinding.canSearch = false;
this.Pathfinding.canMove = false;
this.Paired = true;
this.CharacterAnimation["f02_walkTalk_00"].time += (float)(this.StudentID - 81);
this.WalkAnim = "f02_walkTalk_00";
this.SpeechLines.Play();
}
}
else if (this.StudentID == 82 || this.StudentID == 84)
{
this.Pathfinding.canSearch = false;
this.Pathfinding.canMove = false;
this.Paired = true;
this.CharacterAnimation["f02_walkTalk_01"].time += (float)(this.StudentID - 81);
this.WalkAnim = "f02_walkTalk_01";
this.SpeechLines.Play();
}
}
if (this.Club == ClubType.Delinquent)
{
if (PlayerGlobals.GetStudentFriend(this.StudentID))
{
this.RespectEarned = true;
}
if (CounselorGlobals.WeaponsBanned == 0)
{
this.MyWeapon = this.Yandere.WeaponManager.DelinquentWeapons[this.StudentID - 75];
this.MyWeapon.transform.parent = this.WeaponBagParent;
this.MyWeapon.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
this.MyWeapon.transform.localPosition = new Vector3(0f, 0f, 0f);
this.MyWeapon.FingerprintID = this.StudentID;
this.MyWeapon.MyCollider.enabled = false;
this.WeaponBag.SetActive(true);
}
else
{
this.OriginalPersona = PersonaType.Heroic;
this.Persona = PersonaType.Heroic;
}
this.ScaredAnim = "delinquentCombatIdle_00";
this.LeanAnim = "delinquentConcern_00";
this.ShoveAnim = "pushTough_00";
this.WalkAnim = "walkTough_00";
this.IdleAnim = "idleTough_00";
this.SpeechLines = this.DelinquentSpeechLines;
this.Pathfinding.canSearch = false;
this.Pathfinding.canMove = false;
this.Paired = true;
this.TaskAnims[0] = "delinquentTalk_04";
this.TaskAnims[1] = "delinquentTalk_01";
this.TaskAnims[2] = "delinquentTalk_02";
this.TaskAnims[3] = "delinquentTalk_03";
this.TaskAnims[4] = "delinquentTalk_00";
this.TaskAnims[5] = "delinquentTalk_03";
}
}
if (this.StudentID == this.StudentManager.RivalID)
{
this.RivalPrefix = "Rival ";
if (DateGlobals.Weekday == DayOfWeek.Friday)
{
Debug.Log("It's Friday, and " + this.Name + " should leave a note in Senpai's locker ar 5:00 PM.");
ScheduleBlock scheduleBlock19 = this.ScheduleBlocks[7];
scheduleBlock19.time = 17f;
}
}
if (!this.Teacher && this.Name != "Random")
{
this.StudentManager.CleaningManager.GetRole(this.StudentID);
this.CleaningSpot = this.StudentManager.CleaningManager.Spot;
this.CleaningRole = this.StudentManager.CleaningManager.Role;
}
if (this.Club == ClubType.Cooking)
{
this.SleuthID = (this.StudentID - 21) * 20;
this.ClubAnim = this.PrepareFoodAnim;
this.ClubMemberID = this.StudentID - 20;
this.MyPlate = this.StudentManager.Plates[this.ClubMemberID];
this.OriginalPlatePosition = this.MyPlate.position;
this.OriginalPlateRotation = this.MyPlate.rotation;
if (!GameGlobals.EmptyDemon)
{
this.ApronAttacher.enabled = true;
}
}
else if (this.Club == ClubType.Drama)
{
if (this.StudentID == 26)
{
this.ClubAnim = "teaching_00";
}
else if (this.StudentID == 27 || this.StudentID == 28)
{
this.ClubAnim = "sit_00";
}
else if (this.StudentID == 29 || this.StudentID == 30)
{
this.ClubAnim = "f02_sit_00";
}
this.OriginalClubAnim = this.ClubAnim;
}
else if (this.Club == ClubType.Occult)
{
this.PatrolAnim = this.ThinkAnim;
this.CharacterAnimation[this.PatrolAnim].speed = 0.2f;
}
else if (this.Club == ClubType.Gaming)
{
this.MiyukiGameScreen.SetActive(true);
this.ClubMemberID = this.StudentID - 35;
if (this.StudentID > 36)
{
this.ClubAnim = this.GameAnim;
}
this.ActivityAnim = this.GameAnim;
}
else if (this.Club == ClubType.Art)
{
this.ChangingBooth = this.StudentManager.ChangingBooths[4];
this.ActivityAnim = this.PaintAnim;
this.Attacher.ArtClub = true;
this.ClubAnim = this.PaintAnim;
this.DressCode = true;
if (DateGlobals.Weekday == DayOfWeek.Friday)
{
Debug.Log("It's Friday, so the art club is changing their club activity to painting the cherry tree.");
ScheduleBlock scheduleBlock20 = this.ScheduleBlocks[7];
scheduleBlock20.destination = "Paint";
scheduleBlock20.action = "Paint";
}
this.ClubMemberID = this.StudentID - 40;
this.Painting = this.StudentManager.FridayPaintings[this.ClubMemberID];
this.GetDestinations();
}
else if (this.Club == ClubType.LightMusic)
{
this.ClubMemberID = this.StudentID - 50;
this.InstrumentBag[this.ClubMemberID].SetActive(true);
if (this.StudentID == 51)
{
this.ClubAnim = "f02_practiceGuitar_01";
}
else if (this.StudentID == 52 || this.StudentID == 53)
{
this.ClubAnim = "f02_practiceGuitar_00";
}
else if (this.StudentID == 54)
{
this.ClubAnim = "f02_practiceDrums_00";
this.Instruments[4] = this.StudentManager.DrumSet;
}
else if (this.StudentID == 55)
{
this.ClubAnim = "f02_practiceKeytar_00";
}
}
else if (this.Club == ClubType.MartialArts)
{
this.ChangingBooth = this.StudentManager.ChangingBooths[6];
this.DressCode = true;
if (this.StudentID == 46)
{
this.IdleAnim = "pose_03";
this.ClubAnim = "pose_03";
}
else if (this.StudentID == 47)
{
this.GetNewAnimation = true;
this.ClubAnim = "idle_20";
this.ActivityAnim = "kick_24";
}
else if (this.StudentID == 48)
{
this.ClubAnim = "sit_04";
this.ActivityAnim = "kick_24";
}
else if (this.StudentID == 49)
{
this.GetNewAnimation = true;
this.ClubAnim = "f02_idle_20";
this.ActivityAnim = "f02_kick_23";
}
else if (this.StudentID == 50)
{
this.ClubAnim = "f02_sit_05";
this.ActivityAnim = "f02_kick_23";
}
this.ClubMemberID = this.StudentID - 45;
}
else if (this.Club == ClubType.Science)
{
this.ChangingBooth = this.StudentManager.ChangingBooths[8];
this.Attacher.ScienceClub = true;
this.DressCode = true;
if (this.StudentID == 61)
{
this.ClubAnim = "scienceMad_00";
}
else if (this.StudentID == 62)
{
this.ClubAnim = "scienceTablet_00";
}
else if (this.StudentID == 63)
{
this.ClubAnim = "scienceChemistry_00";
}
else if (this.StudentID == 64)
{
this.ClubAnim = "f02_scienceLeg_00";
}
else if (this.StudentID == 65)
{
this.ClubAnim = "f02_scienceConsole_00";
}
this.ClubMemberID = this.StudentID - 60;
}
else if (this.Club == ClubType.Sports)
{
this.ChangingBooth = this.StudentManager.ChangingBooths[9];
this.DressCode = true;
this.ClubAnim = "stretch_00";
this.ClubMemberID = this.StudentID - 65;
}
else if (this.Club == ClubType.Gardening)
{
if (this.StudentID == 71)
{
this.PatrolAnim = "f02_thinking_00";
this.ClubAnim = "f02_thinking_00";
this.CharacterAnimation[this.PatrolAnim].speed = 0.9f;
}
else
{
this.ClubAnim = "f02_waterPlant_00";
this.WateringCan.SetActive(true);
}
}
if (this.OriginalClub != ClubType.Gaming)
{
this.Miyuki.gameObject.SetActive(false);
}
if (this.Cosmetic.Hairstyle == 20)
{
this.IdleAnim = "f02_tsunIdle_00";
}
this.GetDestinations();
this.OriginalActions = new StudentActionType[this.Actions.Length];
Array.Copy(this.Actions, this.OriginalActions, this.Actions.Length);
if (this.AoT)
{
this.AttackOnTitan();
}
if (this.Slave)
{
this.NEStairs = GameObject.Find("NEStairs").GetComponent<Collider>();
this.NWStairs = GameObject.Find("NWStairs").GetComponent<Collider>();
this.SEStairs = GameObject.Find("SEStairs").GetComponent<Collider>();
this.SWStairs = GameObject.Find("SWStairs").GetComponent<Collider>();
this.IdleAnim = this.BrokenAnim;
this.WalkAnim = this.BrokenWalkAnim;
this.RightEmptyEye.SetActive(true);
this.LeftEmptyEye.SetActive(true);
this.SmartPhone.SetActive(false);
this.Distracted = true;
this.Indoors = true;
this.Safe = false;
this.Shy = false;
this.ID = 0;
while (this.ID < this.ScheduleBlocks.Length)
{
this.ScheduleBlocks[this.ID].time = 0f;
this.ID++;
}
if (this.FragileSlave)
{
this.HuntTarget = this.StudentManager.Students[StudentGlobals.GetFragileTarget()];
}
else
{
SchoolGlobals.KidnapVictim = 0;
}
}
if (this.Spooky)
{
this.Spook();
}
this.Prompt.HideButton[0] = true;
this.Prompt.HideButton[2] = true;
this.ID = 0;
while (this.ID < this.Ragdoll.AllRigidbodies.Length)
{
this.Ragdoll.AllRigidbodies[this.ID].isKinematic = true;
this.Ragdoll.AllColliders[this.ID].enabled = false;
this.ID++;
}
this.Ragdoll.AllColliders[10].enabled = true;
if (this.StudentID == 1)
{
this.DetectionMarker.GetComponent<DetectionMarkerScript>().Tex.color = new Color(1f, 0f, 0f, 0f);
this.Yandere.Senpai = base.transform;
this.Yandere.LookAt.target = this.Head;
this.ID = 0;
while (this.ID < this.Outlines.Length)
{
if (this.Outlines[this.ID] != null)
{
this.Outlines[this.ID].enabled = true;
this.Outlines[this.ID].color = new Color(1f, 0f, 1f);
}
this.ID++;
}
this.Prompt.ButtonActive[0] = false;
this.Prompt.ButtonActive[1] = false;
this.Prompt.ButtonActive[2] = false;
this.Prompt.ButtonActive[3] = false;
if (this.StudentManager.MissionMode || GameGlobals.SenpaiMourning)
{
base.transform.position = Vector3.zero;
base.gameObject.SetActive(false);
}
}
else if (!StudentGlobals.GetStudentPhotographed(this.StudentID))
{
this.ID = 0;
while (this.ID < this.Outlines.Length)
{
if (this.Outlines[this.ID] != null)
{
this.Outlines[this.ID].enabled = false;
this.Outlines[this.ID].color = new Color(0f, 1f, 0f);
}
this.ID++;
}
}
this.PickRandomAnim();
this.PickRandomSleuthAnim();
Renderer component = this.Armband.GetComponent<Renderer>();
this.Armband.SetActive(false);
if (this.Club != ClubType.None && (this.StudentID == 21 || this.StudentID == 26 || this.StudentID == 31 || this.StudentID == 36 || this.StudentID == 41 || this.StudentID == 46 || this.StudentID == 51 || this.StudentID == 56 || this.StudentID == 61 || this.StudentID == 66 || this.StudentID == 71))
{
this.Armband.SetActive(true);
if (GameGlobals.EmptyDemon)
{
this.IdleAnim = this.OriginalIdleAnim;
this.WalkAnim = this.OriginalOriginalWalkAnim;
this.OriginalPersona = PersonaType.Evil;
this.Persona = PersonaType.Evil;
this.ScaredAnim = this.EvilWitnessAnim;
}
}
if (!this.Teacher)
{
this.CurrentDestination = this.Destinations[this.Phase];
this.Pathfinding.target = this.Destinations[this.Phase];
}
else
{
this.Indoors = true;
}
if (this.StudentID == 1 || this.StudentID == 4 || this.StudentID == 5 || this.StudentID == 11)
{
this.BookRenderer.material.mainTexture = this.RedBookTexture;
}
this.CharacterAnimation.cullingType = AnimationCullingType.BasedOnRenderers;
if (this.StudentManager.MissionMode && this.StudentID == MissionModeGlobals.MissionTarget)
{
this.ID = 0;
while (this.ID < this.Outlines.Length)
{
this.Outlines[this.ID].enabled = true;
this.Outlines[this.ID].color = new Color(1f, 0f, 0f);
this.ID++;
}
}
UnityEngine.Object.Destroy(this.MyRigidbody);
this.Started = true;
if (this.Club == ClubType.Council)
{
component.material.SetTextureOffset("_MainTex", new Vector2(-0.64375f, 0f));
this.Armband.SetActive(true);
this.Indoors = true;
this.Spawned = true;
if (this.ShoeRemoval.Locker == null)
{
this.ShoeRemoval.Start();
}
this.ShoeRemoval.PutOnShoes();
if (this.StudentID == 86)
{
this.Suffix = "Strict";
}
else if (this.StudentID == 87)
{
this.Suffix = "Casual";
}
else if (this.StudentID == 88)
{
this.Suffix = "Grace";
}
else if (this.StudentID == 89)
{
this.Suffix = "Edgy";
}
this.IdleAnim = "f02_idleCouncil" + this.Suffix + "_00";
this.WalkAnim = "f02_walkCouncil" + this.Suffix + "_00";
this.ShoveAnim = "f02_pushCouncil" + this.Suffix + "_00";
this.PatrolAnim = "f02_scanCouncil" + this.Suffix + "_00";
this.RelaxAnim = "f02_relaxCouncil" + this.Suffix + "_00";
this.SprayAnim = "f02_sprayCouncil" + this.Suffix + "_00";
this.BreakUpAnim = "f02_stopCouncil" + this.Suffix + "_00";
this.PickUpAnim = "f02_teacherPickUp_00";
this.ScaredAnim = this.ReadyToFightAnim;
this.ParanoidAnim = this.GuardAnim;
this.CameraAnims[1] = this.IdleAnim;
this.CameraAnims[2] = this.IdleAnim;
this.CameraAnims[3] = this.IdleAnim;
this.ClubMemberID = this.StudentID - 85;
this.VisionDistance *= 2f;
}
if (!this.StudentManager.NoClubMeeting && this.Armband.activeInHierarchy && this.Clock.Weekday == 5)
{
if (this.StudentID < 86)
{
ScheduleBlock scheduleBlock21 = this.ScheduleBlocks[6];
scheduleBlock21.destination = "Meeting";
scheduleBlock21.action = "Meeting";
}
else
{
ScheduleBlock scheduleBlock22 = this.ScheduleBlocks[5];
scheduleBlock22.destination = "Meeting";
scheduleBlock22.action = "Meeting";
}
this.GetDestinations();
}
if (this.StudentID == 81 && StudentGlobals.GetStudentBroken(81))
{
this.Destinations[2] = this.StudentManager.BrokenSpot;
this.Destinations[4] = this.StudentManager.BrokenSpot;
this.Actions[2] = StudentActionType.Shamed;
this.Actions[4] = StudentActionType.Shamed;
}
}
this.UpdateAnimLayers();
if (!this.Male)
{
base.GetComponent<FLookAnimatorWEyes>().ObjectToFollow = this.Yandere.Head;
base.GetComponent<FLookAnimatorWEyes>().EyesTarget = this.Yandere.Head;
}
if (this.StudentID > 9 && this.StudentID < 21)
{
Debug.Log("Destroying a character who should not exist.");
UnityEngine.Object.Destroy(base.gameObject);
}
}
// Token: 0x060020A7 RID: 8359 RVA: 0x0015D550 File Offset: 0x0015B950
private float GetPerceptionPercent(float distance)
{
float num = Mathf.Clamp01(distance / this.VisionDistance);
return 1f - num * num;
}
// Token: 0x1700049D RID: 1181
// (get) Token: 0x060020A8 RID: 8360 RVA: 0x0015D574 File Offset: 0x0015B974
private SubtitleType LostPhoneSubtitleType
{
get
{
if (this.RivalPrefix == string.Empty)
{
return SubtitleType.LostPhone;
}
if (this.RivalPrefix == "Rival ")
{
return SubtitleType.RivalLostPhone;
}
throw new NotImplementedException("\"" + this.RivalPrefix + "\" case not implemented.");
}
}
// Token: 0x1700049E RID: 1182
// (get) Token: 0x060020A9 RID: 8361 RVA: 0x0015D5D0 File Offset: 0x0015B9D0
private SubtitleType PickpocketSubtitleType
{
get
{
if (this.RivalPrefix == string.Empty)
{
return SubtitleType.PickpocketReaction;
}
if (this.RivalPrefix == "Rival ")
{
return SubtitleType.RivalPickpocketReaction;
}
throw new NotImplementedException("\"" + this.RivalPrefix + "\" case not implemented.");
}
}
// Token: 0x1700049F RID: 1183
// (get) Token: 0x060020AA RID: 8362 RVA: 0x0015D630 File Offset: 0x0015BA30
private SubtitleType SplashSubtitleType
{
get
{
if (this.RivalPrefix == string.Empty)
{
if (!this.Male)
{
return SubtitleType.SplashReaction;
}
return SubtitleType.SplashReactionMale;
}
else
{
if (this.RivalPrefix == "Rival ")
{
return SubtitleType.RivalSplashReaction;
}
throw new NotImplementedException("\"" + this.RivalPrefix + "\" case not implemented.");
}
}
}
// Token: 0x170004A0 RID: 1184
// (get) Token: 0x060020AB RID: 8363 RVA: 0x0015D6A0 File Offset: 0x0015BAA0
public SubtitleType TaskLineResponseType
{
get
{
Debug.Log("Student#" + this.StudentID + " has been asked to display a subtitle about their task.");
if (this.StudentID == 6)
{
if (!false)
{
return SubtitleType.TaskGenericLine;
}
return SubtitleType.Task6Line;
}
else
{
if (this.StudentID == 8)
{
return SubtitleType.Task8Line;
}
if (this.StudentID == 11)
{
return SubtitleType.Task11Line;
}
if (this.StudentID == 13)
{
return SubtitleType.Task13Line;
}
if (this.StudentID == 14)
{
return SubtitleType.Task14Line;
}
if (this.StudentID == 15)
{
return SubtitleType.Task15Line;
}
if (this.StudentID == 25)
{
return SubtitleType.Task25Line;
}
if (this.StudentID == 28)
{
return SubtitleType.Task28Line;
}
if (this.StudentID == 30)
{
return SubtitleType.Task30Line;
}
if (this.StudentID == 36)
{
return SubtitleType.Task36Line;
}
if (this.StudentID == 37)
{
return SubtitleType.Task37Line;
}
if (this.StudentID == 38)
{
return SubtitleType.Task38Line;
}
if (this.StudentID == 52)
{
return SubtitleType.Task52Line;
}
if (this.StudentID == 76)
{
return SubtitleType.Task76Line;
}
if (this.StudentID == 77)
{
return SubtitleType.Task77Line;
}
if (this.StudentID == 78)
{
return SubtitleType.Task78Line;
}
if (this.StudentID == 79)
{
return SubtitleType.Task79Line;
}
if (this.StudentID == 80)
{
return SubtitleType.Task80Line;
}
if (this.StudentID == 81)
{
return SubtitleType.Task81Line;
}
return SubtitleType.TaskGenericLine;
}
}
}
// Token: 0x170004A1 RID: 1185
// (get) Token: 0x060020AC RID: 8364 RVA: 0x0015D848 File Offset: 0x0015BC48
public SubtitleType ClubInfoResponseType
{
get
{
if (GameGlobals.EmptyDemon)
{
return SubtitleType.ClubPlaceholderInfo;
}
if (this.Club == ClubType.Cooking)
{
return SubtitleType.ClubCookingInfo;
}
if (this.Club == ClubType.Drama)
{
return SubtitleType.ClubDramaInfo;
}
if (this.Club == ClubType.Occult)
{
return SubtitleType.ClubOccultInfo;
}
if (this.Club == ClubType.Art)
{
return SubtitleType.ClubArtInfo;
}
if (this.Club == ClubType.LightMusic)
{
return SubtitleType.ClubLightMusicInfo;
}
if (this.Club == ClubType.MartialArts)
{
return SubtitleType.ClubMartialArtsInfo;
}
if (this.Club == ClubType.Photography)
{
if (this.Sleuthing)
{
return SubtitleType.ClubPhotoInfoDark;
}
return SubtitleType.ClubPhotoInfoLight;
}
else
{
if (this.Club == ClubType.Science)
{
return SubtitleType.ClubScienceInfo;
}
if (this.Club == ClubType.Sports)
{
return SubtitleType.ClubSportsInfo;
}
if (this.Club == ClubType.Gardening)
{
return SubtitleType.ClubGardenInfo;
}
if (this.Club == ClubType.Gaming)
{
return SubtitleType.ClubGamingInfo;
}
if (this.Club == ClubType.Delinquent)
{
return SubtitleType.ClubDelinquentInfo;
}
return SubtitleType.ClubPlaceholderInfo;
}
}
}
// Token: 0x060020AD RID: 8365 RVA: 0x0015D92C File Offset: 0x0015BD2C
private bool PointIsInFOV(Vector3 point)
{
Vector3 position = this.Eyes.transform.position;
Vector3 to = point - position;
float num = 90f;
return Vector3.Angle(this.Head.transform.forward, to) <= num;
}
// Token: 0x060020AE RID: 8366 RVA: 0x0015D974 File Offset: 0x0015BD74
public bool CanSeeObject(GameObject obj, Vector3 targetPoint, int[] layers, int mask)
{
Vector3 position = this.Eyes.transform.position;
Vector3 vector = targetPoint - position;
bool flag = this.PointIsInFOV(targetPoint);
if (flag)
{
float num = this.VisionDistance * this.VisionDistance;
bool flag2 = vector.sqrMagnitude <= num;
if (flag2)
{
Debug.DrawLine(position, targetPoint, Color.green);
RaycastHit raycastHit;
bool flag3 = Physics.Linecast(position, targetPoint, out raycastHit, mask);
if (flag3)
{
foreach (int num2 in layers)
{
bool flag4 = raycastHit.collider.gameObject.layer == num2;
if (flag4)
{
return true;
}
}
}
}
}
return false;
}
// Token: 0x060020AF RID: 8367 RVA: 0x0015DA30 File Offset: 0x0015BE30
public bool CanSeeObject(GameObject obj, Vector3 targetPoint)
{
if (!this.Blind)
{
Debug.DrawLine(this.Eyes.position, targetPoint, Color.green);
Vector3 position = this.Eyes.transform.position;
Vector3 vector = targetPoint - position;
float num = this.VisionDistance * this.VisionDistance;
bool flag = this.PointIsInFOV(targetPoint);
bool flag2 = vector.sqrMagnitude <= num;
if (flag && flag2)
{
RaycastHit raycastHit;
bool flag3 = Physics.Linecast(position, targetPoint, out raycastHit, this.Mask);
if (flag3)
{
bool flag4 = raycastHit.collider.gameObject == obj;
if (flag4)
{
return true;
}
}
}
}
return false;
}
// Token: 0x060020B0 RID: 8368 RVA: 0x0015DAE4 File Offset: 0x0015BEE4
public bool CanSeeObject(GameObject obj)
{
return this.CanSeeObject(obj, obj.transform.position);
}
// Token: 0x060020B1 RID: 8369 RVA: 0x0015DAF8 File Offset: 0x0015BEF8
private void Update()
{
if (!this.Stop)
{
this.DistanceToPlayer = Vector3.Distance(base.transform.position, this.Yandere.transform.position);
if (this.Yandere.Egg && this.StudentID > 1)
{
if (this.DistanceToPlayer < 1f && this.Yandere.EbolaHair.activeInHierarchy)
{
UnityEngine.Object.Instantiate<GameObject>(this.Yandere.EbolaEffect, base.transform.position + Vector3.up, Quaternion.identity);
this.SpawnAlarmDisc();
this.BecomeRagdoll();
this.DeathType = DeathType.EasterEgg;
}
if (this.DistanceToPlayer < 5f && this.Yandere.Hunger >= 5)
{
UnityEngine.Object.Instantiate<GameObject>(this.Yandere.DarkHelix, base.transform.position + Vector3.up, Quaternion.identity);
this.SpawnAlarmDisc();
this.BecomeRagdoll();
this.DeathType = DeathType.EasterEgg;
}
}
this.UpdateRoutine();
this.UpdateDetectionMarker();
if (this.Dying)
{
this.UpdateDying();
if (this.Burning)
{
this.UpdateBurning();
}
}
else
{
if (this.DistanceToPlayer <= 2f)
{
this.UpdateTalkInput();
}
this.UpdateVision();
if (this.Pushed)
{
this.UpdatePushed();
}
else if (this.Drowned)
{
this.UpdateDrowned();
}
else if (this.WitnessedMurder)
{
this.UpdateWitnessedMurder();
}
else if (this.Alarmed)
{
this.UpdateAlarmed();
}
else if (this.TurnOffRadio)
{
this.UpdateTurningOffRadio();
}
else if (this.Confessing)
{
this.UpdateConfessing();
}
else if (this.Vomiting)
{
this.UpdateVomiting();
}
else if (this.Splashed)
{
this.UpdateSplashed();
}
}
this.UpdateMisc();
}
else
{
if (this.StudentManager.Pose)
{
if (this.Prompt.Circle[0].fillAmount == 0f)
{
this.Pose();
}
}
else if (!this.ClubActivity)
{
if (!this.Yandere.Talking)
{
if (this.Yandere.Sprayed)
{
this.CharacterAnimation.CrossFade(this.ScaredAnim);
}
if (this.Yandere.Noticed || this.StudentManager.YandereDying)
{
this.targetRotation = Quaternion.LookRotation(new Vector3(this.Yandere.Hips.transform.position.x, base.transform.position.y, this.Yandere.Hips.transform.position.z) - base.transform.position);
base.transform.rotation = Quaternion.Slerp(base.transform.rotation, this.targetRotation, 10f * Time.deltaTime);
}
}
}
else if (this.Police.Darkness.color.a < 1f)
{
if (this.Club == ClubType.Cooking)
{
this.CharacterAnimation[this.SocialSitAnim].layer = 99;
this.CharacterAnimation.Play(this.SocialSitAnim);
this.CharacterAnimation[this.SocialSitAnim].weight = 1f;
this.SmartPhone.SetActive(false);
this.SpeechLines.Play();
this.CharacterAnimation.CrossFade(this.RandomAnim);
if (this.CharacterAnimation[this.RandomAnim].time >= this.CharacterAnimation[this.RandomAnim].length)
{
this.PickRandomAnim();
}
}
else if (this.Club == ClubType.MartialArts)
{
this.CharacterAnimation.Play(this.ActivityAnim);
AudioSource component = base.GetComponent<AudioSource>();
if (!this.Male)
{
if (this.CharacterAnimation["f02_kick_23"].time > 1f)
{
if (!this.PlayingAudio)
{
component.clip = this.FemaleAttacks[UnityEngine.Random.Range(0, this.FemaleAttacks.Length)];
component.Play();
this.PlayingAudio = true;
}
if (this.CharacterAnimation["f02_kick_23"].time >= this.CharacterAnimation["f02_kick_23"].length)
{
this.CharacterAnimation["f02_kick_23"].time = 0f;
this.PlayingAudio = false;
}
}
}
else if (this.CharacterAnimation["kick_24"].time > 1f)
{
if (!this.PlayingAudio)
{
component.clip = this.MaleAttacks[UnityEngine.Random.Range(0, this.MaleAttacks.Length)];
component.Play();
this.PlayingAudio = true;
}
if (this.CharacterAnimation["kick_24"].time >= this.CharacterAnimation["kick_24"].length)
{
this.CharacterAnimation["kick_24"].time = 0f;
this.PlayingAudio = false;
}
}
}
else if (this.Club == ClubType.Drama)
{
this.Stop = false;
}
else if (this.Club == ClubType.Photography)
{
this.CharacterAnimation.CrossFade(this.RandomSleuthAnim);
if (this.CharacterAnimation[this.RandomSleuthAnim].time >= this.CharacterAnimation[this.RandomSleuthAnim].length)
{
this.PickRandomSleuthAnim();
}
}
else if (this.Club == ClubType.Art)
{
this.CharacterAnimation.Play(this.ActivityAnim);
this.Paintbrush.SetActive(true);
this.Palette.SetActive(true);
}
else if (this.Club == ClubType.Science)
{
this.CharacterAnimation.Play(this.ClubAnim);
if (this.StudentID == 62)
{
this.ScienceProps[0].SetActive(true);
}
else if (this.StudentID == 63)
{
this.ScienceProps[1].SetActive(true);
this.ScienceProps[2].SetActive(true);
}
else if (this.StudentID == 64)
{
this.ScienceProps[0].SetActive(true);
}
}
else if (this.Club == ClubType.Sports)
{
this.Stop = false;
}
else if (this.Club == ClubType.Gardening)
{
this.CharacterAnimation.Play(this.ClubAnim);
this.Stop = false;
}
else if (this.Club == ClubType.Gaming)
{
this.CharacterAnimation.CrossFade(this.ClubAnim);
}
}
this.Alarm = Mathf.MoveTowards(this.Alarm, 0f, Time.deltaTime);
this.UpdateDetectionMarker();
}
if (this.AoT)
{
base.transform.localScale = Vector3.Lerp(base.transform.localScale, new Vector3(10f, 10f, 10f), Time.deltaTime);
}
if (this.Prompt.Label[0] != null)
{
if (this.StudentManager.Pose)
{
this.Prompt.Label[0].text = " Pose";
}
else if (this.BadTime)
{
this.Prompt.Label[0].text = " Psychokinesis";
}
}
}
// Token: 0x060020B2 RID: 8370 RVA: 0x0015E304 File Offset: 0x0015C704
private void UpdateRoutine()
{
if (this.Routine)
{
if (this.CurrentDestination != null)
{
this.DistanceToDestination = Vector3.Distance(base.transform.position, this.CurrentDestination.position);
}
if (this.StalkerFleeing)
{
if (this.Actions[this.Phase] == StudentActionType.Stalk && this.DistanceToPlayer > 10f)
{
this.Pathfinding.target = this.Yandere.transform;
this.CurrentDestination = this.Yandere.transform;
this.StalkerFleeing = false;
this.Pathfinding.speed = 1f;
}
}
else if (this.Actions[this.Phase] == StudentActionType.Stalk)
{
this.TargetDistance = 10f;
if (this.DistanceToPlayer > 20f)
{
Debug.Log("Sprinting 1");
this.Pathfinding.speed = 4f;
}
else if (this.DistanceToPlayer < 10f)
{
this.Pathfinding.speed = 1f;
}
}
if (!this.Indoors)
{
if (this.Hurry && !this.Tripped && base.transform.position.z > -50.5f && base.transform.position.x < 6f)
{
this.CharacterAnimation.CrossFade("trip_00");
this.Pathfinding.canSearch = false;
this.Pathfinding.canMove = false;
this.Tripping = true;
this.Routine = false;
}
if (this.Paired)
{
if (base.transform.position.z < -50f)
{
if (base.transform.localEulerAngles != Vector3.zero)
{
base.transform.localEulerAngles = Vector3.zero;
}
this.MyController.Move(base.transform.forward * Time.deltaTime);
if (this.StudentID == 81)
{
this.MusumeTimer += Time.deltaTime;
if (this.MusumeTimer > 5f)
{
this.MusumeTimer = 0f;
this.MusumeRight = !this.MusumeRight;
this.WalkAnim = ((!this.MusumeRight) ? "f02_walkTalk_01" : "f02_walkTalk_00");
}
}
}
else
{
if (this.Persona == PersonaType.PhoneAddict)
{
this.SpeechLines.Stop();
this.SmartPhone.SetActive(true);
}
this.Pathfinding.canSearch = true;
this.Pathfinding.canMove = true;
this.StopPairing();
}
}
if (this.Phase == 0)
{
if (this.DistanceToDestination < 1f)
{
this.CurrentDestination = this.MyLocker;
this.Pathfinding.target = this.MyLocker;
this.Phase++;
}
}
else if (this.DistanceToDestination < 0.5f && !this.ShoeRemoval.enabled)
{
if (this.Shy)
{
this.CharacterAnimation[this.ShyAnim].weight = 0.5f;
}
this.SmartPhone.SetActive(false);
this.Pathfinding.canSearch = false;
this.Pathfinding.canMove = false;
this.ShoeRemoval.StartChangingShoes();
this.ShoeRemoval.enabled = true;
this.CanTalk = false;
this.Routine = false;
}
}
else if (this.Phase < this.ScheduleBlocks.Length - 1)
{
if (this.Clock.HourTime >= this.ScheduleBlocks[this.Phase].time && !this.InEvent && !this.Meeting && this.ClubActivityPhase < 16)
{
this.MyRenderer.updateWhenOffscreen = false;
this.SprintAnim = this.OriginalSprintAnim;
if (this.Headache)
{
this.SprintAnim = this.OriginalSprintAnim;
this.WalkAnim = this.OriginalWalkAnim;
}
this.Headache = false;
this.Sedated = false;
this.Hurry = false;
this.Phase++;
if (this.Drownable)
{
this.Drownable = false;
this.StudentManager.UpdateMe(this.StudentID);
}
if (this.StudentID == 1)
{
}
if (this.StudentID == 11)
{
}
if (this.Schoolwear > 1 && this.Destinations[this.Phase] == this.MyLocker)
{
this.Phase++;
}
if (this.Actions[this.Phase] == StudentActionType.Graffiti && !this.StudentManager.Bully)
{
ScheduleBlock scheduleBlock = this.ScheduleBlocks[2];
scheduleBlock.destination = "Patrol";
scheduleBlock.action = "Patrol";
this.GetDestinations();
}
if (!this.StudentManager.ReactedToGameLeader && this.Actions[this.Phase] == StudentActionType.Bully && !this.StudentManager.Bully)
{
ScheduleBlock scheduleBlock2 = this.ScheduleBlocks[4];
scheduleBlock2.destination = "Sunbathe";
scheduleBlock2.action = "Sunbathe";
this.GetDestinations();
}
if (this.Sedated)
{
this.SprintAnim = this.OriginalSprintAnim;
this.Sedated = false;
}
this.CurrentAction = this.Actions[this.Phase];
this.CurrentDestination = this.Destinations[this.Phase];
this.Pathfinding.target = this.Destinations[this.Phase];
if ((this.StudentID == 30 && this.StudentManager.DatingMinigame.Affection == 100f) || (this.StudentID == this.StudentManager.RivalID && DateGlobals.Weekday == DayOfWeek.Friday && !this.InCouple))
{
if (this.StudentID == this.StudentManager.RivalID && DateGlobals.Weekday == DayOfWeek.Friday)
{
Debug.Log("This is the part where Osana should go put a note in Senpai's locker.");
}
if (this.Actions[this.Phase] == StudentActionType.ChangeShoes)
{
if (this.StudentID == 30)
{
this.CurrentDestination = this.StudentManager.SuitorLocker;
this.Pathfinding.target = this.StudentManager.SuitorLocker;
}
else
{
this.CurrentDestination = this.StudentManager.SenpaiLocker;
this.Pathfinding.target = this.StudentManager.SenpaiLocker;
}
this.Confessing = true;
this.Routine = false;
this.CanTalk = false;
}
}
if (this.CurrentDestination != null)
{
this.DistanceToDestination = Vector3.Distance(base.transform.position, this.CurrentDestination.position);
}
if (this.Bento != null && this.Bento.activeInHierarchy)
{
this.Bento.SetActive(false);
this.Chopsticks[0].SetActive(false);
this.Chopsticks[1].SetActive(false);
}
if (this.Male)
{
this.Cosmetic.MyRenderer.materials[this.Cosmetic.FaceID].SetFloat("_BlendAmount", 0f);
this.PinkSeifuku.SetActive(false);
}
else
{
this.HorudaCollider.gameObject.SetActive(false);
}
if (this.StudentID == 81)
{
this.Cigarette.SetActive(false);
this.Lighter.SetActive(false);
}
if (!this.Paired)
{
this.Pathfinding.canSearch = true;
this.Pathfinding.canMove = true;
}
if (this.Persona != PersonaType.PhoneAddict && !this.Sleuthing)
{
this.SmartPhone.SetActive(false);
}
else if (!this.Slave)
{
this.IdleAnim = this.PhoneAnims[0];
this.SmartPhone.SetActive(true);
}
this.Paintbrush.SetActive(false);
this.Sketchbook.SetActive(false);
this.Palette.SetActive(false);
this.Pencil.SetActive(false);
this.OccultBook.SetActive(false);
this.Scrubber.SetActive(false);
this.Eraser.SetActive(false);
this.Pen.SetActive(false);
foreach (GameObject gameObject in this.ScienceProps)
{
if (gameObject != null)
{
gameObject.SetActive(false);
}
}
foreach (GameObject gameObject2 in this.Fingerfood)
{
if (gameObject2 != null)
{
gameObject2.SetActive(false);
}
}
this.SpeechLines.Stop();
this.GoAway = false;
this.ReadPhase = 0;
this.PatrolID = 0;
if (this.Actions[this.Phase] == StudentActionType.Clean)
{
this.EquipCleaningItems();
}
else if (!this.Slave)
{
if (this.Persona == PersonaType.PhoneAddict)
{
this.SmartPhone.transform.localPosition = new Vector3(0.01f, 0.005f, 0.01f);
this.SmartPhone.transform.localEulerAngles = new Vector3(0f, -160f, 165f);
this.WalkAnim = this.PhoneAnims[1];
}
else if (this.Sleuthing)
{
this.WalkAnim = this.SleuthWalkAnim;
}
}
if (this.Actions[this.Phase] == StudentActionType.Sleuth && this.StudentManager.SleuthPhase == 3)
{
this.GetSleuthTarget();
}
if (this.Actions[this.Phase] == StudentActionType.Stalk)
{
this.TargetDistance = 10f;
}
else if (this.Actions[this.Phase] == StudentActionType.Follow)
{
this.TargetDistance = 1f;
}
else if (this.Actions[this.Phase] != StudentActionType.SitAndEatBento)
{
this.TargetDistance = 0.5f;
}
if (this.Club == ClubType.Gardening && this.StudentID != 71)
{
this.WateringCan.transform.parent = this.Hips;
this.WateringCan.transform.localPosition = new Vector3(0f, 0.0135f, -0.184f);
this.WateringCan.transform.localEulerAngles = new Vector3(0f, 90f, 30f);
if (this.Clock.Period == 6)
{
this.StudentManager.Patrols.List[this.StudentID] = this.StudentManager.GardeningPatrols[this.StudentID - 71];
this.ClubAnim = "f02_waterPlantLow_00";
this.CurrentDestination = this.StudentManager.Patrols.List[this.StudentID].GetChild(this.PatrolID);
this.Pathfinding.target = this.CurrentDestination;
}
}
if (this.Club == ClubType.LightMusic)
{
if (this.StudentID == 51)
{
if (this.InstrumentBag[this.ClubMemberID].transform.parent == null)
{
this.Instruments[this.ClubMemberID].GetComponent<AudioSource>().playOnAwake = false;
this.Instruments[this.ClubMemberID].GetComponent<AudioSource>().Stop();
this.Instruments[this.ClubMemberID].transform.parent = null;
this.Instruments[this.ClubMemberID].transform.position = new Vector3(-0.5f, 4.5f, 22.45666f);
this.Instruments[this.ClubMemberID].transform.eulerAngles = new Vector3(-15f, 0f, 0f);
}
else
{
this.Instruments[this.ClubMemberID].SetActive(false);
}
}
else
{
this.Instruments[this.ClubMemberID].SetActive(false);
}
this.Drumsticks[0].SetActive(false);
this.Drumsticks[1].SetActive(false);
this.AirGuitar.Stop();
}
if (this.Phase == 8 && this.StudentID == 36)
{
this.StudentManager.Clubs.List[this.StudentID].position = this.StudentManager.Clubs.List[71].position;
this.StudentManager.Clubs.List[this.StudentID].rotation = this.StudentManager.Clubs.List[71].rotation;
this.ClubAnim = this.GameAnim;
}
if (this.MyPlate != null && this.MyPlate.parent == this.RightHand)
{
this.CurrentDestination = this.StudentManager.Clubs.List[this.StudentID];
this.Pathfinding.target = this.StudentManager.Clubs.List[this.StudentID];
}
if (this.Persona == PersonaType.Sleuth)
{
if (this.Male)
{
this.SmartPhone.transform.localPosition = new Vector3(0.06f, -0.02f, -0.02f);
}
else
{
this.SmartPhone.transform.localPosition = new Vector3(0.033333f, -0.015f, -0.015f);
}
this.SmartPhone.transform.localEulerAngles = new Vector3(12.5f, 120f, 180f);
}
}
if (!this.Teacher && this.Club != ClubType.Delinquent && (this.Clock.Period == 2 || this.Clock.Period == 4) && this.ClubActivityPhase < 16)
{
this.Pathfinding.speed = 4f;
}
}
if (this.MeetTime > 0f && this.Clock.HourTime > this.MeetTime)
{
Debug.Log("Sprinting 3");
this.CurrentDestination = this.MeetSpot;
this.Pathfinding.target = this.MeetSpot;
this.DistanceToDestination = Vector3.Distance(base.transform.position, this.CurrentDestination.position);
this.Pathfinding.canSearch = true;
this.Pathfinding.canMove = true;
this.Pathfinding.speed = 4f;
this.SpeechLines.Stop();
this.Meeting = true;
this.MeetTime = 0f;
}
if (this.DistanceToDestination > this.TargetDistance)
{
if (this.CurrentDestination == null && this.Actions[this.Phase] == StudentActionType.Sleuth)
{
this.GetSleuthTarget();
}
if (this.Actions[this.Phase] == StudentActionType.Follow)
{
if (this.FollowTarget.Wet && this.FollowTarget.DistanceToDestination < 5f)
{
Debug.Log("Raibaru shouldn't get too close.");
this.TargetDistance = 5f;
}
else
{
this.TargetDistance = 1f;
}
if (this.DistanceToDestination > 2f && !this.Calm)
{
this.Pathfinding.speed = 5f;
this.SpeechLines.Stop();
}
else
{
this.Pathfinding.speed = 1f;
this.SpeechLines.Stop();
}
}
if (this.CuriosityPhase == 1 && this.Actions[this.Phase] == StudentActionType.Relax && this.StudentManager.Students[this.Crush].Private)
{
this.Pathfinding.target = this.Destinations[this.Phase];
this.CurrentDestination = this.Destinations[this.Phase];
this.TargetDistance = 0.5f;
this.CuriosityTimer = 0f;
this.CuriosityPhase--;
}
if (this.Actions[this.Phase] != StudentActionType.Follow || (this.Actions[this.Phase] == StudentActionType.Follow && this.DistanceToDestination > this.TargetDistance + 0.1f))
{
if (((this.Clock.Period == 1 && this.Clock.HourTime > 8.483334f) || (this.Clock.Period == 3 && this.Clock.HourTime > 13.483334f)) && !this.Teacher)
{
Debug.Log("Sprinting 4");
this.Pathfinding.speed = 4f;
}
if (!this.InEvent && !this.Meeting && !this.GoAway)
{
if (this.DressCode)
{
if (this.Actions[this.Phase] == StudentActionType.ClubAction)
{
if (!this.ClubAttire)
{
if (!this.ChangingBooth.Occupied)
{
this.CurrentDestination = this.ChangingBooth.transform;
this.Pathfinding.target = this.ChangingBooth.transform;
}
else
{
this.CurrentDestination = this.ChangingBooth.WaitSpots[this.ClubMemberID];
this.Pathfinding.target = this.ChangingBooth.WaitSpots[this.ClubMemberID];
}
}
else if (this.Indoors && !this.GoAway)
{
this.CurrentDestination = this.Destinations[this.Phase];
this.Pathfinding.target = this.Destinations[this.Phase];
this.DistanceToDestination = 100f;
}
}
else if (this.ClubAttire)
{
if (!this.ChangingBooth.Occupied)
{
this.CurrentDestination = this.ChangingBooth.transform;
this.Pathfinding.target = this.ChangingBooth.transform;
}
else
{
this.CurrentDestination = this.ChangingBooth.WaitSpots[this.ClubMemberID];
this.Pathfinding.target = this.ChangingBooth.WaitSpots[this.ClubMemberID];
}
}
else if (this.Indoors && this.Actions[this.Phase] != StudentActionType.Clean && this.Actions[this.Phase] != StudentActionType.Sketch)
{
this.CurrentDestination = this.Destinations[this.Phase];
this.Pathfinding.target = this.Destinations[this.Phase];
}
}
else if (this.Actions[this.Phase] == StudentActionType.SitAndTakeNotes && this.Schoolwear > 1 && !this.SchoolwearUnavailable)
{
this.CurrentDestination = this.StudentManager.FemaleStripSpot;
this.Pathfinding.target = this.StudentManager.FemaleStripSpot;
}
}
if (!this.Pathfinding.canMove)
{
if (!this.Spawned)
{
base.transform.position = this.StudentManager.SpawnPositions[this.StudentID].position;
this.Spawned = true;
if (this.StudentID == 10 && this.StudentManager.Students[11] == null)
{
base.transform.position = new Vector3(-4f, 0f, -96f);
Physics.SyncTransforms();
}
}
if (!this.Paired && !this.Alarmed)
{
this.Pathfinding.canSearch = true;
this.Pathfinding.canMove = true;
this.Obstacle.enabled = false;
}
}
if (this.Pathfinding.speed > 0f)
{
if (this.Pathfinding.speed == 1f)
{
if (!this.CharacterAnimation.IsPlaying(this.WalkAnim))
{
if (this.Persona == PersonaType.PhoneAddict && this.Actions[this.Phase] == StudentActionType.Clean)
{
this.CharacterAnimation.CrossFade(this.OriginalWalkAnim);
}
else
{
this.CharacterAnimation.CrossFade(this.WalkAnim);
}
}
}
else if (!this.Dying)
{
this.CharacterAnimation.CrossFade(this.SprintAnim);
}
}
if (this.Club == ClubType.Occult && this.Actions[this.Phase] != StudentActionType.ClubAction)
{
this.OccultBook.SetActive(false);
}
if (!this.Meeting && !this.GoAway && !this.InEvent)
{
if (this.Actions[this.Phase] == StudentActionType.Clean)
{
if (this.SmartPhone.activeInHierarchy)
{
this.SmartPhone.SetActive(false);
}
if (this.CurrentDestination != this.CleaningSpot.GetChild(this.CleanID))
{
this.CurrentDestination = this.CleaningSpot.GetChild(this.CleanID);
this.Pathfinding.target = this.CurrentDestination;
}
}
if (this.Actions[this.Phase] == StudentActionType.Patrol && this.CurrentDestination != this.StudentManager.Patrols.List[this.StudentID].GetChild(this.PatrolID))
{
this.CurrentDestination = this.StudentManager.Patrols.List[this.StudentID].GetChild(this.PatrolID);
this.Pathfinding.target = this.CurrentDestination;
}
}
}
}
else
{
if (this.CurrentDestination != null)
{
bool flag = false;
if ((this.Actions[this.Phase] == StudentActionType.Sleuth && this.StudentManager.SleuthPhase == 3) || this.Actions[this.Phase] == StudentActionType.Stalk || (this.Actions[this.Phase] == StudentActionType.Relax && this.CuriosityPhase == 1))
{
flag = true;
}
if (this.Actions[this.Phase] == StudentActionType.Follow)
{
this.FollowTargetDistance = Vector3.Distance(this.FollowTarget.transform.position, this.StudentManager.Hangouts.List[this.StudentID].transform.position);
if (this.FollowTargetDistance < 1.1f && !this.FollowTarget.Alone)
{
this.MoveTowardsTarget(this.StudentManager.Hangouts.List[this.StudentID].position);
float num = Quaternion.Angle(base.transform.rotation, this.StudentManager.Hangouts.List[this.StudentID].rotation);
if (num > 1f && !this.StopRotating)
{
base.transform.rotation = Quaternion.Slerp(base.transform.rotation, this.StudentManager.Hangouts.List[this.StudentID].rotation, 10f * Time.deltaTime);
}
}
else if (!this.ManualRotation)
{
this.targetRotation = Quaternion.LookRotation(this.FollowTarget.transform.position - base.transform.position);
base.transform.rotation = Quaternion.Slerp(base.transform.rotation, this.targetRotation, 10f * Time.deltaTime);
}
}
else if (!flag)
{
this.MoveTowardsTarget(this.CurrentDestination.position);
float num2 = Quaternion.Angle(base.transform.rotation, this.CurrentDestination.rotation);
if (num2 > 1f && !this.StopRotating)
{
base.transform.rotation = Quaternion.Slerp(base.transform.rotation, this.CurrentDestination.rotation, 10f * Time.deltaTime);
}
}
else
{
if (this.Actions[this.Phase] == StudentActionType.Sleuth || this.Actions[this.Phase] == StudentActionType.Stalk)
{
this.targetRotation = Quaternion.LookRotation(this.SleuthTarget.position - base.transform.position);
}
else if (this.Crush > 0)
{
this.targetRotation = Quaternion.LookRotation(new Vector3(this.StudentManager.Students[this.Crush].transform.position.x, base.transform.position.y, this.StudentManager.Students[this.Crush].transform.position.z) - base.transform.position);
}
float num3 = Quaternion.Angle(base.transform.rotation, this.targetRotation);
base.transform.rotation = Quaternion.Slerp(base.transform.rotation, this.targetRotation, 10f * Time.deltaTime);
if (num3 > 1f)
{
base.transform.rotation = Quaternion.Slerp(base.transform.rotation, this.targetRotation, 10f * Time.deltaTime);
}
}
if (!this.Hurry)
{
this.Pathfinding.speed = 1f;
}
else
{
Debug.Log("Sprinting 5");
this.Pathfinding.speed = 4f;
}
}
if (this.Pathfinding.canMove)
{
this.Pathfinding.canSearch = false;
this.Pathfinding.canMove = false;
if (this.Actions[this.Phase] != StudentActionType.Clean)
{
this.Obstacle.enabled = true;
}
}
if (!this.InEvent && !this.Meeting && this.DressCode)
{
if (this.Actions[this.Phase] == StudentActionType.ClubAction)
{
if (!this.ClubAttire)
{
if (!this.ChangingBooth.Occupied)
{
if (this.CurrentDestination == this.ChangingBooth.transform)
{
this.ChangingBooth.Occupied = true;
this.ChangingBooth.Student = this;
this.ChangingBooth.CheckYandereClub();
this.Obstacle.enabled = false;
}
this.CurrentDestination = this.ChangingBooth.transform;
this.Pathfinding.target = this.ChangingBooth.transform;
}
else
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
}
else if (!this.GoAway)
{
this.CurrentDestination = this.Destinations[this.Phase];
this.Pathfinding.target = this.Destinations[this.Phase];
}
}
else if (this.ClubAttire)
{
if (!this.ChangingBooth.Occupied)
{
if (this.CurrentDestination == this.ChangingBooth.transform)
{
this.ChangingBooth.Occupied = true;
this.ChangingBooth.Student = this;
this.ChangingBooth.CheckYandereClub();
}
this.CurrentDestination = this.ChangingBooth.transform;
this.Pathfinding.target = this.ChangingBooth.transform;
}
else
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
}
else if (this.Actions[this.Phase] != StudentActionType.Clean)
{
this.CurrentDestination = this.Destinations[this.Phase];
this.Pathfinding.target = this.Destinations[this.Phase];
}
}
if (!this.InEvent)
{
if (!this.Meeting)
{
if (!this.GoAway)
{
if (this.Actions[this.Phase] == StudentActionType.AtLocker)
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
this.Pathfinding.canSearch = false;
this.Pathfinding.canMove = false;
}
else if (this.Actions[this.Phase] == StudentActionType.Socializing || (this.Actions[this.Phase] == StudentActionType.Follow && this.FollowTargetDistance < 1f && !this.FollowTarget.Alone && !this.FollowTarget.InEvent && !this.FollowTarget.Talking))
{
if (this.MyPlate != null && this.MyPlate.parent == this.RightHand)
{
this.MyPlate.parent = null;
this.MyPlate.position = this.OriginalPlatePosition;
this.MyPlate.rotation = this.OriginalPlateRotation;
this.IdleAnim = this.OriginalIdleAnim;
this.WalkAnim = this.OriginalWalkAnim;
this.LeanAnim = this.OriginalLeanAnim;
this.ResumeDistracting = false;
this.Distracting = false;
this.Distracted = false;
this.CanTalk = true;
}
if (this.Paranoia > 1.66666f && !this.StudentManager.LoveSick && this.Club != ClubType.Delinquent)
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
else
{
this.StudentManager.ConvoManager.CheckMe(this.StudentID);
if (this.Club == ClubType.Delinquent)
{
if (this.Alone)
{
if (this.TrueAlone)
{
if (!this.SmartPhone.activeInHierarchy)
{
this.CharacterAnimation.CrossFade("delinquentTexting_00");
this.SmartPhone.SetActive(true);
this.SpeechLines.Stop();
}
}
else
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
this.SpeechLines.Stop();
}
}
else
{
if (!this.InEvent)
{
if (!this.Grudge)
{
if (!this.SpeechLines.isPlaying)
{
this.SmartPhone.SetActive(false);
this.SpeechLines.Play();
}
}
else
{
this.SmartPhone.SetActive(false);
}
}
this.CharacterAnimation.CrossFade(this.RandomAnim);
if (this.CharacterAnimation[this.RandomAnim].time >= this.CharacterAnimation[this.RandomAnim].length)
{
this.PickRandomAnim();
}
}
}
else if (this.Alone)
{
if (!this.Male)
{
this.CharacterAnimation.CrossFade("f02_standTexting_00");
}
else if (this.StudentID == 36)
{
this.CharacterAnimation.CrossFade(this.ClubAnim);
}
else if (this.StudentID == 66)
{
this.CharacterAnimation.CrossFade("delinquentTexting_00");
}
else
{
this.CharacterAnimation.CrossFade("standTexting_00");
}
if (!this.SmartPhone.activeInHierarchy && !this.Shy)
{
if (this.StudentID == 36)
{
this.SmartPhone.transform.localPosition = new Vector3(0.0566666f, -0.02f, 0f);
this.SmartPhone.transform.localEulerAngles = new Vector3(10f, 115f, 180f);
}
else
{
this.SmartPhone.transform.localPosition = new Vector3(0.015f, 0.01f, 0.025f);
this.SmartPhone.transform.localEulerAngles = new Vector3(10f, -160f, 165f);
}
this.SmartPhone.SetActive(true);
this.SpeechLines.Stop();
}
}
else
{
if (!this.InEvent)
{
if (!this.Grudge)
{
if (!this.SpeechLines.isPlaying)
{
this.SmartPhone.SetActive(false);
this.SpeechLines.Play();
}
}
else
{
this.SmartPhone.SetActive(false);
}
}
if (this.Club != ClubType.Photography)
{
this.CharacterAnimation.CrossFade(this.RandomAnim);
if (this.CharacterAnimation[this.RandomAnim].time >= this.CharacterAnimation[this.RandomAnim].length)
{
this.PickRandomAnim();
}
}
else
{
this.CharacterAnimation.CrossFade(this.RandomSleuthAnim);
if (this.CharacterAnimation[this.RandomSleuthAnim].time >= this.CharacterAnimation[this.RandomSleuthAnim].length)
{
this.PickRandomSleuthAnim();
}
}
}
}
}
else if (this.Actions[this.Phase] == StudentActionType.Gossip)
{
if (this.Paranoia > 1.66666f && !this.StudentManager.LoveSick)
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
else
{
this.StudentManager.ConvoManager.CheckMe(this.StudentID);
if (this.Alone)
{
if (!this.Shy)
{
this.CharacterAnimation.CrossFade("f02_standTexting_00");
if (!this.SmartPhone.activeInHierarchy)
{
this.SmartPhone.SetActive(true);
this.SpeechLines.Stop();
}
}
}
else
{
if (!this.SpeechLines.isPlaying)
{
this.SmartPhone.SetActive(false);
this.SpeechLines.Play();
}
this.CharacterAnimation.CrossFade(this.RandomGossipAnim);
if (this.CharacterAnimation[this.RandomGossipAnim].time >= this.CharacterAnimation[this.RandomGossipAnim].length)
{
this.PickRandomGossipAnim();
}
}
}
}
else if (this.Actions[this.Phase] == StudentActionType.Gaming)
{
this.CharacterAnimation.CrossFade(this.GameAnim);
}
else if (this.Actions[this.Phase] == StudentActionType.Shamed)
{
this.CharacterAnimation.CrossFade(this.SadSitAnim);
}
else if (this.Actions[this.Phase] == StudentActionType.Slave)
{
this.CharacterAnimation.CrossFade(this.BrokenSitAnim);
if (this.FragileSlave)
{
if (this.HuntTarget == null)
{
this.HuntTarget = this;
this.GoCommitMurder();
}
else if (this.HuntTarget.Indoors)
{
this.GoCommitMurder();
}
}
}
else if (this.Actions[this.Phase] == StudentActionType.Relax)
{
if (this.CuriosityPhase == 0)
{
this.CharacterAnimation.CrossFade(this.RelaxAnim);
if (this.Curious)
{
this.CuriosityTimer += Time.deltaTime;
if (this.CuriosityTimer > 30f)
{
if (!this.StudentManager.Students[this.Crush].Private)
{
this.Pathfinding.target = this.StudentManager.Students[this.Crush].transform;
this.CurrentDestination = this.StudentManager.Students[this.Crush].transform;
this.TargetDistance = 5f;
this.CuriosityTimer = 0f;
this.CuriosityPhase++;
}
else
{
this.CuriosityTimer = 0f;
}
}
}
}
else
{
this.CharacterAnimation.CrossFade(this.LeanAnim);
this.CuriosityTimer += Time.deltaTime;
if (this.CuriosityTimer > 10f)
{
this.Pathfinding.target = this.Destinations[this.Phase];
this.CurrentDestination = this.Destinations[this.Phase];
this.TargetDistance = 0.5f;
this.CuriosityTimer = 0f;
this.CuriosityPhase--;
}
}
}
else if (this.Actions[this.Phase] == StudentActionType.SitAndTakeNotes)
{
if (this.MyPlate != null && this.MyPlate.parent == this.RightHand)
{
this.MyPlate.parent = null;
this.MyPlate.position = this.OriginalPlatePosition;
this.MyPlate.rotation = this.OriginalPlateRotation;
this.CurrentDestination = this.Destinations[this.Phase];
this.Pathfinding.target = this.Destinations[this.Phase];
this.IdleAnim = this.OriginalIdleAnim;
this.WalkAnim = this.OriginalWalkAnim;
this.LeanAnim = this.OriginalLeanAnim;
this.ResumeDistracting = false;
this.Distracting = false;
this.Distracted = false;
this.CanTalk = true;
}
if (this.MustChangeClothing)
{
if (this.ChangeClothingPhase == 0)
{
if (this.StudentManager.CommunalLocker.Student == null)
{
this.StudentManager.CommunalLocker.Open = true;
this.StudentManager.CommunalLocker.Student = this;
this.StudentManager.CommunalLocker.SpawnSteam();
this.Schoolwear = 1;
this.ChangeClothingPhase++;
}
else
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
}
else if (this.ChangeClothingPhase == 1 && !this.StudentManager.CommunalLocker.SteamCountdown)
{
this.Pathfinding.target = this.Seat;
this.CurrentDestination = this.Seat;
this.StudentManager.CommunalLocker.Student = null;
this.ChangeClothingPhase++;
this.MustChangeClothing = false;
}
}
else if (this.Bullied)
{
if (this.SmartPhone.activeInHierarchy)
{
this.SmartPhone.SetActive(false);
}
this.CharacterAnimation.CrossFade(this.SadDeskSitAnim, 1f);
}
else
{
if (this.Rival && this.Phoneless && this.StudentManager.CommunalLocker.RivalPhone.gameObject.activeInHierarchy && !this.EndSearch && this.Yandere.CanMove)
{
this.CharacterAnimation.CrossFade(this.DiscoverPhoneAnim);
this.Subtitle.UpdateLabel(this.LostPhoneSubtitleType, 2, 5f);
this.EndSearch = true;
this.Routine = false;
}
if (!this.EndSearch)
{
if (this.Clock.Period != 2 && this.Clock.Period != 4)
{
if (this.DressCode && this.ClubAttire)
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
else if ((double)Vector3.Distance(base.transform.position, this.Seat.position) < 0.5)
{
if (!this.Phoneless)
{
if (this.StudentID == 1 && this.StudentManager.Gift.activeInHierarchy)
{
this.CharacterAnimation.CrossFade(this.InspectBloodAnim);
if (this.CharacterAnimation[this.InspectBloodAnim].time >= this.CharacterAnimation[this.InspectBloodAnim].length)
{
this.StudentManager.Gift.SetActive(false);
}
}
else if (this.Club != ClubType.Delinquent)
{
if (!this.SmartPhone.activeInHierarchy)
{
if (this.Male)
{
this.SmartPhone.transform.localPosition = new Vector3(0.025f, 0.0025f, 0.025f);
this.SmartPhone.transform.localEulerAngles = new Vector3(0f, -160f, 180f);
}
else
{
this.SmartPhone.transform.localPosition = new Vector3(0.01f, 0.01f, 0.01f);
this.SmartPhone.transform.localEulerAngles = new Vector3(0f, -160f, 165f);
}
this.SmartPhone.SetActive(true);
}
this.CharacterAnimation.CrossFade(this.DeskTextAnim);
}
else
{
this.CharacterAnimation.CrossFade("delinquentSit_00");
}
}
else
{
this.CharacterAnimation.CrossFade(this.SadDeskSitAnim);
}
}
}
else if (this.StudentManager.Teachers[this.Class].SpeechLines.isPlaying && !this.StudentManager.Teachers[this.Class].Alarmed)
{
if (this.DressCode && this.ClubAttire)
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
else
{
if (!this.Depressed && !this.Pen.activeInHierarchy)
{
this.Pen.SetActive(true);
}
if (this.SmartPhone.activeInHierarchy)
{
this.SmartPhone.SetActive(false);
}
if (this.MyPaper == null)
{
if (base.transform.position.x < 0f)
{
this.MyPaper = UnityEngine.Object.Instantiate<GameObject>(this.Paper, this.Seat.position + new Vector3(-0.4f, 0.772f, 0f), Quaternion.identity);
}
else
{
this.MyPaper = UnityEngine.Object.Instantiate<GameObject>(this.Paper, this.Seat.position + new Vector3(0.4f, 0.772f, 0f), Quaternion.identity);
}
this.MyPaper.transform.eulerAngles = new Vector3(0f, 0f, -90f);
this.MyPaper.transform.localScale = new Vector3(0.005f, 0.005f, 0.005f);
this.MyPaper.transform.parent = this.StudentManager.Papers;
}
this.CharacterAnimation.CrossFade(this.SitAnim);
}
}
else if (this.Club != ClubType.Delinquent)
{
this.CharacterAnimation.CrossFade(this.ConfusedSitAnim);
}
else
{
this.CharacterAnimation.CrossFade("delinquentSit_00");
}
}
}
}
else if (this.Actions[this.Phase] == StudentActionType.Peek)
{
this.CharacterAnimation.CrossFade(this.PeekAnim);
if (this.Male)
{
this.Cosmetic.MyRenderer.materials[this.Cosmetic.FaceID].SetFloat("_BlendAmount", 1f);
}
}
else if (this.Actions[this.Phase] == StudentActionType.ClubAction)
{
if (this.DressCode && !this.ClubAttire)
{
this.CharacterAnimation.CrossFade(this.IdleAnim);
}
else
{
if (this.StudentID == 47 || this.StudentID == 49)
{
if (this.GetNewAnimation)
{
this.StudentManager.ConvoManager.MartialArtsCheck();
}
if (this.CharacterAnimation[this.ClubAnim].time >= this.CharacterAnimation[this.ClubAnim].length)
{
this.GetNewAnimation = true;
}
}
if (this.Club != ClubType.Occult)
{
this.CharacterAnimation.CrossFade(this.ClubAnim);
}
}
if (this.Club == ClubType.Cooking)
{
if (this.ClubActivityPhase == 0)
{
if (this.ClubTimer == 0f)
{
this.MyPlate.parent = null;
this.MyPlate.gameObject.SetActive(true);
this.MyPlate.position = this.OriginalPlatePosition;
this.MyPlate.rotation = this.OriginalPlateRotation;
}
this.ClubTimer += Time.deltaTime;
if (this.ClubTimer > 60f)
{
this.MyPlate.parent = this.RightHand;
this.MyPlate.localPosition = new Vector3(0.02f, -0.02f, -0.15f);
this.MyPlate.localEulerAngles = new Vector3(-5f, -90f, 172.5f);
this.IdleAnim = this.PlateIdleAnim;
this.WalkAnim = this.PlateWalkAnim;
this.LeanAnim = this.PlateIdleAnim;
this.GetFoodTarget();
this.ClubTimer = 0f;
this.ClubActivityPhase++;
}
}
else
{
this.GetFoodTarget();
}
}
else if (this.Club == ClubType.Drama)
{
this.StudentManager.DramaTimer += Time.deltaTime;
if (this.StudentManager.DramaPhase == 1)
{
this.StudentManager.ConvoManager.CheckMe(this.StudentID);
if (this.Alone)
{
if (this.Phoneless)
{
this.CharacterAnimation.CrossFade("f02_sit_01");
}
else
{
if (this.Male)
{
this.CharacterAnimation.CrossFade("standTexting_00");
}
else
{
this.CharacterAnimation.CrossFade("f02_standTexting_00");
}
if (!this.SmartPhone.activeInHierarchy)
{
this.SmartPhone.transform.localPosition = new Vector3(0.02f, 0.01f, 0.03f);
this.SmartPhone.transform.localEulerAngles = new Vector3(5f, -160f, 180f);
this.SmartPhone.SetActive(true);
this.SpeechLines.Stop();
}
}
}
else if (this.StudentID == 26 && !this.SpeechLines.isPlaying)
{
this.SmartPhone.SetActive(false);
this.SpeechLines.Play();
}
if (this.StudentManager.DramaTimer > 100f)
{
this.StudentManager.DramaTimer = 0f;
this.StudentManager.UpdateDrama();
}
}
else if (this.StudentManager.DramaPhase == 2)
{
if (this.StudentManager.DramaTimer > 300f)
{
this.StudentManager.DramaTimer = 0f;
this.StudentManager.UpdateDrama();
}
}
else if (this.StudentManager.DramaPhase == 3)
{
this.SpeechLines.Play();
this.CharacterAnimation.CrossFade(this.RandomAnim);
if (this.CharacterAnimation[this.RandomAnim].time >= this.CharacterAnimation[this.RandomAnim].length)
{
this.PickRandomAnim();
}
if (this.StudentManager.DramaTimer > 100f)
{
this.StudentManager.DramaTimer = 0f;
this.StudentManager.UpdateDrama();
}
}
}
else if (this.Club == ClubType.Occult)
{
if (this.ReadPhase == 0)
{
this.CharacterAnimation.cullingType = AnimationCullingType.AlwaysAnimate;
this.CharacterAnimation.CrossFade(this.BookSitAnim);
if (this.CharacterAnimation[this.BookSitAnim].time > this.CharacterAnimation[this.BookSitAnim].length)
{
this.CharacterAnimation.cullingType = AnimationCullingType.BasedOnRenderers;
this.CharacterAnimation.CrossFade(this.BookReadAnim);
this.ReadPhase++;
}
else if (this.CharacterAnimation[this.BookSitAnim].time > 1f)
{
this.OccultBook.SetActive(true);
}
}
}
else if (this.Club == ClubType.Art)
{
if (this.ClubAttire && !this.Paintbrush.activeInHierarchy && (double)Vector3.Distance(base.transform.position, this.CurrentDestination.position) < 0.5)
{
this.Paintbrush.SetActive(true);
this.Palette.SetActive(true);
}
}
else if (this.Club == ClubType.LightMusic)
{
if ((double)this.Clock.HourTime < 16.9)
{
this.Instruments[this.ClubMemberID].SetActive(true);
this.CharacterAnimation.CrossFade(this.ClubAnim);
if (this.StudentID == 51)
{
if (this.InstrumentBag[this.ClubMemberID].transform.parent != null)
{
this.InstrumentBag[this.ClubMemberID].transform.parent = null;
this.InstrumentBag[this.ClubMemberID].transform.position = new Vector3(0.5f, 4.5f, 22.45666f);
this.InstrumentBag[this.ClubMemberID].transform.eulerAngles = new Vector3(-15f, 0f, 0f);
}
if (this.Instruments[this.ClubMemberID].transform.parent == null)
{
this.Instruments[this.ClubMemberID].GetComponent<AudioSource>().Play();
this.Instruments[this.ClubMemberID].transform.parent = base.transform;
this.Instruments[this.ClubMemberID].transform.localPosition = new Vector3(0.340493f, 0.653502f, -0.286104f);
this.Instruments[this.ClubMemberID].transform.localEulerAngles = new Vector3(-13.6139f, 16.16775f, 72.5293f);
}
}
else if (this.StudentID == 54 && !this.Drumsticks[0].activeInHierarchy)
{
this.Drumsticks[0].SetActive(true);
this.Drumsticks[1].SetActive(true);
}
}
else if (this.StudentID == 51)
{
this.InstrumentBag[this.ClubMemberID].transform.position = new Vector3(0.5f, 4.5f, 22.45666f);
this.InstrumentBag[this.ClubMemberID].transform.eulerAngles = new Vector3(-15f, 0f, 0f);
this.InstrumentBag[this.ClubMemberID].transform.parent = null;
if (!this.StudentManager.PracticeMusic.isPlaying)
{
this.CharacterAnimation.CrossFade("f02_vocalIdle_00");
}
else if (this.StudentManager.PracticeMusic.time > 114.5f)
{
this.CharacterAnimation.CrossFade("f02_vocalCelebrate_00");
}
else if (this.StudentManager.PracticeMusic.time > 104f)
{
this.CharacterAnimation.CrossFade("f02_vocalWait_00");
}
else if (this.StudentManager.PracticeMusic.time > 32f)
{
this.CharacterAnimation.CrossFade("f02_vocalSingB_00");
}
else if (this.StudentManager.PracticeMusic.time > 24f)
{
this.CharacterAnimation.CrossFade("f02_vocalSingB_00");
}
else if (this.StudentManager.PracticeMusic.time > 17f)
{
this.CharacterAnimation.CrossFade("f02_vocalSingB_00");
}
else if (this.StudentManager.PracticeMusic.time > 14f)
{
this.CharacterAnimation.CrossFade("f02_vocalWait_00");
}
else if (this.StudentManager.PracticeMusic.time > 8f)
{
this.CharacterAnimation.CrossFade("f02_vocalSingA_00");
}
else if (this.StudentManager.PracticeMusic.time > 0f)
{
this.CharacterAnimation.CrossFade("f02_vocalWait_00");
}
}
else if (this.StudentID == 52)
{
if (!this.Instruments[this.ClubMemberID].activeInHierarchy)
{
this.Instruments[this.ClubMemberID].SetActive(true);
this.Instruments[this.ClubMemberID].GetComponent<AudioSource>().Stop();
this.Instruments[this.ClubMemberID].GetComponent<AudioSource>().playOnAwake = false;
this.Instruments[this.ClubMemberID].transform.parent = this.Spine;
this.Instruments[this.ClubMemberID].transform.localPosition = new Vector3(0.275f, -0.16f, 0.095f);
this.Instruments[this.ClubMemberID].transform.localEulerAngles = new Vector3(-22.5f, 30f, 60f);
this.InstrumentBag[this.ClubMemberID].transform.parent = null;
this.InstrumentBag[this.ClubMemberID].transform.position = new Vector3(5.5825f, 4.01f, 25f);
this.InstrumentBag[this.ClubMemberID].transform.eulerAngles = new Vector3(-15f, -90f, 0f);
}
if (!this.StudentManager.PracticeMusic.isPlaying)
{
this.CharacterAnimation.CrossFade("f02_guitarIdle_00");
}
else if (this.StudentManager.PracticeMusic.time > 114.5f)
{