Exemplo n.º 1
0
 public void UpdateCorpse()
 {
     this.Corpse = this.StudentManager.Students[this.StudentID].Ragdoll;
     this.Corpse.transform.parent = base.transform;
     this.Prompt.Label[0].text    = "     Remove Corpse";
     this.Prompt.enabled          = true;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     rend = gameObject.GetComponent <Renderer> ();
     if (gameObject.tag == "Player")
     {
         ragdoll = GetComponent <RagdollScript> ();
     }
 }
Exemplo n.º 3
0
 private void OnTriggerExit(Collider other)
 {
     if (this.Dug && other.gameObject.layer == 11)
     {
         this.Prompt.Label[0].text = "     Fill";
         this.Corpse = null;
         this.Bury   = false;
     }
 }
Exemplo n.º 4
0
 private void OnTriggerEnter(Collider other)
 {
     if (this.Dug && other.gameObject.layer == 11)
     {
         this.Prompt.Label[0].text = "     Bury";
         this.Corpse = other.transform.root.gameObject.GetComponent <RagdollScript>();
         this.Bury   = true;
     }
 }
Exemplo n.º 5
0
    private void OnTriggerEnter(Collider other)
    {
        RagdollScript ragdoll = other.GetComponent <RagdollScript>();

        if (!ragdoll)
        {
            return;
        }

        ragdoll.EnableRagdoll(transform.position, GetComponent <Rigidbody>()?.velocity.magnitude);
    }
Exemplo n.º 6
0
    private void OnTriggerEnter(Collider other)
    {
        RagdollScript ragdoll = other.GetComponent <RagdollScript>();

        if (!ragdoll)
        {
            return;
        }

        ragdoll.EnableRagdoll();
        rbody.isKinematic = false;
        rbody.AddForce(Vector3.up * SpringForce, ForceMode.VelocityChange);
    }
Exemplo n.º 7
0
 private void Awake()
 {
     if (!myHealth)
     {
         myHealth = GetComponent <CharacterHealth>();
     }
     if (!m_RagdollScript)
     {
         m_RagdollScript = GetComponent <RagdollScript>();
     }
     if (!timer)
     {
         timer = GetComponent <Timer>();
     }
 }
    void Start()
    {
        ragdoll             = GetComponent <RagdollScript>();
        currentHealth       = maxHealth;
        skinnedMeshRenderer = GetComponentInChildren <SkinnedMeshRenderer>();
        healthbar           = GetComponentInChildren <UIHealth>();

        var rigidBodies = GetComponentsInChildren <Rigidbody>();

        foreach (var rigidbody in rigidBodies)
        {
            HitBox hitBox = rigidbody.gameObject.AddComponent <HitBox>();
            hitBox.health = this;
        }
    }
 private void OnTriggerEnter(Collider other)
 {
     if (this.Ragdoll == null && other.gameObject.layer == 11)
     {
         this.Ragdoll = other.transform.root.gameObject.GetComponent <RagdollScript>();
         this.Ragdoll.Prompt.Hide();
         this.Ragdoll.Prompt.enabled            = false;
         this.Ragdoll.Prompt.MyCollider.enabled = false;
         this.Ragdoll.BloodPoolSpawner.enabled  = false;
         this.Ragdoll.HideCollider = this.MyCollider;
         this.Ragdoll.Police.HiddenCorpses++;
         this.Ragdoll.Hidden  = true;
         this.Dumpster.Corpse = this.Ragdoll.gameObject;
         this.Dumpster.Victim = this.Ragdoll.Student;
     }
 }
Exemplo n.º 10
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 11)
     {
         GameObject gameObject = other.gameObject.transform.root.gameObject;
         if (!gameObject.GetComponent <StudentScript>().Alive)
         {
             this.Corpse = gameObject.GetComponent <RagdollScript>();
             if (!this.Corpse.Hidden)
             {
                 this.Corpse.HideCollider = this.MyCollider;
                 this.Corpse.Police.HiddenCorpses++;
                 this.Corpse.Hidden = true;
             }
         }
     }
 }
 private void Update()
 {
     if (this.Ragdoll != null)
     {
         if (this.Ragdoll.Prompt.transform.localPosition.y > -10.5f)
         {
             this.Ragdoll.Prompt.transform.localEulerAngles          = new Vector3(-90f, 90f, 0f);
             this.Ragdoll.AllColliders[2].transform.localEulerAngles = Vector3.zero;
             this.Ragdoll.AllColliders[7].transform.localEulerAngles = new Vector3(0f, 0f, -80f);
             this.Ragdoll.Prompt.transform.position = new Vector3(this.Dumpster.transform.position.x, this.Ragdoll.Prompt.transform.position.y, this.Dumpster.transform.position.z);
             return;
         }
         base.GetComponent <AudioSource>().Play();
         this.Dumpster.Slide = true;
         this.Ragdoll        = null;
     }
 }
Exemplo n.º 12
0
    //public int ragdollCount;

    void Start()
    {
        ragdoll = GameObject.FindWithTag("Ragdoll");
        if (ragdoll != null)
        {
            RagdollScript ragdollScript = ragdoll.GetComponent <RagdollScript>();

            ragdoll.transform.position = ragdollStartPos;

            //uncomment this to give ragdoll a color (one of hex colors) at the start of level
            //ragdollScript.ragdollColorNo = ragdollStartColorNo;

            //uncomment this to give ragdoll a count at the start of the level
            //ragdollScript.ragdollCount = ragdollCount;
        }

        Camera.main.orthographicSize = cameraSize;
    }
    void Start()
    {
        KnightMovement = gameObject.GetComponent <KnightMovementScript>();
        knightRagdoll  = GetComponent <RagdollScript>();

        enemyLayer  = LayerMask.GetMask("Enemy");
        floorLayer  = LayerMask.GetMask("Walkable");
        stamina     = 5f;
        attack      = 1;
        attackRate  = 0.0f;
        isAttacking = false;
        isEngaged   = false;

        currentStamina       = stamina;
        staminaBar           = GameObject.Find("Stamina").GetComponent <RectTransform>();
        initLength           = staminaBar.rect.xMax;
        staminaToLengthRatio = initLength / stamina;
        staminaChangeSpeed   = 1f;
        drankPotion          = false;
        healthIncrease       = false;

        raycastDistance = 1.1f;

        //Dania: Damage Feedback function
        rend           = new Renderer[8];
        rend           = gameObject.GetComponentsInChildren <MeshRenderer>();
        standardShader = Shader.Find("Standard");

        //damageStamina = currentStamina;
        timer = setStunTimer;

        carryingShield = false;
        thisAni        = GetComponent <Animation>();

        slightlyUp = new Vector3(0, 1, 0);
    }
