Пример #1
0
 private void CheckDirection()
 {
     this.North             = false;
     this.RelativeCharacter = ((this.Student != null) ? this.Student.transform : this.Yandere.transform);
     if (this.Facing == "North")
     {
         if (this.RelativeCharacter.position.z < base.transform.position.z)
         {
             this.North = true;
         }
     }
     else if (this.Facing == "South")
     {
         if (this.RelativeCharacter.position.z > base.transform.position.z)
         {
             this.North = true;
         }
     }
     else if (this.Facing == "East")
     {
         if (this.RelativeCharacter.position.x < base.transform.position.x)
         {
             this.North = true;
         }
     }
     else if (this.Facing == "West" && this.RelativeCharacter.position.x > base.transform.position.x)
     {
         this.North = true;
     }
     this.Student = null;
 }
Пример #2
0
 // Token: 0x06000235 RID: 565 RVA: 0x00028CD0 File Offset: 0x00026ED0
 public virtual void OnCollisionEnter(Collision other)
 {
     if (this.Dropped && other.gameObject.layer == 9)
     {
         StudentScript studentScript = (StudentScript)other.gameObject.GetComponent(typeof(StudentScript));
         if (studentScript != null)
         {
             this.audio.Play();
             while (this.Dumbbells > 0)
             {
                 ((WeaponScript)this.Dumbbell[this.Dumbbells].GetComponent(typeof(WeaponScript))).enabled = true;
                 ((PromptScript)this.Dumbbell[this.Dumbbells].GetComponent(typeof(PromptScript))).enabled = true;
                 ((Collider)this.Dumbbell[this.Dumbbells].GetComponent(typeof(Collider))).enabled         = true;
                 this.Dumbbell[this.Dumbbells].rigidbody.constraints = RigidbodyConstraints.None;
                 this.Dumbbell[this.Dumbbells].rigidbody.isKinematic = false;
                 this.Dumbbell[this.Dumbbells].rigidbody.useGravity  = true;
                 this.Dumbbell[this.Dumbbells].transform.parent      = null;
                 this.Dumbbell[this.Dumbbells] = null;
                 this.Dumbbells--;
             }
             this.Dropped       = false;
             studentScript.Dead = true;
             studentScript.BecomeRagdoll();
         }
     }
 }
	private void GoAway(StudentScript Student)
	{
		if (!Student.Chasing && !Student.WitnessedMurder && !Student.WitnessedCorpse && !Student.Fleeing)
		{
			if (Student.Following)
			{
				Student.Yandere.Follower = null;
				Student.Yandere.Followers--;
				Student.Hearts.emission.enabled = false;
				Student.FollowCountdown.gameObject.SetActive(false);
				Student.Following = false;
			}
			if (Student.SolvingPuzzle)
			{
				Student.PuzzleTimer = 0f;
				Student.DropPuzzle();
			}
			Student.CurrentDestination = Student.StudentManager.GoAwaySpots.List[Student.StudentID];
			Student.Pathfinding.target = Student.StudentManager.GoAwaySpots.List[Student.StudentID];
			Student.Pathfinding.canSearch = true;
			Student.Pathfinding.canMove = true;
			Student.CharacterAnimation.CrossFade(Student.SprintAnim);
			Student.DistanceToDestination = 100f;
			Student.Pathfinding.speed = 4f;
			Student.AmnesiaTimer = 10f;
			Student.Distracted = true;
			Student.Alarmed = false;
			Student.Routine = false;
			Student.GoAway = true;
			Student.AlarmTimer = 0f;
		}
	}
 private void RestorePrompt()
 {
     this.Prompt.Label[0].text = "     Find Student Locker";
     this.TargetedStudent      = null;
     this.Prompt.enabled       = true;
     this.Phase = 1;
 }
Пример #5
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Student")
     {
         student = other.gameObject.GetComponent <StudentScript>();
     }
 }
Пример #6
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 9)
     {
         this.Student = other.gameObject.GetComponent <StudentScript>();
         if (this.Student == null)
         {
             GameObject gameObject = other.gameObject.transform.root.gameObject;
             this.Student = gameObject.GetComponent <StudentScript>();
         }
         if (this.Student != null && (this.Student.Gas || this.Fireball))
         {
             this.Student.Combust();
             if (this.PickUp != null && this.PickUp.Yandere.PickUp != null && this.PickUp.Yandere.PickUp == this.PickUp)
             {
                 this.PickUp.Yandere.TargetStudent        = this.Student;
                 this.PickUp.Yandere.MurderousActionTimer = 1f;
             }
             if (this.Fireball)
             {
                 UnityEngine.Object.Destroy(base.gameObject);
             }
         }
     }
 }
