private void Start() { this.Identifier = base.GetComponent <YanSaveIdentifier>(); this.TrapSwing = 12.15f; this.Yandere = GameObject.Find("YandereChan").GetComponent <YandereScript>(); this.StudentManager = this.Yandere.StudentManager; this.StudentManager.Doors[this.StudentManager.DoorID] = this; this.StudentManager.DoorID++; this.DoorID = this.StudentManager.DoorID; if (this.Identifier != null) { this.Identifier.ObjectID = "Door_" + this.DoorID; } else { Debug.Log(base.gameObject.name + " doesn't have an identifier."); } if (this.StudentManager.EastBathroomArea.bounds.Contains(base.transform.position) || this.StudentManager.WestBathroomArea.bounds.Contains(base.transform.position)) { this.RoomName = "Toilet Stall"; } if (this.Swinging) { this.OriginX[0] = this.Doors[0].transform.localPosition.z; if (this.OriginX.Length > 1) { this.OriginX[1] = this.Doors[1].transform.localPosition.z; } this.TimeLimit = 1f; } if (this.Labels.Length != 0) { this.Labels[0].text = this.RoomName; this.Labels[1].text = this.RoomName; this.UpdatePlate(); } if (this.Club != ClubType.None && ClubGlobals.GetClubClosed(this.Club)) { this.Prompt.Hide(); this.Prompt.enabled = false; base.enabled = false; } if (this.DisableSelf) { base.enabled = false; } this.Prompt.Student = false; this.Prompt.Door = true; this.DoorColliders = new Collider[2]; this.DoorColliders[0] = this.Doors[0].gameObject.GetComponent <BoxCollider>(); if (this.DoorColliders[0] == null) { this.DoorColliders[0] = this.Doors[0].GetChild(0).gameObject.GetComponent <BoxCollider>(); } if (this.Doors.Length > 1) { this.DoorColliders[1] = this.Doors[1].GetComponent <BoxCollider>(); } }
public static void SpawnOsana() { StudentManagerScript manager = FindObjectOfType <StudentManagerScript>(); manager.SpawnStudent(10); manager.SpawnStudent(11); manager.Students[10].transform.position = new Vector3(0, -75, 0); manager.Students[11].transform.position = new Vector3(0, -75, 0); }
public static GameObject GetStudent(int id) { StudentManagerScript manager = GameObject.FindObjectOfType <StudentManagerScript>(); //var temp = manager.JSON; if (manager.Students == null || manager.Students[id].Spawned == false) { return(null); } return(manager.Students[id].gameObject); }
public static void UpdateStudentHair(int student, string hair) { StudentManagerScript manager = GameObject.FindObjectOfType <StudentManagerScript>(); if (manager.Students?[student]?.Hairstyle != null) { StudentScript s = manager.Students[student]; s.Hairstyle = hair; } else { Debug.Log("Student not found to change hair, the student maybe didn't spawn yet"); } }
// Token: 0x06000579 RID: 1401 RVA: 0x0004B1A0 File Offset: 0x000495A0 private void Start() { this.students = StudentJson.LoadFromJson(StudentJson.FilePath); if (SceneManager.GetActiveScene().name == "SchoolScene") { this.topics = TopicJson.LoadFromJson(TopicJson.FilePath); StudentManagerScript studentManagerScript = UnityEngine.Object.FindObjectOfType <StudentManagerScript>(); this.ReplaceDeadTeachers(studentManagerScript.FirstNames, studentManagerScript.LastNames); } else if (SceneManager.GetActiveScene().name == "CreditsScene") { this.credits = CreditJson.LoadFromJson(CreditJson.FilePath); } }
private void Start() { this.StudentManager = GameObject.Find("StudentManager").GetComponent <StudentManagerScript>(); this.Anim = base.GetComponent <Animation>(); }