Exemplo n.º 14
0
 private void Update()
 {
     if (this.Yandere.transform.position.x > base.transform.position.x && Vector3.Distance(base.transform.position, this.Yandere.transform.position) < 1f)
     {
         if (this.Yandere.Dragging)
         {
             if (this.Ragdoll == null)
             {
                 this.Ragdoll = this.Yandere.Ragdoll.GetComponent <RagdollScript>();
             }
             if (this.Ragdoll.Tranquil)
             {
                 if (!this.Prompt.enabled)
                 {
                     this.Prompt.enabled = true;
                 }
             }
             else if (this.Prompt.enabled)
             {
                 this.Prompt.Hide();
                 this.Prompt.enabled = false;
             }
         }
         else if (this.Prompt.enabled)
         {
             this.Prompt.Hide();
             this.Prompt.enabled = false;
         }
     }
     else if (this.Prompt.enabled)
     {
         this.Prompt.Hide();
         this.Prompt.enabled = false;
     }
     if (this.Prompt.enabled && this.Prompt.Circle[0].fillAmount == 0f)
     {
         this.Prompt.Circle[0].fillAmount = 1f;
         if (!this.Yandere.Chased && this.Yandere.Chasers == 0)
         {
             this.Yandere.TranquilHiding = true;
             this.Yandere.CanMove        = false;
             this.Prompt.enabled         = false;
             this.Prompt.Hide();
             this.Ragdoll.TranqCase   = this;
             this.VictimClubType      = this.Ragdoll.Student.Club;
             this.VictimID            = this.Ragdoll.StudentID;
             this.Door.Prompt.enabled = true;
             this.Door.enabled        = true;
             this.Occupied            = true;
             this.Animate             = true;
             this.Open = true;
         }
     }
     if (this.Animate)
     {
         if (this.Open)
         {
             this.Rotation = Mathf.Lerp(this.Rotation, 105f, Time.deltaTime * 10f);
         }
         else
         {
             this.Rotation = Mathf.Lerp(this.Rotation, 0f, Time.deltaTime * 10f);
             this.Ragdoll.Student.OsanaHairL.transform.localScale = Vector3.MoveTowards(this.Ragdoll.Student.OsanaHairL.transform.localScale, new Vector3(0f, 0f, 0f), Time.deltaTime * 10f);
             this.Ragdoll.Student.OsanaHairR.transform.localScale = Vector3.MoveTowards(this.Ragdoll.Student.OsanaHairR.transform.localScale, new Vector3(0f, 0f, 0f), Time.deltaTime * 10f);
             if (this.Rotation < 1f)
             {
                 this.Animate  = false;
                 this.Rotation = 0f;
             }
         }
         this.Hinge.localEulerAngles = new Vector3(0f, 0f, this.Rotation);
     }
 }
