// Token: 0x060000C8 RID: 200 RVA: 0x0000E114 File Offset: 0x0000C514 private void OnTriggerEnter(Collider other) { if (other.transform.parent == null) { PickUpScript component = other.gameObject.GetComponent <PickUpScript>(); if (component != null) { BodyPartScript bodyPart = component.BodyPart; if (bodyPart.Sacrifice && (bodyPart.Type == 3 || bodyPart.Type == 4)) { bool flag = true; for (int i = 1; i < 11; i++) { if (this.ArmArray[i] == other.gameObject) { flag = false; } } if (flag) { this.Arms++; if (this.Arms < this.ArmArray.Length) { this.ArmArray[this.Arms] = other.gameObject; } } } } } }
// Token: 0x06000A1E RID: 2590 RVA: 0x00051B0C File Offset: 0x0004FD0C private void OnTriggerEnter(Collider other) { if (other.transform.parent == this.LimbParent) { PickUpScript component = other.gameObject.GetComponent <PickUpScript>(); if (component != null) { BodyPartScript bodyPart = component.BodyPart; if (bodyPart.Sacrifice && (bodyPart.Type == 3 || bodyPart.Type == 4)) { bool flag = true; for (int i = 1; i < 11; i++) { if (this.ArmArray[i] == other.gameObject) { flag = false; } } if (flag) { this.Arms++; if (this.Arms < this.ArmArray.Length) { this.ArmArray[this.Arms] = other.gameObject; } } } } } if (other.transform.parent != null && other.transform.parent.parent != null && other.transform.parent.parent.parent != null) { StudentScript component2 = other.transform.parent.parent.parent.gameObject.GetComponent <StudentScript>(); if (component2 != null && component2.Ragdoll.Sacrifice && component2.Armband.activeInHierarchy) { bool flag2 = true; for (int j = 1; j < 11; j++) { if (this.BodyArray[j] == other.gameObject) { flag2 = false; } } if (flag2) { this.Bodies++; if (this.Bodies < this.BodyArray.Length) { this.BodyArray[this.Bodies] = other.gameObject; } } } } }
// Token: 0x060000C9 RID: 201 RVA: 0x0000E1E4 File Offset: 0x0000C5E4 private void OnTriggerExit(Collider other) { PickUpScript component = other.gameObject.GetComponent <PickUpScript>(); if (component != null && component.BodyPart) { BodyPartScript component2 = other.gameObject.GetComponent <BodyPartScript>(); if (component2.Sacrifice && (other.gameObject.name == "FemaleRightArm(Clone)" || other.gameObject.name == "FemaleLeftArm(Clone)" || other.gameObject.name == "MaleRightArm(Clone)" || other.gameObject.name == "MaleLeftArm(Clone)" || other.gameObject.name == "SacrificialArm(Clone)")) { this.Arms--; } } }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Enemy")) { BodyPartScript bp = collision.gameObject.GetComponent <BodyPartScript>(); //if (!bp.enemy.dead) Instantiate(SuperHotScript.instance.hitParticlePrefab, transform.position, transform.rotation); bp.HidePartAndReplace(); bp.enemy.Ragdoll(); } Destroy(gameObject); }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Enemy") && collision.relativeVelocity.magnitude > 8) { BodyPartScript bp = collision.gameObject.GetComponent <BodyPartScript>(); if (!bp.enemy.dead) { Instantiate(SuperHotScript.instance.hitParticlePrefab, transform.position, transform.rotation); } //bp.enemy.Release(); //bp.HidePartAndReplace(); //bp.enemy.Ragdoll(); bp.enemy.WeaponRelease(); } }
private void RaycastShootTest() { if (Input.GetMouseButtonDown(0)) { RaycastHit hit; if (Physics.Raycast(_firstPerson.transform.position, _firstPerson.transform.forward, out hit, 50)) { Debug.DrawRay(_firstPerson.transform.position, _firstPerson.transform.forward, Color.red, 3, false); BodyPartScript bodyPart = hit.transform.GetComponent <BodyPartScript>(); if (bodyPart != null) { bodyPart.Hit(_gunDmg); } } } }
// Token: 0x0600199C RID: 6556 RVA: 0x000FA5D8 File Offset: 0x000F87D8 public void Dismember() { if (!this.Dismembered) { this.Student.LiquidProjector.material.mainTexture = this.Student.BloodTexture; for (int i = 0; i < this.BodyParts.Length; i++) { if (this.Decapitated) { i++; this.Decapitated = false; } GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.BodyParts[i], this.SpawnPoints[i].position, Quaternion.identity); gameObject.transform.parent = this.Yandere.LimbParent; gameObject.transform.eulerAngles = this.SpawnPoints[i].eulerAngles; BodyPartScript component = gameObject.GetComponent <BodyPartScript>(); component.StudentID = this.StudentID; component.Sacrifice = this.Sacrifice; if (this.Yandere.StudentManager.NoGravity) { gameObject.GetComponent <Rigidbody>().useGravity = false; } if (i == 0) { if (!this.Student.OriginallyTeacher) { if (!this.Male) { this.Student.Cosmetic.FemaleHair[this.Student.Cosmetic.Hairstyle].transform.parent = gameObject.transform; if (this.Student.Cosmetic.FemaleAccessories[this.Student.Cosmetic.Accessory] != null && this.Student.Cosmetic.Accessory != 3 && this.Student.Cosmetic.Accessory != 6) { this.Student.Cosmetic.FemaleAccessories[this.Student.Cosmetic.Accessory].transform.parent = gameObject.transform; } } else { Transform transform = this.Student.Cosmetic.MaleHair[this.Student.Cosmetic.Hairstyle].transform; transform.parent = gameObject.transform; transform.localScale *= 1.06382978f; if (transform.transform.localPosition.y < -1f) { transform.transform.localPosition = new Vector3(transform.transform.localPosition.x, transform.transform.localPosition.y - 0.095f, transform.transform.localPosition.z); } if (this.Student.Cosmetic.MaleAccessories[this.Student.Cosmetic.Accessory] != null) { this.Student.Cosmetic.MaleAccessories[this.Student.Cosmetic.Accessory].transform.parent = gameObject.transform; } } } else { this.Student.Cosmetic.TeacherHair[this.Student.Cosmetic.Hairstyle].transform.parent = gameObject.transform; if (this.Student.Cosmetic.TeacherAccessories[this.Student.Cosmetic.Accessory] != null) { this.Student.Cosmetic.TeacherAccessories[this.Student.Cosmetic.Accessory].transform.parent = gameObject.transform; } } if (this.Student.Club != ClubType.Photography && this.Student.Club < ClubType.Gaming && this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club] != null) { this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club].transform.parent = gameObject.transform; if (this.Student.Club == ClubType.Occult) { if (!this.Male) { this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club].transform.localPosition = new Vector3(0f, -1.5f, 0.01f); this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club].transform.localEulerAngles = Vector3.zero; } else { this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club].transform.localPosition = new Vector3(0f, -1.42f, 0.005f); this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club].transform.localEulerAngles = Vector3.zero; } } } gameObject.GetComponent <Renderer>().materials[0].mainTexture = this.Student.Cosmetic.FaceTexture; if (i == 0) { gameObject.transform.position += new Vector3(0f, 1f, 0f); } } else if (i == 1) { if (this.Student.Club == ClubType.Photography && this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club] != null) { this.Student.Cosmetic.ClubAccessories[(int)this.Student.Club].transform.parent = gameObject.transform; } } else if (i == 2 && !this.Student.Male && this.Student.Cosmetic.Accessory == 6) { this.Student.Cosmetic.FemaleAccessories[this.Student.Cosmetic.Accessory].transform.parent = gameObject.transform; } } if (this.BloodPoolSpawner.BloodParent == null) { this.BloodPoolSpawner.Start(); } Debug.Log("BloodPoolSpawner.transform.position is: " + this.BloodPoolSpawner.transform.position); Debug.Log("Student.StudentManager.SEStairs.bounds is: " + this.Student.StudentManager.SEStairs.bounds); Debug.Log("Student.StudentManager.SEStairs.bounds.Contains(BloodPoolSpawner.transform.position) is: " + this.Student.StudentManager.SEStairs.bounds.Contains(this.BloodPoolSpawner.transform.position).ToString()); if (!this.Student.StudentManager.NEStairs.bounds.Contains(this.BloodPoolSpawner.transform.position) && !this.Student.StudentManager.NWStairs.bounds.Contains(this.BloodPoolSpawner.transform.position) && !this.Student.StudentManager.SEStairs.bounds.Contains(this.BloodPoolSpawner.transform.position) && !this.Student.StudentManager.SWStairs.bounds.Contains(this.BloodPoolSpawner.transform.position)) { this.BloodPoolSpawner.SpawnBigPool(); } this.Police.PartsIcon.gameObject.SetActive(true); this.Police.BodyParts += 6; this.Yandere.NearBodies--; this.Police.Corpses--; base.gameObject.SetActive(false); this.Dismembered = true; } }