Пример #7
0
 // Token: 0x060007A8 RID: 1960 RVA: 0x00075C84 File Offset: 0x00074084
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 9)
     {
         StudentScript component = other.gameObject.GetComponent <StudentScript>();
         if (component != null && component.StudentID > 1)
         {
             UnityEngine.Object.Instantiate <GameObject>(this.BloodEffect, component.transform.position + new Vector3(0f, 1f, 0f), Quaternion.identity);
             component.Health -= this.Damage;
             component.HealthBar.transform.parent.gameObject.SetActive(true);
             component.HealthBar.transform.localScale = new Vector3(component.Health / 100f, 1f, 1f);
             if (component.Health <= 0f)
             {
                 component.DeathType = DeathType.EasterEgg;
                 component.HealthBar.transform.parent.gameObject.SetActive(false);
                 component.BecomeRagdoll();
                 Rigidbody rigidbody = component.Ragdoll.AllRigidbodies[0];
                 rigidbody.isKinematic = false;
             }
             else
             {
                 component.CharacterAnimation[component.SithReactAnim].time = 0f;
                 component.CharacterAnimation.Play(component.SithReactAnim);
                 component.Pathfinding.canSearch = false;
                 component.Pathfinding.canMove   = false;
                 component.HitReacting           = true;
                 component.Routine = false;
                 component.Fleeing = false;
             }
         }
     }
 }
Пример #8
0
 // Token: 0x0600012E RID: 302 RVA: 0x00013C94 File Offset: 0x00012094
 private void OnCollisionEnter(Collision other)
 {
     if (this.Dropped && other.gameObject.layer == 9)
     {
         StudentScript component = other.gameObject.GetComponent <StudentScript>();
         if (component != null)
         {
             base.GetComponent <AudioSource>().Play();
             while (this.Dumbbells > 0)
             {
                 this.Dumbbell[this.Dumbbells].GetComponent <WeaponScript>().enabled = true;
                 this.Dumbbell[this.Dumbbells].GetComponent <PromptScript>().enabled = true;
                 this.Dumbbell[this.Dumbbells].GetComponent <Collider>().enabled     = true;
                 Rigidbody component2 = this.Dumbbell[this.Dumbbells].GetComponent <Rigidbody>();
                 component2.constraints = RigidbodyConstraints.None;
                 component2.isKinematic = false;
                 component2.useGravity  = true;
                 this.Dumbbell[this.Dumbbells].transform.parent = null;
                 this.Dumbbell[this.Dumbbells] = null;
                 this.Dumbbells--;
             }
             this.Dropped        = false;
             component.DeathType = DeathType.Weapon;
             component.BecomeRagdoll();
         }
     }
 }
 public void DebugTest()
 {
     if (this.DebugInt == 0)
     {
         StudentScript studentScript = this.StudentManager.Students[39];
         studentScript.ShoeRemoval.Start();
         studentScript.ShoeRemoval.PutOnShoes();
         studentScript.Phase = 2;
         studentScript.ScheduleBlocks[2].action = "Stand";
         studentScript.GetDestinations();
         studentScript.CurrentDestination = this.MidoriSpot;
         studentScript.Pathfinding.target = this.MidoriSpot;
         studentScript.transform.position = this.Yandere.transform.position;
         Physics.SyncTransforms();
     }
     else if (this.DebugInt == 1)
     {
         this.Knife.transform.position = this.Yandere.transform.position + new Vector3(-1f, 1f, 0f);
         this.Knife.GetComponent <Rigidbody>().isKinematic = false;
         this.Knife.GetComponent <Rigidbody>().useGravity  = true;
     }
     else if (this.DebugInt == 2)
     {
         this.Mop.transform.position = this.Yandere.transform.position + new Vector3(1f, 1f, 0f);
         this.Mop.GetComponent <Rigidbody>().isKinematic = false;
         this.Mop.GetComponent <Rigidbody>().useGravity  = true;
     }
     this.DebugInt++;
 }
 // Token: 0x06000A94 RID: 2708 RVA: 0x000579DC File Offset: 0x00055BDC
 private void OnCollisionEnter(Collision other)
 {
     if (this.Dropped)
     {
         StudentScript component = other.gameObject.GetComponent <StudentScript>();
         if (component != null)
         {
             base.GetComponent <AudioSource>().Play();
             while (this.Dumbbells > 0)
             {
                 this.Dumbbell[this.Dumbbells].GetComponent <WeaponScript>().enabled = true;
                 this.Dumbbell[this.Dumbbells].GetComponent <PromptScript>().enabled = true;
                 this.Dumbbell[this.Dumbbells].GetComponent <Collider>().enabled     = true;
                 Rigidbody component2 = this.Dumbbell[this.Dumbbells].GetComponent <Rigidbody>();
                 component2.constraints = RigidbodyConstraints.None;
                 component2.isKinematic = false;
                 component2.useGravity  = true;
                 this.Dumbbell[this.Dumbbells].transform.parent = null;
                 this.Dumbbell[this.Dumbbells] = null;
                 this.Dumbbells--;
             }
             component.DeathType = DeathType.Weight;
             component.BecomeRagdoll();
             this.Dropped = false;
             GameObjectUtils.SetLayerRecursively(base.gameObject, 15);
             Debug.Log(component.Name + "'s ''Alive'' variable is: " + component.Alive.ToString());
         }
     }
 }