Exemplo n.º 15
0
 // Token: 0x06000277 RID: 631 RVA: 0x000329B8 File Offset: 0x00030DB8
 public void UpdateScene()
 {
     if (this.PoliceArrived)
     {
         if (Input.GetKeyDown(KeyCode.Backspace))
         {
             this.Finish();
         }
         if (this.Phase == 1)
         {
             if (this.Police.PoisonScene)
             {
                 this.Label.text = "The police and the paramedics arrive at school.";
                 this.Phase      = 103;
             }
             else if (this.Police.DrownScene)
             {
                 this.Label.text = "The police arrive at school.";
                 this.Phase      = 104;
             }
             else if (this.Police.ElectroScene)
             {
                 this.Label.text = "The police arrive at school.";
                 this.Phase      = 105;
             }
             else if (this.Police.MurderSuicideScene)
             {
                 this.Label.text = "The police arrive at school, and discover what appears to be the scene of a murder-suicide.";
                 this.Phase++;
             }
             else
             {
                 this.Label.text = "The police arrive at school.";
                 if (this.Police.SuicideScene)
                 {
                     this.Phase = 102;
                 }
                 else
                 {
                     this.Phase++;
                 }
             }
         }
         else if (this.Phase == 2)
         {
             if (this.Police.Corpses == 0)
             {
                 if (!this.Police.PoisonScene && !this.Police.SuicideScene)
                 {
                     this.Label.text = "The police are unable to locate any corpses on school grounds.";
                     this.Phase++;
                 }
                 else
                 {
                     this.Label.text = "The police are unable to locate any other corpses on school grounds.";
                     this.Phase++;
                 }
             }
             else
             {
                 List <string> list = new List <string>();
                 foreach (RagdollScript ragdollScript in this.Police.CorpseList)
                 {
                     if (ragdollScript != null)
                     {
                         this.VictimArray[this.Corpses] = ragdollScript.Student.StudentID;
                         list.Add(ragdollScript.Student.Name);
                         this.Corpses++;
                     }
                 }
                 list.Sort();
                 string text = "The police discover the corpse" + ((list.Count != 1) ? "s" : string.Empty) + " of ";
                 if (list.Count == 1)
                 {
                     this.Label.text = text + list[0] + ".";
                 }
                 else if (list.Count == 2)
                 {
                     this.Label.text = string.Concat(new string[]
                     {
                         text,
                         list[0],
                         " and ",
                         list[1],
                         "."
                     });
                 }
                 else
                 {
                     StringBuilder stringBuilder = new StringBuilder();
                     for (int j = 0; j < list.Count - 1; j++)
                     {
                         stringBuilder.Append(list[j] + ", ");
                     }
                     stringBuilder.Append("and " + list[list.Count - 1] + ".");
                     this.Label.text = text + stringBuilder.ToString();
                 }
                 this.Phase++;
             }
         }
         else if (this.Phase == 3)
         {
             this.WeaponManager.CheckWeapons();
             if (this.WeaponManager.MurderWeapons == 0)
             {
                 if (this.Weapons == 0)
                 {
                     this.Label.text = "The police are unable to locate any murder weapons.";
                     this.Phase     += 2;
                 }
                 else
                 {
                     this.Phase += 2;
                     this.UpdateScene();
                 }
             }
             else
             {
                 this.MurderWeapon = null;
                 this.ID           = 0;
                 while (this.ID < this.WeaponManager.Weapons.Length)
                 {
                     if (this.MurderWeapon == null)
                     {
                         WeaponScript weaponScript = this.WeaponManager.Weapons[this.ID];
                         if (weaponScript != null && weaponScript.Blood.enabled)
                         {
                             weaponScript.Blood.enabled = false;
                             this.MurderWeapon          = weaponScript;
                             this.WeaponID = this.ID;
                         }
                     }
                     this.ID++;
                 }
                 List <string> list2 = new List <string>();
                 this.ID = 0;
                 while (this.ID < this.MurderWeapon.Victims.Length)
                 {
                     if (this.MurderWeapon.Victims[this.ID])
                     {
                         list2.Add(this.JSON.Students[this.ID].Name);
                     }
                     this.ID++;
                 }
                 list2.Sort();
                 this.Victims = list2.Count;
                 string name  = this.MurderWeapon.Name;
                 string str   = (name[name.Length - 1] == 's') ? (name.ToLower() + " that are") : ("a " + name.ToLower() + " that is");
                 string text2 = "The police discover " + str + " stained with the blood of ";
                 if (list2.Count == 1)
                 {
                     this.Label.text = text2 + list2[0] + ".";
                 }
                 else if (list2.Count == 2)
                 {
                     this.Label.text = string.Concat(new string[]
                     {
                         text2,
                         list2[0],
                         " and ",
                         list2[1],
                         "."
                     });
                 }
                 else
                 {
                     StringBuilder stringBuilder2 = new StringBuilder();
                     for (int k = 0; k < list2.Count - 1; k++)
                     {
                         stringBuilder2.Append(list2[k] + ", ");
                     }
                     stringBuilder2.Append("and " + list2[list2.Count - 1] + ".");
                     this.Label.text = text2 + stringBuilder2.ToString();
                 }
                 this.Weapons++;
                 this.Phase++;
             }
         }
         else if (this.Phase == 4)
         {
             if (this.MurderWeapon.FingerprintID == 0)
             {
                 this.Label.text = "The police find no fingerprints on the weapon.";
                 this.Phase      = 3;
             }
             else if (this.MurderWeapon.FingerprintID == 100)
             {
                 this.Label.text = "The police find Yandere-chan's fingerprints on the weapon.";
                 this.Phase      = 100;
             }
             else
             {
                 this.Label.text = "The police find the fingerprints of " + this.JSON.Students[this.WeaponManager.Weapons[this.WeaponID].FingerprintID].Name + " on the weapon.";
                 this.Phase      = 101;
             }
         }
         else if (this.Phase == 5)
         {
             if (SchoolGlobals.HighSecurity)
             {
                 if (!this.SecuritySystem.Evidence)
                 {
                     this.Label.text = "The police investigate the security camera recordings, but cannot find anything incriminating in the footage.";
                     this.Phase++;
                 }
                 else if (!this.SecuritySystem.Masked)
                 {
                     this.Label.text = "The police investigate the security camera recordings, and find incriminating footage of Yandere-chan.";
                     this.Phase      = 100;
                 }
                 else
                 {
                     this.Label.text          = "The police investigate the security camera recordings, and find footage of a suspicious masked person.";
                     this.Police.MaskReported = true;
                     this.Phase = 100;
                 }
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 6)
         {
             if (this.Yandere.Sanity > 33.33333f)
             {
                 if (this.Yandere.Bloodiness > 0f || (this.Yandere.Gloved && this.Yandere.Gloves.Blood.enabled))
                 {
                     if (this.Arrests == 0)
                     {
                         this.Label.text = "The police notice that Yandere-chan's clothing is bloody. They confirm that the blood is not hers. Yandere-chan is unable to convince the police that she did not commit murder.";
                         this.Phase      = 100;
                     }
                     else
                     {
                         this.Label.text = "The police notice that Yandere-chan's clothing is bloody. They confirm that the blood is not hers. Yandere-chan is able to convince the police that she was splashed with blood while witnessing a murder.";
                         if (!this.TranqCase.Occupied)
                         {
                             this.Phase = 8;
                         }
                         else
                         {
                             this.Phase++;
                         }
                     }
                 }
                 else if (this.Police.BloodyClothing > 0)
                 {
                     this.Label.text = "The police find bloody clothing that has traces of Yandere-chan's DNA. Yandere-chan is unable to convince the police that she did not commit murder.";
                     this.Phase      = 100;
                 }
                 else
                 {
                     this.Label.text = "The police question all students in the school, including Yandere-chan. The police are unable to link Yandere-chan to any crimes.";
                     if (!this.TranqCase.Occupied)
                     {
                         this.Phase = 8;
                     }
                     else if (this.TranqCase.VictimID == this.ArrestID)
                     {
                         this.Phase = 8;
                     }
                     else
                     {
                         this.Phase++;
                     }
                 }
             }
             else if (this.Yandere.Bloodiness == 0f)
             {
                 this.Label.text = "The police question Yandere-chan, who exhibits extremely unusual behavior. The police decide to investigate Yandere-chan further, and eventually learn of her crimes.";
                 this.Phase      = 100;
             }
             else
             {
                 this.Label.text = "The police notice that Yandere-chan is covered in blood and exhibiting extremely unusual behavior. The police decide to investigate Yandere-chan further, and eventually learn of her crimes.";
                 this.Phase      = 100;
             }
         }
         else if (this.Phase == 7)
         {
             this.Label.text = "The police discover " + this.JSON.Students[this.TranqCase.VictimID].Name + " inside of a musical instrument case. However, she is unable to recall how she got inside of the case. The police are unable to determine what happened.";
             StudentGlobals.SetStudentMissing(this.TranqCase.VictimID, false);
             this.TranqCase.VictimID = 0;
             this.TranqCase.Occupied = false;
             this.Phase++;
         }
         else if (this.Phase == 8)
         {
             if (this.Police.MaskReported)
             {
                 GameGlobals.MasksBanned = true;
                 if (this.SecuritySystem.Masked)
                 {
                     this.Label.text = "In security camera footage, the killer was wearing a mask. As a result, the police are unable to gather meaningful information about the murderer. To prevent this from ever happening again, the Headmaster decides to ban all masks from the school from this day forward.";
                 }
                 else
                 {
                     this.Label.text = "Witnesses state that the killer was wearing a mask. As a result, the police are unable to gather meaningful information about the murderer. To prevent this from ever happening again, the Headmaster decides to ban all masks from the school from this day forward.";
                 }
                 this.Police.MaskReported = false;
                 this.Phase++;
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 9)
         {
             if (this.Arrests == 0)
             {
                 if (this.DeadPerps == 0)
                 {
                     this.Label.text = "The police do not have enough evidence to perform an arrest. The police investigation ends, and students are free to leave.";
                     this.Phase++;
                 }
                 else
                 {
                     this.Label.text = "The police conclude that a murder-suicide took place, but are unable to take any further action. The police investigation ends, and students are free to leave.";
                     this.Phase++;
                 }
             }
             else
             {
                 this.Label.text = "The police believe that they have arrested the perpetrator of the crime. The police investigation ends, and students are free to leave.";
                 this.Phase++;
             }
         }
         else if (this.Phase == 10)
         {
             this.Label.text = "Yandere-chan stalks Senpai until he has returned home safely, and then returns to her own home.";
             this.Phase++;
         }
         else if (this.Phase == 11)
         {
             if (!StudentGlobals.GetStudentDying(7) && !StudentGlobals.GetStudentDead(7) && !StudentGlobals.GetStudentArrested(7))
             {
                 if (this.Counselor.LectureID > 0)
                 {
                     this.Counselor.Lecturing = true;
                     base.enabled             = false;
                 }
                 else
                 {
                     this.Phase++;
                     this.UpdateScene();
                 }
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 12)
         {
             Debug.Log("Phase 12.");
             if (SchemeGlobals.GetSchemeStage(2) == 3)
             {
                 if (!StudentGlobals.GetStudentDying(7) && !StudentGlobals.GetStudentDead(7) && !StudentGlobals.GetStudentArrested(7))
                 {
                     this.Label.text = "Kokona discovers Sakyu's ring inside of her book bag. She returns the ring to Sakyu, who decides to never let it out of her sight again.";
                     SchemeGlobals.SetSchemeStage(2, 100);
                 }
             }
             else if (SchemeGlobals.GetSchemeStage(5) > 1 && SchemeGlobals.GetSchemeStage(5) < 5)
             {
                 this.Label.text = "A faculty member discovers that an answer sheet for an upcoming test is missing. She changes all of the questions for the test and keeps the new answer sheet with her at all times.";
                 SchemeGlobals.SetSchemeStage(5, 100);
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 13)
         {
             Debug.Log("Phase 13.");
             this.ClubClosed = false;
             this.ClubKicked = false;
             if (this.ClubID < this.ClubArray.Length)
             {
                 if (!ClubGlobals.GetClubClosed(this.ClubArray[this.ClubID]))
                 {
                     this.ClubManager.CheckClub(this.ClubArray[this.ClubID]);
                     if (this.ClubManager.ClubMembers < 5)
                     {
                         ClubGlobals.SetClubClosed(this.ClubArray[this.ClubID], true);
                         this.Label.text = "The " + this.ClubNames[this.ClubID].ToString() + " no longer has enough members to remain operational. The school forces the club to disband.";
                         this.ClubClosed = true;
                         if (ClubGlobals.Club == this.ClubArray[this.ClubID])
                         {
                             ClubGlobals.Club = ClubType.None;
                         }
                     }
                     if (this.ClubManager.LeaderMissing)
                     {
                         ClubGlobals.SetClubClosed(this.ClubArray[this.ClubID], true);
                         this.Label.text = string.Concat(new string[]
                         {
                             "The leader of the ",
                             this.ClubNames[this.ClubID].ToString(),
                             " has gone missing. The ",
                             this.ClubNames[this.ClubID].ToString(),
                             " cannot operate without its leader. The club disbands."
                         });
                         this.ClubClosed = true;
                         if (ClubGlobals.Club == this.ClubArray[this.ClubID])
                         {
                             ClubGlobals.Club = ClubType.None;
                         }
                     }
                     else if (this.ClubManager.LeaderDead)
                     {
                         ClubGlobals.SetClubClosed(this.ClubArray[this.ClubID], true);
                         this.Label.text = "The leader of the " + this.ClubNames[this.ClubID].ToString() + " is dead. The remaining members of the club decide to disband the club.";
                         this.ClubClosed = true;
                         if (ClubGlobals.Club == this.ClubArray[this.ClubID])
                         {
                             ClubGlobals.Club = ClubType.None;
                         }
                     }
                 }
                 if (!ClubGlobals.GetClubClosed(this.ClubArray[this.ClubID]) && !ClubGlobals.GetClubKicked(this.ClubArray[this.ClubID]) && ClubGlobals.Club == this.ClubArray[this.ClubID])
                 {
                     this.ClubManager.CheckGrudge(this.ClubArray[this.ClubID]);
                     if (this.ClubManager.LeaderGrudge)
                     {
                         this.Label.text = string.Concat(new string[]
                         {
                             "Yandere-chan receives a text message from the president of the ",
                             this.ClubNames[this.ClubID].ToString(),
                             ". Yandere-chan is no longer a member of the ",
                             this.ClubNames[this.ClubID].ToString(),
                             ", and is not welcome in the ",
                             this.ClubNames[this.ClubID].ToString(),
                             " room."
                         });
                         ClubGlobals.SetClubKicked(this.ClubArray[this.ClubID], true);
                         ClubGlobals.Club = ClubType.None;
                         this.ClubKicked  = true;
                     }
                     else if (this.ClubManager.ClubGrudge)
                     {
                         this.Label.text = string.Concat(new string[]
                         {
                             "Yandere-chan receives a text message from the president of the ",
                             this.ClubNames[this.ClubID].ToString(),
                             ". There is someone in the ",
                             this.ClubNames[this.ClubID].ToString(),
                             " who hates and fears Yandere-chan. Yandere-chan is no longer a member of the ",
                             this.ClubNames[this.ClubID].ToString(),
                             ", and is not welcome in the ",
                             this.ClubNames[this.ClubID].ToString(),
                             " room."
                         });
                         ClubGlobals.SetClubKicked(this.ClubArray[this.ClubID], true);
                         ClubGlobals.Club = ClubType.None;
                         this.ClubKicked  = true;
                     }
                 }
                 if (!this.ClubClosed && !this.ClubKicked)
                 {
                     this.ClubID++;
                     this.UpdateScene();
                 }
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 14)
         {
             Debug.Log("Phase 14.");
             if (this.TranqCase.Occupied)
             {
                 this.Label.text = "Yandere-chan waits until the clock strikes midnight.\n\nUnder the cover of darkness, Yandere-chan travels back to school and sneaks inside of the main school building.\n\nYandere-chan returns to the instrument case that carries her unconscious victim.\n\nShe pushes the case back to her house, pretending to be a young musician returning home from a late-night show.\n\nYandere-chan drags the case down to her basement and ties up her victim.\n\nExhausted, Yandere-chan goes to sleep.";
                 this.Phase++;
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 15)
         {
             Debug.Log("Phase 15.");
             if (this.ErectFence)
             {
                 this.Label.text         = "To prevent any other students from falling off of the school rooftop, the school erects a fence around the roof.";
                 SchoolGlobals.RoofFence = true;
                 this.ErectFence         = false;
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 16)
         {
             Debug.Log("Phase 16.");
             if (this.Police.CouncilDeath)
             {
                 this.Label.text          = "The student council president has ordered the implementation of heightened security precautions. Security cameras and metal detectors are now present at school.";
                 this.Police.CouncilDeath = false;
             }
             else
             {
                 this.Phase++;
                 this.UpdateScene();
             }
         }
         else if (this.Phase == 17)
         {
             this.Finish();
         }
         else if (this.Phase == 100)
         {
             this.Label.text = "Yandere-chan is arrested by the police. She will never have Senpai.";
             this.GameOver   = true;
         }
         else if (this.Phase == 101)
         {
             int           fingerprintID = this.WeaponManager.Weapons[this.WeaponID].FingerprintID;
             StudentScript studentScript = this.StudentManager.Students[fingerprintID];
             if (studentScript.Alive)
             {
                 if (!studentScript.Tranquil)
                 {
                     this.Label.text = this.JSON.Students[fingerprintID].Name + " is arrested by the police.";
                     StudentGlobals.SetStudentArrested(fingerprintID, true);
                     this.Arrests++;
                 }
                 else
                 {
                     this.Label.text = this.JSON.Students[fingerprintID].Name + " is found asleep inside of a musical instrument case. The police assume that she hid herself inside of the box after committing murder, and arrest her.";
                     StudentGlobals.SetStudentArrested(fingerprintID, true);
                     this.ArrestID           = fingerprintID;
                     this.TranqCase.Occupied = false;
                     this.Arrests++;
                 }
             }
             else
             {
                 bool flag = false;
                 this.ID = 0;
                 while (this.ID < this.VictimArray.Length)
                 {
                     if (this.VictimArray[this.ID] == fingerprintID && !studentScript.MurderSuicide)
                     {
                         flag = true;
                     }
                     this.ID++;
                 }
                 if (!flag)
                 {
                     this.Label.text = this.JSON.Students[fingerprintID].Name + " is dead. The police cannot perform an arrest.";
                     this.DeadPerps++;
                 }
                 else
                 {
                     this.Label.text = this.JSON.Students[fingerprintID].Name + "'s fingerprints are on the same weapon that killed her. The police cannot solve this mystery.";
                 }
             }
             this.Phase = 6;
         }
         else if (this.Phase == 102)
         {
             if (this.Police.SuicideStudent.activeInHierarchy)
             {
                 this.Label.text = "The police inspect the corpse of a student who appears to have fallen to their death from the school rooftop. The police treat the incident as a murder case, and search the school for any other victims.";
                 this.ErectFence = true;
             }
             else
             {
                 this.Label.text = "The police attempt to determine whether or not a student fell to their death from the school rooftop. The police are unable to reach a conclusion.";
             }
             this.ID = 0;
             while (this.ID < this.Police.CorpseList.Length)
             {
                 RagdollScript ragdollScript2 = this.Police.CorpseList[this.ID];
                 if (ragdollScript2 != null && ragdollScript2.Suicide)
                 {
                     this.Police.Corpses--;
                 }
                 this.ID++;
             }
             this.Phase = 2;
         }
         else if (this.Phase == 103)
         {
             this.Label.text = "The paramedics attempt to resuscitate the poisoned student, but they are unable to revive her. The police treat the incident as a murder case, and search the school for any other victims.";
             this.ID         = 0;
             while (this.ID < this.Police.CorpseList.Length)
             {
                 RagdollScript ragdollScript3 = this.Police.CorpseList[this.ID];
                 if (ragdollScript3 != null && ragdollScript3.Poisoned)
                 {
                     this.Police.Corpses--;
                 }
                 this.ID++;
             }
             this.Phase = 2;
         }
         else if (this.Phase == 104)
         {
             this.Label.text = "The police determine that " + this.Police.DrownedStudentName + " died from drowning. The police treat her death as a possible murder, and search the school for any other victims.";
             this.ID         = 0;
             while (this.ID < this.Police.CorpseList.Length)
             {
                 RagdollScript ragdollScript4 = this.Police.CorpseList[this.ID];
                 if (ragdollScript4 != null && ragdollScript4.Drowned)
                 {
                     this.Police.Corpses--;
                 }
                 this.ID++;
             }
             this.Phase = 2;
         }
         else if (this.Phase == 105)
         {
             this.Label.text = "The police determine that " + this.Police.ElectrocutedStudentName + " died from being electrocuted. The police treat her death as a possible murder, and search the school for any other victims.";
             this.ID         = 0;
             while (this.ID < this.Police.CorpseList.Length)
             {
                 RagdollScript ragdollScript5 = this.Police.CorpseList[this.ID];
                 if (ragdollScript5 != null && ragdollScript5.Electrocuted)
                 {
                     this.Police.Corpses--;
                 }
                 this.ID++;
             }
             this.Phase = 2;
         }
     }
 }
Exemplo n.º 16
0
 public override void CollisionEffect(/*Collider c, */ RagdollScript rs)
 {
     //Vector3 collisionForce = GetComponent<Rigidbody>().velocity;
     //rs.ActivateRagdoll(collisionForce * mass, c.GetComponent<Limb>());
     rs.ActivateRagdoll();
 }
Exemplo n.º 17
0
 private void Update()
 {
     if (this.Rotation != 0f)
     {
         this.Speed   += Time.deltaTime * 100f;
         this.Rotation = Mathf.MoveTowards(this.Rotation, 0f, this.Speed * Time.deltaTime);
         if (this.Rotation > -1f)
         {
             AudioSource.PlayClipAtPoint(this.LockerClose, this.Prompt.Yandere.MainCamera.transform.position);
             if (this.Corpse != null)
             {
                 this.Corpse.gameObject.SetActive(false);
             }
             this.Prompt.enabled = true;
             this.Rotation       = 0f;
             this.Speed          = 0f;
             if (this.ABC)
             {
                 this.Prompt.Hide();
                 this.Prompt.enabled = false;
                 base.enabled        = false;
             }
         }
         this.Door.transform.localEulerAngles = new Vector3(0f, this.Rotation, 0f);
     }
     if (this.Corpse == null)
     {
         if (this.Prompt.Yandere.Carrying || this.Prompt.Yandere.Dragging)
         {
             this.Prompt.enabled = true;
             if (this.Prompt.Circle[0].fillAmount == 0f)
             {
                 this.Prompt.Circle[0].fillAmount = 1f;
                 AudioSource.PlayClipAtPoint(this.LockerOpen, this.Prompt.Yandere.MainCamera.transform.position);
                 if (this.Prompt.Yandere.Carrying)
                 {
                     this.Corpse = this.Prompt.Yandere.CurrentRagdoll;
                 }
                 else
                 {
                     this.Corpse = this.Prompt.Yandere.Ragdoll.GetComponent <RagdollScript>();
                 }
                 this.Prompt.Label[0].text = "     Remove Corpse";
                 this.Prompt.Hide();
                 this.Prompt.enabled = false;
                 this.Prompt.Yandere.EmptyHands();
                 this.Prompt.Yandere.NearBodies      = 0;
                 this.Prompt.Yandere.NearestCorpseID = 0;
                 this.Prompt.Yandere.CorpseWarning   = false;
                 this.Prompt.Yandere.StudentManager.UpdateStudents(0);
                 this.Corpse.transform.parent           = base.transform;
                 this.Corpse.transform.position         = base.transform.position + new Vector3(0f, 0.1f, 0f);
                 this.Corpse.transform.localEulerAngles = new Vector3(0f, -90f, 0f);
                 this.Corpse.Police.HiddenCorpses++;
                 this.Corpse.enabled = false;
                 this.Corpse.Hidden  = true;
                 this.StudentID      = this.Corpse.StudentID;
                 if (this.ABC)
                 {
                     this.Corpse.DestroyRigidbodies();
                 }
                 else
                 {
                     this.Corpse.BloodSpawnerCollider.enabled = false;
                     this.Corpse.Prompt.MyCollider.enabled    = false;
                     this.Corpse.BloodPoolSpawner.enabled     = false;
                     this.Corpse.DisableRigidbodies();
                 }
                 this.Corpse.Student.CharacterAnimation.enabled = true;
                 this.Corpse.Student.CharacterAnimation.Play("f02_lockerPose_00");
                 this.Rotation = -180f;
                 return;
             }
         }
         else if (this.Prompt.enabled)
         {
             this.Prompt.Hide();
             this.Prompt.enabled = false;
             return;
         }
     }
     else if (this.Prompt.Circle[0].fillAmount == 0f)
     {
         this.Prompt.Hide();
         this.Prompt.enabled       = false;
         this.Prompt.Label[0].text = "     Hide Corpse";
         AudioSource.PlayClipAtPoint(this.LockerOpen, this.Prompt.Yandere.MainCamera.transform.position);
         this.Corpse.enabled = true;
         this.Corpse.gameObject.SetActive(true);
         this.Corpse.CharacterAnimation.enabled   = false;
         this.Corpse.transform.localPosition      = new Vector3(0f, 0f, 0.5f);
         this.Corpse.transform.localEulerAngles   = new Vector3(0f, -90f, 0.5f);
         this.Corpse.transform.parent             = null;
         this.Corpse.BloodSpawnerCollider.enabled = true;
         this.Corpse.Prompt.MyCollider.enabled    = true;
         this.Corpse.BloodPoolSpawner.NearbyBlood = 0;
         this.Corpse.EnableRigidbodies();
         if (!this.Corpse.Cauterized)
         {
             this.Corpse.BloodPoolSpawner.enabled = true;
         }
         for (int i = 0; i < this.Corpse.Student.FireEmitters.Length; i++)
         {
             this.Corpse.Student.FireEmitters[i].gameObject.SetActive(false);
         }
         this.Corpse   = null;
         this.Rotation = -180f;
     }
 }
    void Start()
    {
        thisRB          = GetComponent <Rigidbody>();
        deadPhase       = 0;
        heDead          = false;
        knightLayers    = new GameObject[3];
        knightLayers[0] = GameObject.Find("Knight Layer");
        knightLayers[1] = GameObject.Find("Knight Layer 1");
        knightLayers[2] = GameObject.Find("Knight Layer 2");
        fader           = GameObject.Find("Fader").GetComponent <Image>();

        GameObject dragon = GameObject.Find("Dragon Layer");

        if (dragon != null)
        {
            dragonBreath = GameObject.Find("Dragon Layer").GetComponent <DragonBreathActivationScript>();
        }

        body         = gameObject.transform.GetChild(0).gameObject;
        shieldButton = GameObject.Find("ShieldUseButton").GetComponent <Button>();
        reviveBoom   = transform.Find("Revive").gameObject;
        reviveBoom.SetActive(false);
        squire         = GameObject.FindGameObjectWithTag("Player");
        squireMR       = squire.GetComponentsInChildren <MeshRenderer>();
        squireMovement = squire.GetComponent <SquireMovementScript>();
        squireAgent    = squire.GetComponent <NavMeshAgent>();
        squireLocation = squire.transform.position;

        Reset();
        knightScript = GetComponent <KnightMovementScript>();
        knightShield = GetComponent <KnightAttackScript>();
        ragdoll      = GetComponent <RagdollScript>();
        thisCC       = GetComponent <CapsuleCollider>();

        thisMR = GetComponentsInChildren <MeshRenderer>();

        cranks            = GameObject.FindGameObjectsWithTag("Crank");
        bombs             = GameObject.FindGameObjectsWithTag("Bomb");
        enemies           = GameObject.FindGameObjectsWithTag("Enemy");
        rotationPlatforms = GameObject.FindGameObjectsWithTag("RotatingBridge");
        pressurePlates    = GameObject.FindGameObjectsWithTag("PressurePlate");

        for (int i = 0; i < enemies.Length; i++)
        {
            enemyPos.Add(enemies[i].transform.localPosition);
            enemyRot.Add(enemies[i].transform.localRotation);
        }

        for (int i = 0; i < bombs.Length; i++)
        {
            bombPos.Add(bombs[i].transform.position);
        }

        for (int i = 0; i < rotationPlatforms.Length; i++)
        {
            platformRotations.Add(rotationPlatforms[i].transform.localRotation);
        }

        for (int i = 0; i < cranks.Length; i++)
        {
            crankRotations.Add(cranks[i].transform.localRotation);
        }
    }
Exemplo n.º 19
0
 public abstract void CollisionEffect(/*Collider c, */ RagdollScript rs);
Exemplo n.º 20
0
 // Token: 0x06000A1D RID: 2589 RVA: 0x0005079C File Offset: 0x0004E99C
 private void Update()
 {
     if (!this.SummonDemon)
     {
         for (int i = 1; i < this.ArmArray.Length; i++)
         {
             if (this.ArmArray[i] != null && this.ArmArray[i].transform.parent != this.LimbParent)
             {
                 this.ArmArray[i] = null;
                 if (i != this.ArmArray.Length - 1)
                 {
                     this.Shuffle(i);
                 }
                 this.Arms--;
                 Debug.Log("Decrement arm count?");
             }
         }
         if (this.Arms > 9)
         {
             this.Yandere.Character.GetComponent <Animation>().CrossFade(this.Yandere.IdleAnim);
             this.Yandere.CanMove = false;
             this.SummonDemon     = true;
             this.MyAudio.Play();
             this.Arms = 0;
         }
     }
     if (!this.SummonFlameDemon)
     {
         this.CorpsesCounted = 0;
         this.Sacrifices     = 0;
         int num = 0;
         while (this.CorpsesCounted < this.Police.Corpses)
         {
             RagdollScript ragdollScript = this.Police.CorpseList[num];
             if (ragdollScript != null)
             {
                 this.CorpsesCounted++;
                 if (ragdollScript.Burned && ragdollScript.Sacrifice && !ragdollScript.Dragged && !ragdollScript.Carried)
                 {
                     this.Sacrifices++;
                 }
             }
             num++;
         }
         if (this.Sacrifices > 4 && !this.Yandere.Chased && this.Yandere.Chasers == 0)
         {
             this.Yandere.Character.GetComponent <Animation>().CrossFade(this.Yandere.IdleAnim);
             this.Yandere.CanMove  = false;
             this.SummonFlameDemon = true;
             this.MyAudio.Play();
         }
     }
     if (!this.SummonEmptyDemon && this.Bodies > 10 && !this.Yandere.Chased && this.Yandere.Chasers == 0)
     {
         this.Yandere.Character.GetComponent <Animation>().CrossFade(this.Yandere.IdleAnim);
         this.Yandere.CanMove  = false;
         this.SummonEmptyDemon = true;
         this.MyAudio.Play();
     }
     if (this.SummonDemon)
     {
         if (this.Phase == 1)
         {
             if (this.ArmArray[1] != null)
             {
                 for (int j = 1; j < 11; j++)
                 {
                     if (this.ArmArray[j] != null)
                     {
                         UnityEngine.Object.Instantiate <GameObject>(this.SmallDarkAura, this.ArmArray[j].transform.position, Quaternion.identity);
                         UnityEngine.Object.Destroy(this.ArmArray[j]);
                     }
                 }
             }
             this.Timer += Time.deltaTime;
             if (this.Timer > 1f)
             {
                 this.Timer = 0f;
                 this.Phase++;
             }
         }
         else if (this.Phase == 2)
         {
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, Mathf.MoveTowards(this.Darkness.color.a, 1f, Time.deltaTime));
             this.Jukebox.Volume = Mathf.MoveTowards(this.Jukebox.Volume, 0f, Time.deltaTime);
             if (this.Darkness.color.a == 1f)
             {
                 SchoolGlobals.SchoolAtmosphere = 0f;
                 this.StudentManager.SetAtmosphere();
                 this.Yandere.transform.eulerAngles = new Vector3(0f, 180f, 0f);
                 this.Yandere.transform.position    = new Vector3(12f, 0.1f, 26f);
                 this.DemonSubtitle.text            = "...revenge...at last...";
                 this.BloodProjector.SetActive(true);
                 this.DemonSubtitle.color = new Color(this.DemonSubtitle.color.r, this.DemonSubtitle.color.g, this.DemonSubtitle.color.b, 0f);
                 this.Skull.Prompt.Hide();
                 this.Skull.Prompt.enabled = false;
                 this.Skull.enabled        = false;
                 this.MyAudio.clip         = this.DemonLine;
                 this.MyAudio.Play();
                 this.Phase++;
             }
         }
         else if (this.Phase == 3)
         {
             this.DemonSubtitle.transform.localPosition = new Vector3(UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f));
             this.DemonSubtitle.color = new Color(this.DemonSubtitle.color.r, this.DemonSubtitle.color.g, this.DemonSubtitle.color.b, Mathf.MoveTowards(this.DemonSubtitle.color.a, 1f, Time.deltaTime));
             if (this.DemonSubtitle.color.a == 1f && Input.GetButtonDown("A"))
             {
                 this.Phase++;
             }
         }
         else if (this.Phase == 4)
         {
             this.DemonSubtitle.transform.localPosition = new Vector3(UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f));
             this.DemonSubtitle.color = new Color(this.DemonSubtitle.color.r, this.DemonSubtitle.color.g, this.DemonSubtitle.color.b, Mathf.MoveTowards(this.DemonSubtitle.color.a, 0f, Time.deltaTime));
             if (this.DemonSubtitle.color.a == 0f)
             {
                 this.MyAudio.clip = this.DemonMusic;
                 this.MyAudio.loop = true;
                 this.MyAudio.Play();
                 this.DemonSubtitle.text = string.Empty;
                 this.Phase++;
             }
         }
         else if (this.Phase == 5)
         {
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, Mathf.MoveTowards(this.Darkness.color.a, 0f, Time.deltaTime));
             if (this.Darkness.color.a == 0f)
             {
                 this.Yandere.Character.GetComponent <Animation>().CrossFade("f02_demonSummon_00");
                 this.Phase++;
             }
         }
         else if (this.Phase == 6)
         {
             this.Timer += Time.deltaTime;
             if (this.Timer > (float)this.ArmsSpawned)
             {
                 GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.DemonArm, this.SpawnPoints[this.ArmsSpawned].position, Quaternion.identity);
                 gameObject.transform.parent = this.Yandere.transform;
                 gameObject.transform.LookAt(this.Yandere.transform);
                 gameObject.transform.localEulerAngles = new Vector3(gameObject.transform.localEulerAngles.x, gameObject.transform.localEulerAngles.y + 180f, gameObject.transform.localEulerAngles.z);
                 this.ArmsSpawned++;
                 gameObject.GetComponent <DemonArmScript>().IdleAnim = ((this.ArmsSpawned % 2 == 1) ? "DemonArmIdleOld" : "DemonArmIdle");
             }
             if (this.ArmsSpawned == 10)
             {
                 this.Yandere.CanMove  = true;
                 this.Yandere.IdleAnim = "f02_demonIdle_00";
                 this.Yandere.WalkAnim = "f02_demonWalk_00";
                 this.Yandere.RunAnim  = "f02_demonRun_00";
                 this.Yandere.Demonic  = true;
                 this.SummonDemon      = false;
             }
         }
     }
     if (this.SummonFlameDemon)
     {
         if (this.Phase == 1)
         {
             foreach (RagdollScript ragdollScript2 in this.Police.CorpseList)
             {
                 if (ragdollScript2 != null && ragdollScript2.Burned && ragdollScript2.Sacrifice && !ragdollScript2.Dragged && !ragdollScript2.Carried)
                 {
                     UnityEngine.Object.Instantiate <GameObject>(this.SmallDarkAura, ragdollScript2.Prompt.transform.position, Quaternion.identity);
                     UnityEngine.Object.Destroy(ragdollScript2.gameObject);
                     this.Yandere.NearBodies--;
                     this.Police.Corpses--;
                 }
             }
             this.Phase++;
         }
         else if (this.Phase == 2)
         {
             this.Timer += Time.deltaTime;
             if (this.Timer > 1f)
             {
                 this.Timer = 0f;
                 this.Phase++;
             }
         }
         else if (this.Phase == 3)
         {
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, Mathf.MoveTowards(this.Darkness.color.a, 1f, Time.deltaTime));
             this.Jukebox.Volume = Mathf.MoveTowards(this.Jukebox.Volume, 0f, Time.deltaTime);
             if (this.Darkness.color.a == 1f)
             {
                 this.Yandere.transform.eulerAngles = new Vector3(0f, 180f, 0f);
                 this.Yandere.transform.position    = new Vector3(12f, 0.1f, 26f);
                 this.DemonSubtitle.text            = "You have proven your worth. Very well. I shall lend you my power.";
                 this.DemonSubtitle.color           = new Color(1f, 0f, 0f, 0f);
                 this.Skull.Prompt.Hide();
                 this.Skull.Prompt.enabled = false;
                 this.Skull.enabled        = false;
                 this.MyAudio.clip         = this.FlameDemonLine;
                 this.MyAudio.Play();
                 this.Phase++;
             }
         }
         else if (this.Phase == 4)
         {
             this.DemonSubtitle.transform.localPosition = new Vector3(UnityEngine.Random.Range(-5f, 5f), UnityEngine.Random.Range(-5f, 5f), UnityEngine.Random.Range(-5f, 5f));
             this.DemonSubtitle.color = new Color(this.DemonSubtitle.color.r, this.DemonSubtitle.color.g, this.DemonSubtitle.color.b, Mathf.MoveTowards(this.DemonSubtitle.color.a, 1f, Time.deltaTime));
             if (this.DemonSubtitle.color.a == 1f && Input.GetButtonDown("A"))
             {
                 this.Phase++;
             }
         }
         else if (this.Phase == 5)
         {
             this.DemonSubtitle.transform.localPosition = new Vector3(UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f));
             this.DemonSubtitle.color = new Color(this.DemonSubtitle.color.r, this.DemonSubtitle.color.g, this.DemonSubtitle.color.b, Mathf.MoveTowards(this.DemonSubtitle.color.a, 0f, Time.deltaTime));
             if (this.DemonSubtitle.color.a == 0f)
             {
                 this.DemonDress.SetActive(true);
                 this.Yandere.MyRenderer.sharedMesh = this.FlameDemonMesh;
                 this.RiggedAccessory.SetActive(true);
                 this.Yandere.FlameDemonic   = true;
                 this.Yandere.Stance.Current = StanceType.Standing;
                 this.Yandere.Sanity         = 100f;
                 this.Yandere.MyRenderer.materials[0].mainTexture = this.Yandere.FaceTexture;
                 this.Yandere.MyRenderer.materials[1].mainTexture = this.Yandere.NudePanties;
                 this.Yandere.MyRenderer.materials[2].mainTexture = this.Yandere.NudePanties;
                 this.DebugMenu.UpdateCensor();
                 this.MyAudio.clip = this.DemonMusic;
                 this.MyAudio.loop = true;
                 this.MyAudio.Play();
                 this.DemonSubtitle.text = string.Empty;
                 this.Phase++;
             }
         }
         else if (this.Phase == 6)
         {
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, Mathf.MoveTowards(this.Darkness.color.a, 0f, Time.deltaTime));
             if (this.Darkness.color.a == 0f)
             {
                 this.Yandere.Character.GetComponent <Animation>().CrossFade("f02_demonSummon_00");
                 this.Phase++;
             }
         }
         else if (this.Phase == 7)
         {
             this.Timer += Time.deltaTime;
             if (this.Timer > 5f)
             {
                 this.MyAudio.PlayOneShot(this.FlameActivate);
                 this.RightFlame.SetActive(true);
                 this.LeftFlame.SetActive(true);
                 this.Phase++;
             }
         }
         else if (this.Phase == 8)
         {
             this.Timer += Time.deltaTime;
             if (this.Timer > 10f)
             {
                 this.Yandere.CanMove  = true;
                 this.Yandere.IdleAnim = "f02_demonIdle_00";
                 this.Yandere.WalkAnim = "f02_demonWalk_00";
                 this.Yandere.RunAnim  = "f02_demonRun_00";
                 this.SummonFlameDemon = false;
             }
         }
     }
     if (this.SummonEmptyDemon)
     {
         if (this.Phase == 1)
         {
             if (this.BodyArray[1] != null)
             {
                 for (int l = 1; l < 12; l++)
                 {
                     if (this.BodyArray[l] != null)
                     {
                         UnityEngine.Object.Instantiate <GameObject>(this.SmallDarkAura, this.BodyArray[l].transform.position, Quaternion.identity);
                         UnityEngine.Object.Destroy(this.BodyArray[l]);
                     }
                 }
             }
             this.Timer += Time.deltaTime;
             if (this.Timer > 1f)
             {
                 this.Timer = 0f;
                 this.Phase++;
                 return;
             }
         }
         else if (this.Phase == 2)
         {
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, Mathf.MoveTowards(this.Darkness.color.a, 1f, Time.deltaTime));
             this.Jukebox.Volume = Mathf.MoveTowards(this.Jukebox.Volume, 0f, Time.deltaTime);
             if (this.Darkness.color.a == 1f)
             {
                 this.Yandere.transform.eulerAngles = new Vector3(0f, 180f, 0f);
                 this.Yandere.transform.position    = new Vector3(12f, 0.1f, 26f);
                 this.DemonSubtitle.text            = "At last...it is time to reclaim our rightful place.";
                 this.BloodProjector.SetActive(true);
                 this.DemonSubtitle.color = new Color(this.DemonSubtitle.color.r, this.DemonSubtitle.color.g, this.DemonSubtitle.color.b, 0f);
                 this.Skull.Prompt.Hide();
                 this.Skull.Prompt.enabled = false;
                 this.Skull.enabled        = false;
                 this.MyAudio.clip         = this.EmptyDemonLine;
                 this.MyAudio.Play();
                 this.Phase++;
                 return;
             }
         }
         else if (this.Phase == 3)
         {
             this.DemonSubtitle.transform.localPosition = new Vector3(UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f));
             this.DemonSubtitle.color = new Color(this.DemonSubtitle.color.r, this.DemonSubtitle.color.g, this.DemonSubtitle.color.b, Mathf.MoveTowards(this.DemonSubtitle.color.a, 1f, Time.deltaTime));
             if (this.DemonSubtitle.color.a == 1f && Input.GetButtonDown("A"))
             {
                 this.Phase++;
                 return;
             }
         }
         else if (this.Phase == 4)
         {
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, Mathf.MoveTowards(this.Darkness.color.a, 1f, Time.deltaTime));
             if (this.Darkness.color.a == 1f)
             {
                 GameGlobals.EmptyDemon = true;
                 SceneManager.LoadScene("LoadingScene");
             }
         }
     }
 }
Exemplo n.º 21
0
 public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     ragdoll = animator.GetComponentInParent <RagdollScript>();
     ragdoll.EnableRagdoll(50.0f);
 }
Exemplo n.º 22
0
 public override void CollisionEffect(RagdollScript rs)
 {
     rs.ActivateRagdoll();
 }