Пример #11
0
 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 void ElectrocuteStudent(StudentScript Target)
    {
        Target.EmptyHands();
        if (Target.Investigating)
        {
            Target.StopInvestigating();
        }
        Target.CharacterAnimation[Target.ElectroAnim].speed = 0.85f;
        Target.CharacterAnimation[Target.ElectroAnim].time  = 2f;
        Target.CharacterAnimation.CrossFade(Target.ElectroAnim);
        Target.CharacterAnimation[Target.WetAnim].weight = 0f;
        Target.Pathfinding.canSearch = false;
        Target.Pathfinding.canMove   = false;
        Target.EatingSnack           = false;
        Target.Electrified           = true;
        Target.Fleeing = false;
        Target.Routine = false;
        Target.Dying   = true;
        if (Target.Following)
        {
            Target.Yandere.Follower = null;
            Target.Yandere.Followers--;
            Target.Following = false;
        }
        Target.Police.CorpseList[Target.Police.Corpses] = Target.Ragdoll;
        Target.Police.Corpses++;
        GameObjectUtils.SetLayerRecursively(Target.gameObject, 11);
        Target.tag = "Blood";
        Target.Ragdoll.ElectrocutionAnimation = true;
        Target.Ragdoll.Disturbing             = true;
        Target.MurderSuicidePhase             = 100;
        Target.SpawnAlarmDisc();
        GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.StudentManager.LightSwitch.Electricity, Target.transform.position, Quaternion.identity);

        gameObject.transform.parent        = Target.BoneSets.RightArm;
        gameObject.transform.localPosition = Vector3.zero;
        GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.StudentManager.LightSwitch.Electricity, Target.transform.position, Quaternion.identity);

        gameObject2.transform.parent        = Target.BoneSets.LeftArm;
        gameObject2.transform.localPosition = Vector3.zero;
        GameObject gameObject3 = UnityEngine.Object.Instantiate <GameObject>(this.StudentManager.LightSwitch.Electricity, Target.transform.position, Quaternion.identity);

        gameObject3.transform.parent        = Target.BoneSets.RightLeg;
        gameObject3.transform.localPosition = Vector3.zero;
        GameObject gameObject4 = UnityEngine.Object.Instantiate <GameObject>(this.StudentManager.LightSwitch.Electricity, Target.transform.position, Quaternion.identity);

        gameObject4.transform.parent        = Target.BoneSets.LeftLeg;
        gameObject4.transform.localPosition = Vector3.zero;
        GameObject gameObject5 = UnityEngine.Object.Instantiate <GameObject>(this.StudentManager.LightSwitch.Electricity, Target.transform.position, Quaternion.identity);

        gameObject5.transform.parent        = Target.BoneSets.Head;
        gameObject5.transform.localPosition = Vector3.zero;
        GameObject gameObject6 = UnityEngine.Object.Instantiate <GameObject>(this.StudentManager.LightSwitch.Electricity, Target.transform.position, Quaternion.identity);

        gameObject6.transform.parent        = Target.Hips;
        gameObject6.transform.localPosition = Vector3.zero;
        AudioSource.PlayClipAtPoint(this.StudentManager.LightSwitch.Flick[2], Target.transform.position + Vector3.up);
    }
Пример #13
0
 // Token: 0x0600053D RID: 1341 RVA: 0x00049364 File Offset: 0x00047764
 private void Update()
 {
     if (this.Yandere.Follower != null && this.Yandere.Follower.StudentID == 7)
     {
         if (!ConversationGlobals.GetTopicLearnedByStudent(3, 7) && Vector3.Distance(this.Yandere.Follower.transform.position, this.OccultClub.position) < 5f)
         {
             if (!ConversationGlobals.GetTopicDiscovered(3))
             {
                 this.Yandere.NotificationManager.DisplayNotification(NotificationType.Topic);
                 ConversationGlobals.SetTopicDiscovered(3, true);
             }
             this.Yandere.NotificationManager.DisplayNotification(NotificationType.Opinion);
             ConversationGlobals.SetTopicLearnedByStudent(3, 7, true);
         }
         if (!ConversationGlobals.GetTopicLearnedByStudent(14, 7))
         {
             StudentScript studentScript  = this.StudentManager.Students[22];
             StudentScript studentScript2 = this.StudentManager.Students[24];
             StudentScript x = this.StudentManager.Students[25];
             if (studentScript != null && x != null && studentScript.Actions[studentScript.Phase] == StudentActionType.ClubAction && studentScript.DistanceToDestination < 1f && studentScript2.Actions[studentScript2.Phase] == StudentActionType.ClubAction && studentScript2.DistanceToDestination < 1f && Vector3.Distance(this.Yandere.Follower.transform.position, this.MartialArts.position) < 5f)
             {
                 if (!ConversationGlobals.GetTopicDiscovered(14))
                 {
                     this.Yandere.NotificationManager.DisplayNotification(NotificationType.Topic);
                     ConversationGlobals.SetTopicDiscovered(14, true);
                 }
                 this.Yandere.NotificationManager.DisplayNotification(NotificationType.Opinion);
                 ConversationGlobals.SetTopicLearnedByStudent(14, 7, true);
             }
         }
         if (!ConversationGlobals.GetTopicLearnedByStudent(16, 7))
         {
             StudentScript x2 = this.StudentManager.Students[22];
             StudentScript x3 = this.StudentManager.Students[25];
             if (x2 != null && x3 != null && this.VideoGames.gameObject.activeInHierarchy && Vector3.Distance(this.Yandere.Follower.transform.position, this.VideoGames.position) < 2.5f)
             {
                 if (!ConversationGlobals.GetTopicDiscovered(16))
                 {
                     this.Yandere.NotificationManager.DisplayNotification(NotificationType.Topic);
                     ConversationGlobals.SetTopicDiscovered(16, true);
                 }
                 this.Yandere.NotificationManager.DisplayNotification(NotificationType.Opinion);
                 ConversationGlobals.SetTopicLearnedByStudent(16, 7, true);
             }
         }
         if (!ConversationGlobals.GetTopicLearnedByStudent(20, 7) && Vector3.Distance(this.Yandere.Follower.transform.position, this.Kitten.position) < 2.5f)
         {
             if (!ConversationGlobals.GetTopicDiscovered(20))
             {
                 this.Yandere.NotificationManager.DisplayNotification(NotificationType.Topic);
                 ConversationGlobals.SetTopicDiscovered(20, true);
             }
             this.Yandere.NotificationManager.DisplayNotification(NotificationType.Opinion);
             ConversationGlobals.SetTopicLearnedByStudent(20, 7, true);
         }
     }
 }
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Student"))
     {
         StudentScript component = other.GetComponent <StudentScript>();
         this.Students.Add(component);
         this.Population++;
     }
 }
Пример #15
0
 // Token: 0x060013FA RID: 5114 RVA: 0x000AE468 File Offset: 0x000AC668
 private void OnTriggerEnter(Collider other)
 {
     Debug.Log("A punch collided with something.");
     if (other.gameObject.layer == 9)
     {
         Debug.Log("A punch collided with something on the Characters layer.");
         StudentScript component = other.gameObject.GetComponent <StudentScript>();
         if (component != null)
         {
             Debug.Log("A punch collided with a student.");
             if (component.StudentID > 1)
             {
                 Debug.Log("A punch collided with a student and killed them.");
                 UnityEngine.Object.Instantiate <GameObject>(this.FalconExplosion, component.transform.position + new Vector3(0f, 1f, 0f), Quaternion.identity);
                 component.DeathType = DeathType.EasterEgg;
                 component.BecomeRagdoll();
                 Rigidbody rigidbody = component.Ragdoll.AllRigidbodies[0];
                 rigidbody.isKinematic = false;
                 Vector3 vector = rigidbody.transform.position - component.Yandere.transform.position;
                 if (this.Falcon)
                 {
                     rigidbody.AddForce(vector * this.Strength);
                 }
                 else if (this.Bancho)
                 {
                     rigidbody.AddForce(vector.x * this.Strength, 5000f, vector.z * this.Strength);
                 }
                 else
                 {
                     rigidbody.AddForce(vector.x * this.Strength, 10000f, vector.z * this.Strength);
                 }
             }
         }
     }
     if (this.Destructive && other.gameObject.layer != 2 && other.gameObject.layer != 8 && other.gameObject.layer != 9 && other.gameObject.layer != 13 && other.gameObject.layer != 17)
     {
         GameObject    gameObject = null;
         StudentScript component2 = other.gameObject.transform.root.GetComponent <StudentScript>();
         if (component2 != null)
         {
             if (component2.StudentID <= 1)
             {
                 gameObject = component2.gameObject;
             }
         }
         else
         {
             gameObject = other.gameObject;
         }
         if (gameObject != null)
         {
             UnityEngine.Object.Instantiate <GameObject>(this.FalconExplosion, base.transform.position + new Vector3(0f, 0f, 0f), Quaternion.identity);
             UnityEngine.Object.Destroy(gameObject);
             UnityEngine.Object.Destroy(base.gameObject);
         }
     }
 }
    private void OnTriggerEnter(Collider other)
    {
        StudentScript component = other.gameObject.GetComponent <StudentScript>();

        if (component != null && component.StudentID > 1)
        {
            component.JojoReact();
        }
    }
Пример #17
0
 private void OnTriggerStay(Collider other)
 {
     this.Student = other.gameObject.GetComponent <StudentScript>();
     if (this.Student != null)
     {
         this.Timer = 1f;
         this.Open  = true;
     }
 }
 private void OnTriggerExit(Collider other)
 {
     if (other.CompareTag("Student"))
     {
         StudentScript component = other.GetComponent <StudentScript>();
         this.Students.Remove(component);
         this.Population--;
     }
 }
Пример #19
0
 private void OnTriggerEnter(Collider other)
 {
     if (!this.AlreadyDoused && other.gameObject.layer == 9)
     {
         StudentScript component = other.gameObject.GetComponent <StudentScript>();
         if (component != null)
         {
             if (!component.BeenSplashed && component.StudentID > 1 && component.StudentID != 10 && !component.Teacher && component.Club != ClubType.Council && !component.Fleeing && component.CurrentAction != StudentActionType.Sunbathe && !component.GasWarned)
             {
                 AudioSource.PlayClipAtPoint(this.SplashSound, base.transform.position);
                 UnityEngine.Object.Instantiate <GameObject>(this.Splash, new Vector3(base.transform.position.x, 1.5f, base.transform.position.z), Quaternion.identity);
                 if (this.Blood)
                 {
                     component.Bloody = true;
                 }
                 else if (this.Gas)
                 {
                     component.Gas = true;
                 }
                 component.GetWet();
                 this.AlreadyDoused = true;
                 UnityEngine.Object.Destroy(base.gameObject);
                 return;
             }
             if (!component.Wet && !component.Fleeing)
             {
                 Debug.Log(component.Name + " just dodged a bucket of water.");
                 if (component.Investigating)
                 {
                     component.StopInvestigating();
                 }
                 if (component.ReturningMisplacedWeapon)
                 {
                     component.DropMisplacedWeapon();
                 }
                 component.CharacterAnimation.CrossFade(component.DodgeAnim);
                 component.Pathfinding.canSearch = false;
                 component.Pathfinding.canMove   = false;
                 component.Routine    = false;
                 component.DodgeSpeed = 2f;
                 component.Dodging    = true;
                 if (component.Following)
                 {
                     component.Hearts.emission.enabled = false;
                     component.FollowCountdown.gameObject.SetActive(false);
                     component.Yandere.Follower = null;
                     component.Yandere.Followers--;
                     component.Following          = false;
                     component.CurrentDestination = component.Destinations[component.Phase];
                     component.Pathfinding.target = component.Destinations[component.Phase];
                     component.Pathfinding.speed  = 1f;
                 }
             }
         }
     }
 }
 private void Start()
 {
     if (this.StudentManager.Students[this.RivalID] == null)
     {
         this.Prompt.Hide();
         this.Prompt.enabled = false;
         base.enabled        = false;
         return;
     }
     this.Rival = this.StudentManager.Students[this.RivalID];
 }
 // Token: 0x06001C1F RID: 7199 RVA: 0x0014FE4C File Offset: 0x0014E04C
 public void SpawnSteamNoSideEffects(StudentScript SteamStudent)
 {
     Debug.Log("Changing clothes, no strings attached.");
     UnityEngine.Object.Instantiate <GameObject>(this.SteamCloud, SteamStudent.transform.position + Vector3.up * 0.81f, Quaternion.identity).transform.parent = SteamStudent.transform;
     SteamStudent.CharacterAnimation.CrossFade(SteamStudent.StripAnim);
     SteamStudent.Pathfinding.canSearch = false;
     SteamStudent.Pathfinding.canMove   = false;
     SteamStudent.MustChangeClothing    = false;
     SteamStudent.Stripping             = true;
     SteamStudent.Routine = false;
 }
Пример #22
0
 // 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;
                 }
             }
         }
     }
 }
Пример #23
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 9)
     {
         this.Student = other.gameObject.GetComponent <StudentScript>();
         if (this.Student != null && !this.Student.Dying && !this.Door.Open && !this.Door.Locked)
         {
             this.Door.Student = this.Student;
             this.Door.OpenDoor();
         }
     }
 }
Пример #24
0
 public void TurnOff()
 {
     this.Prompt.Label[0].text = "     Turn On";
     this.Prompt.enabled       = false;
     this.Prompt.Hide();
     this.MyRenderer.material.mainTexture = this.OffTexture;
     this.RadioNotes.SetActive(false);
     this.CooldownTimer = 1f;
     this.MyAudio.Stop();
     this.Victim = null;
     this.On     = false;
 }
	private void OnTriggerExit(Collider other)
	{
		if (!this.Stink && !this.Amnesia && other.gameObject.layer == 9)
		{
			StudentScript component = other.gameObject.GetComponent<StudentScript>();
			if (component != null)
			{
				Debug.Log(component.Name + " left a smoke cloud and stopped being blind.");
				component.Blind = false;
			}
		}
	}
Пример #26
0
 // Token: 0x06001249 RID: 4681 RVA: 0x00082134 File Offset: 0x00080334
 private void OnCollisionEnter(Collision collision)
 {
     UnityEngine.Object.Instantiate <GameObject>(this.IceExplosion, base.transform.position, Quaternion.identity);
     if (collision.gameObject.layer == 9)
     {
         StudentScript component = collision.gameObject.GetComponent <StudentScript>();
         if (component != null)
         {
             component.SpawnAlarmDisc();
             component.BecomeRagdoll();
         }
     }
     UnityEngine.Object.Destroy(base.gameObject);
 }
Пример #27
0
 // Token: 0x0600021E RID: 542 RVA: 0x00026DF0 File Offset: 0x00024FF0
 public virtual void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 9)
     {
         StudentScript studentScript = (StudentScript)other.gameObject.GetComponent(typeof(StudentScript));
         if (studentScript != null)
         {
             studentScript.Dead = true;
             studentScript.BecomeRagdoll();
             studentScript.Ragdoll.AllRigidbodies[0].isKinematic = false;
             studentScript.Ragdoll.AllRigidbodies[0].AddForce(this.transform.up);
         }
     }
 }
Пример #28
0
        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");
            }
        }
    private void OnTriggerEnter(Collider other)
    {
        StudentScript component = other.gameObject.GetComponent <StudentScript>();

        if (component != null && component.StudentID > 1)
        {
            AudioSource component2 = base.GetComponent <AudioSource>();
            component2.clip  = this.Whoosh;
            component2.pitch = UnityEngine.Random.Range(-0.9f, 1.1f);
            component2.Play();
            base.GetComponent <Animation>().CrossFade(this.AttackAnim);
            this.Attacking = true;
        }
    }
 // Token: 0x06000262 RID: 610 RVA: 0x0002B168 File Offset: 0x00029368
 public virtual void OnCollisionEnter(Collision collision)
 {
     UnityEngine.Object.Instantiate(this.IceExplosion, this.transform.position, Quaternion.identity);
     if (collision.gameObject.layer == 9)
     {
         StudentScript studentScript = (StudentScript)collision.gameObject.GetComponent(typeof(StudentScript));
         if (studentScript != null)
         {
             studentScript.SpawnAlarmDisc();
             studentScript.BecomeRagdoll();
         }
     }
     UnityEngine.Object.Destroy(this.gameObject);
 }