// Token: 0x0600076F RID: 1903 RVA: 0x00070154 File Offset: 0x0006E554
 public void UpdateInstructions()
 {
     this.Steps = this.SchemeSteps[SchemeGlobals.CurrentScheme].Split(new char[]
     {
         '\n'
     });
     if (SchemeGlobals.CurrentScheme > 0)
     {
         if (SchemeGlobals.GetSchemeStage(SchemeGlobals.CurrentScheme) < 100)
         {
             this.HUDIcon.SetActive(true);
             this.HUDInstructions.text = this.Steps[SchemeGlobals.GetSchemeStage(SchemeGlobals.CurrentScheme) - 1].ToString();
         }
         else
         {
             this.Arrow.gameObject.SetActive(false);
             this.HUDIcon.gameObject.SetActive(false);
             this.HUDInstructions.text   = string.Empty;
             SchemeGlobals.CurrentScheme = 0;
         }
     }
     else
     {
         this.HUDIcon.SetActive(false);
         this.HUDInstructions.text = string.Empty;
     }
 }
Beispiel #2
0
 private void Update()
 {
     if (this.Clock.HourTime > 15.5f)
     {
         SchemeGlobals.SetSchemeStage(SchemeGlobals.CurrentScheme, 100);
         this.Clock.Yandere.NotificationManager.CustomText = "Scheme failed! You were too slow.";
         this.Clock.Yandere.NotificationManager.DisplayNotification(NotificationType.Custom);
         this.Schemes.UpdateInstructions();
         base.enabled = false;
     }
     if (this.ClockCheck && this.Clock.HourTime > 8.25f)
     {
         this.Timer += Time.deltaTime;
         if (this.Timer > 1f)
         {
             this.Timer = 0f;
             if (SchemeGlobals.GetSchemeStage(5) == 1)
             {
                 Debug.Log("It's past 8:15 AM, so we're advancing to Stage 2 of Scheme 5.");
                 SchemeGlobals.SetSchemeStage(5, 2);
                 this.Schemes.UpdateInstructions();
                 this.ClockCheck = false;
             }
         }
     }
 }
 // Token: 0x0600076C RID: 1900 RVA: 0x0006FDB0 File Offset: 0x0006E1B0
 public void UpdateSchemeList()
 {
     for (int i = 1; i < this.SchemeNames.Length; i++)
     {
         if (SchemeGlobals.GetSchemeStage(i) == 100)
         {
             UILabel uilabel = this.SchemeNameLabels[i];
             uilabel.color = new Color(uilabel.color.r, uilabel.color.g, uilabel.color.b, 0.5f);
             this.Exclamations[i].enabled  = false;
             this.SchemeCostLabels[i].text = string.Empty;
         }
         else
         {
             this.SchemeCostLabels[i].text = (SchemeGlobals.GetSchemeUnlocked(i) ? string.Empty : this.SchemeCosts[i].ToString());
             if (SchemeGlobals.GetSchemeStage(i) > SchemeGlobals.GetSchemePreviousStage(i))
             {
                 SchemeGlobals.SetSchemePreviousStage(i, SchemeGlobals.GetSchemeStage(i));
                 this.Exclamations[i].enabled = true;
             }
             else
             {
                 this.Exclamations[i].enabled = false;
             }
         }
     }
 }
Beispiel #4
0
 private void Update()
 {
     if (this.Prompt.Circle[0].fillAmount == 0f)
     {
         this.Prompt.Circle[0].fillAmount = 1f;
         if (this.Prompt.Yandere.Inventory.Money >= (float)this.Price)
         {
             if (!this.Sabotaged)
             {
                 UnityEngine.Object.Instantiate <GameObject>(this.Cans[UnityEngine.Random.Range(0, this.Cans.Length)], this.CanSpawn.position, this.CanSpawn.rotation).GetComponent <AudioSource>().pitch = UnityEngine.Random.Range(0.9f, 1.1f);
             }
             if (this.SnackMachine && SchemeGlobals.GetSchemeStage(4) == 3)
             {
                 SchemeGlobals.SetSchemeStage(4, 4);
                 this.Prompt.Yandere.PauseScreen.Schemes.UpdateInstructions();
             }
             this.Prompt.Yandere.Inventory.Money -= (float)this.Price;
             this.Prompt.Yandere.Inventory.UpdateMoney();
             return;
         }
         this.Prompt.Yandere.StudentManager.TutorialWindow.ShowMoneyMessage = true;
         this.Prompt.Yandere.NotificationManager.CustomText = "Not enough money!";
         this.Prompt.Yandere.NotificationManager.DisplayNotification(NotificationType.Custom);
     }
 }
 private void Update()
 {
     if (this.Prompt.Circle[0].fillAmount == 0f)
     {
         this.Prompt.Circle[0].fillAmount = 1f;
         this.Prompt.Yandere.StudentManager.CanAnyoneSeeYandere();
         if (!this.Prompt.Yandere.StudentManager.YandereVisible)
         {
             if (this.StudentID == this.Prompt.Yandere.StudentManager.RivalID && SchemeGlobals.GetSchemeStage(1) == 4)
             {
                 SchemeGlobals.SetSchemeStage(1, 5);
                 this.Prompt.Yandere.PauseScreen.Schemes.UpdateInstructions();
             }
             this.Prompt.Yandere.RivalPhoneTexture      = this.MyRenderer.material.mainTexture;
             this.Prompt.Yandere.Inventory.RivalPhone   = true;
             this.Prompt.Yandere.Inventory.RivalPhoneID = this.StudentID;
             this.Prompt.enabled = false;
             base.enabled        = false;
             this.StolenPhoneDropoff.Prompt.enabled       = true;
             this.StolenPhoneDropoff.Phase                = 1;
             this.StolenPhoneDropoff.Timer                = 0f;
             this.StolenPhoneDropoff.Prompt.Label[0].text = "     Provide Stolen Phone";
             base.gameObject.SetActive(false);
             this.Stolen = true;
             return;
         }
         this.Prompt.Yandere.NotificationManager.CustomText = "Someone is watching!";
         this.Prompt.Yandere.NotificationManager.DisplayNotification(NotificationType.Custom);
     }
 }
Beispiel #6
0
 // Token: 0x060019DB RID: 6619 RVA: 0x000FC9C8 File Offset: 0x000FABC8
 private void Update()
 {
     if (this.Yandere.Armed)
     {
         if (this.Yandere.EquippedWeapon.WeaponID == 6)
         {
             this.Prompt.enabled = true;
             if (this.Prompt.Circle[0].fillAmount == 0f)
             {
                 if (SchemeGlobals.GetSchemeStage(4) == 2)
                 {
                     SchemeGlobals.SetSchemeStage(4, 3);
                     this.Yandere.PauseScreen.Schemes.UpdateInstructions();
                 }
                 if (this.Yandere.StudentManager.Students[11] != null && DateGlobals.Weekday == DayOfWeek.Thursday)
                 {
                     this.Yandere.StudentManager.Students[11].Hungry = true;
                     this.Yandere.StudentManager.Students[11].Fed    = false;
                 }
                 UnityEngine.Object.Instantiate <GameObject>(this.SabotageSparks, new Vector3(-2.5f, 5.3605f, -32.982f), Quaternion.identity);
                 this.VendingMachine.Sabotaged = true;
                 this.Prompt.enabled           = false;
                 this.Prompt.Hide();
                 base.enabled = false;
                 return;
             }
         }
     }
     else if (this.Prompt.enabled)
     {
         this.Prompt.enabled = false;
         this.Prompt.Hide();
     }
 }
Beispiel #7
0
 private void Start()
 {
     if (SchemeGlobals.GetSchemeStage(2) > 2)
     {
         UnityEngine.Object.Destroy(this);
     }
 }
 // Token: 0x0600070D RID: 1805 RVA: 0x0006C1D8 File Offset: 0x0006A5D8
 private void Start()
 {
     if (this.ID == 1)
     {
         if (SchemeGlobals.GetSchemeStage(5) == 100)
         {
             this.Prompt.Hide();
             this.Prompt.enabled = false;
             base.gameObject.SetActive(false);
         }
         else
         {
             if (SchemeGlobals.GetSchemeStage(5) > 4)
             {
                 this.Prompt.Hide();
                 this.Prompt.enabled = false;
             }
             if (DateGlobals.Weekday == DayOfWeek.Friday && this.Clock.HourTime > 13.5f)
             {
                 this.Prompt.Hide();
                 this.Prompt.enabled = false;
                 base.gameObject.SetActive(false);
             }
         }
     }
 }
Beispiel #9
0
 // Token: 0x060006F5 RID: 1781 RVA: 0x0006BC88 File Offset: 0x0006A088
 private void Update()
 {
     if (SchemeGlobals.GetSchemeStage(5) == 5 && DateGlobals.Weekday == DayOfWeek.Friday)
     {
         if (this.Clock.HourTime > 13f)
         {
             this.Prompt.HideButton[0] = false;
             if (this.Clock.HourTime > 13.5f)
             {
                 SchemeGlobals.SetSchemeStage(5, 100);
                 this.Schemes.UpdateInstructions();
                 this.Prompt.HideButton[0] = true;
             }
         }
         if (this.Prompt.Circle[0].fillAmount == 0f)
         {
             SchemeGlobals.SetSchemeStage(5, 6);
             this.Schemes.UpdateInstructions();
             this.Prompt.Yandere.Inventory.DuplicateSheet = false;
             this.Prompt.Hide();
             this.Prompt.enabled = false;
             this.Cheating       = true;
         }
     }
 }
 // Token: 0x060006F3 RID: 1779 RVA: 0x0006BAF8 File Offset: 0x00069EF8
 private void Update()
 {
     if (this.Prompt.Yandere.Inventory.Cigs)
     {
         this.Prompt.HideButton[0] = false;
     }
     if (this.Prompt.Yandere.Inventory.Ring)
     {
         this.Prompt.HideButton[1] = false;
     }
     if (SchemeGlobals.GetSchemeStage(3) == 3)
     {
         this.Prompt.HideButton[0] = (this.Clock.Period == 2 || this.Clock.Period == 4);
         if (this.Prompt.Circle[0].fillAmount == 0f)
         {
             SchemeGlobals.SetSchemeStage(3, 4);
             this.Schemes.UpdateInstructions();
             this.Prompt.Yandere.Inventory.Cigs = false;
             this.Prompt.HideButton[0]          = true;
             base.enabled = false;
         }
     }
     if (SchemeGlobals.GetSchemeStage(2) == 2)
     {
         this.Prompt.HideButton[1] = (this.Clock.Period == 2 || this.Clock.Period == 4);
         if (this.Prompt.Circle[1].fillAmount == 0f)
         {
             SchemeGlobals.SetSchemeStage(2, 3);
             this.Schemes.UpdateInstructions();
             this.Prompt.Yandere.Inventory.Ring = false;
             this.Prompt.HideButton[1]          = true;
             base.enabled = false;
         }
     }
 }
Beispiel #11
0
 // Token: 0x060001B9 RID: 441 RVA: 0x00022FD0 File Offset: 0x000213D0
 private void UpdateList()
 {
     for (int i = 1; i < this.Labels.Length; i++)
     {
         UILabel uilabel = this.Labels[i];
         uilabel.color = new Color(uilabel.color.r, uilabel.color.g, uilabel.color.b, 0.5f);
     }
     if (SchemeGlobals.GetSchemeStage(1) == 2)
     {
         UILabel uilabel2 = this.Labels[1];
         uilabel2.color = new Color(uilabel2.color.r, uilabel2.color.g, uilabel2.color.b, 1f);
     }
     if (SchemeGlobals.GetSchemeStage(2) == 3)
     {
         UILabel uilabel3 = this.Labels[2];
         uilabel3.color = new Color(uilabel3.color.r, uilabel3.color.g, uilabel3.color.b, 1f);
     }
     if (SchemeGlobals.GetSchemeStage(3) == 4)
     {
         UILabel uilabel4 = this.Labels[3];
         uilabel4.color = new Color(uilabel4.color.r, uilabel4.color.g, uilabel4.color.b, 1f);
     }
     if (SchemeGlobals.GetSchemeStage(4) == 5)
     {
         UILabel uilabel5 = this.Labels[4];
         uilabel5.color = new Color(uilabel5.color.r, uilabel5.color.g, uilabel5.color.b, 1f);
     }
     if (SchemeGlobals.GetSchemeStage(5) == 6)
     {
         UILabel uilabel6 = this.Labels[5];
         uilabel6.color = new Color(uilabel6.color.r, uilabel6.color.g, uilabel6.color.b, 1f);
     }
 }
 // Token: 0x06000A93 RID: 2707 RVA: 0x000579A4 File Offset: 0x00055BA4
 public void Fill()
 {
     if (SchemeGlobals.GetSchemeStage(1) == 1)
     {
         SchemeGlobals.SetSchemeStage(1, 2);
         this.Yandere.PauseScreen.Schemes.UpdateInstructions();
     }
     this.UpdateAppearance = true;
     this.Full             = true;
 }
 // Token: 0x06000A92 RID: 2706 RVA: 0x00057940 File Offset: 0x00055B40
 public void Empty()
 {
     if (SchemeGlobals.GetSchemeStage(1) == 2)
     {
         SchemeGlobals.SetSchemeStage(1, 1);
         this.Yandere.PauseScreen.Schemes.UpdateInstructions();
     }
     this.UpdateAppearance = true;
     this.Bloodiness       = 0f;
     this.Bleached         = false;
     this.Gasoline         = false;
     this.Sparkles.Stop();
     this.Full = false;
 }
    // Token: 0x06001736 RID: 5942 RVA: 0x000C566C File Offset: 0x000C386C
    private void Start()
    {
        UILabel uilabel = this.Labels[2];

        uilabel.color = new Color(uilabel.color.r, uilabel.color.g, uilabel.color.b, 0.5f);
        if (HomeGlobals.Night)
        {
            UILabel uilabel2 = this.Labels[1];
            uilabel2.color = new Color(uilabel2.color.r, uilabel2.color.g, uilabel2.color.b, 0.5f);
            uilabel.color  = new Color(uilabel.color.r, uilabel.color.g, uilabel.color.b, 1f);
            Debug.Log("Scheme #6 is at stage: " + SchemeGlobals.GetSchemeStage(6));
            if (SchemeGlobals.GetSchemeStage(6) == 5)
            {
                UILabel uilabel3 = this.Labels[4];
                uilabel3.color = new Color(uilabel3.color.r, uilabel3.color.g, uilabel3.color.b, 1f);
                uilabel3.text  = "Stalker's House";
            }
        }
    }
 // Token: 0x06000504 RID: 1284 RVA: 0x00044734 File Offset: 0x00042B34
 private void Start()
 {
     if (SchoolGlobals.KidnapVictim > 0)
     {
         this.StudentID = SchoolGlobals.KidnapVictim;
         if (StudentGlobals.GetStudentSanity(this.StudentID) == 100f)
         {
             this.AnkleRopes.SetActive(false);
         }
         this.PermanentAngleR = this.TwintailR.eulerAngles;
         this.PermanentAngleL = this.TwintailL.eulerAngles;
         if (!StudentGlobals.GetStudentArrested(this.StudentID) && !StudentGlobals.GetStudentDead(this.StudentID))
         {
             this.Cosmetic.StudentID = this.StudentID;
             this.Cosmetic.enabled   = true;
             this.BreastSize         = this.JSON.Students[this.StudentID].BreastSize;
             this.RightEyeRotOrigin  = this.RightEye.localEulerAngles;
             this.LeftEyeRotOrigin   = this.LeftEye.localEulerAngles;
             this.RightEyeOrigin     = this.RightEye.localPosition;
             this.LeftEyeOrigin      = this.LeftEye.localPosition;
             this.UpdateSanity();
             this.TwintailR.transform.localEulerAngles = new Vector3(0f, 180f, -90f);
             this.TwintailL.transform.localEulerAngles = new Vector3(0f, 0f, -90f);
             this.Blindfold.SetActive(false);
             this.Tripod.SetActive(false);
             if (this.StudentID == 32 && SchemeGlobals.GetSchemeStage(6) > 4)
             {
                 this.Blindfold.SetActive(true);
                 this.Tripod.SetActive(true);
             }
         }
         else
         {
             SchoolGlobals.KidnapVictim = 0;
             base.gameObject.SetActive(false);
         }
     }
     else
     {
         base.gameObject.SetActive(false);
     }
 }
 // Token: 0x0600076D RID: 1901 RVA: 0x0006FEC4 File Offset: 0x0006E2C4
 public void UpdateSchemeInfo()
 {
     if (SchemeGlobals.GetSchemeStage(this.ID) != 100)
     {
         if (!SchemeGlobals.GetSchemeUnlocked(this.ID))
         {
             this.Arrow.gameObject.SetActive(false);
             this.PromptBar.Label[0].text = ((PlayerGlobals.PantyShots < this.SchemeCosts[this.ID]) ? string.Empty : "Purchase");
             this.PromptBar.UpdateButtons();
         }
         else if (SchemeGlobals.CurrentScheme == this.ID)
         {
             this.Arrow.gameObject.SetActive(true);
             this.Arrow.localPosition     = new Vector3(this.Arrow.localPosition.x, -17f - 28f * (float)SchemeGlobals.GetSchemeStage(this.ID), this.Arrow.localPosition.z);
             this.PromptBar.Label[0].text = "Stop Tracking";
             this.PromptBar.UpdateButtons();
         }
         else
         {
             this.Arrow.gameObject.SetActive(false);
             this.PromptBar.Label[0].text = "Start Tracking";
             this.PromptBar.UpdateButtons();
         }
     }
     else
     {
         this.PromptBar.Label[0].text = string.Empty;
         this.PromptBar.UpdateButtons();
     }
     this.Highlight.localPosition = new Vector3(this.Highlight.localPosition.x, 200f - 25f * (float)this.ID, this.Highlight.localPosition.z);
     this.SchemeIcon.mainTexture  = this.SchemeIcons[this.ID];
     this.SchemeDesc.text         = this.SchemeDescs[this.ID];
     if (SchemeGlobals.GetSchemeStage(this.ID) == 100)
     {
         this.SchemeInstructions.text = "This scheme is no longer available.";
     }
     else
     {
         this.SchemeInstructions.text = (SchemeGlobals.GetSchemeUnlocked(this.ID) ? this.SchemeSteps[this.ID] : ("Skills Required:\n" + this.SchemeSkills[this.ID]));
     }
     this.UpdatePantyCount();
 }
 // Token: 0x060019C5 RID: 6597 RVA: 0x000FBB28 File Offset: 0x000F9D28
 private void Update()
 {
     if (this.Prompt.Circle[0].fillAmount == 0f)
     {
         if (this.StudentID == this.Prompt.Yandere.StudentManager.RivalID && SchemeGlobals.GetSchemeStage(1) == 4)
         {
             SchemeGlobals.SetSchemeStage(1, 5);
             this.Prompt.Yandere.PauseScreen.Schemes.UpdateInstructions();
         }
         this.Prompt.Yandere.RivalPhoneTexture      = this.MyRenderer.material.mainTexture;
         this.Prompt.Yandere.Inventory.RivalPhone   = true;
         this.Prompt.Yandere.Inventory.RivalPhoneID = this.StudentID;
         this.Prompt.enabled = false;
         base.enabled        = false;
         this.StolenPhoneDropoff.Prompt.enabled       = true;
         this.StolenPhoneDropoff.Phase                = 1;
         this.StolenPhoneDropoff.Timer                = 0f;
         this.StolenPhoneDropoff.Prompt.Label[0].text = "     Provide Stolen Phone";
         base.gameObject.SetActive(false);
         this.Stolen = true;
     }
 }
 // Token: 0x060007D4 RID: 2004 RVA: 0x000786E4 File Offset: 0x00076AE4
 private void Update()
 {
     if (SchemeGlobals.GetSchemeStage(4) > 1)
     {
         this.Prompt.enabled = true;
         if (this.Prompt.Circle[0].fillAmount == 0f)
         {
             if (SchemeGlobals.GetSchemeStage(4) == 3)
             {
                 SchemeGlobals.SetSchemeStage(4, 4);
             }
             this.Prompt.Yandere.SmartphoneRenderer.material.mainTexture = this.Prompt.Yandere.YanderePhoneTexture;
             this.Prompt.Yandere.Inventory.Schemes.UpdateInstructions();
             this.Prompt.Yandere.Inventory.RivalPhone = false;
             this.Prompt.Yandere.RivalPhone           = false;
             this.RivalPhone.transform.parent         = null;
             this.RivalPhone.transform.position       = base.transform.position;
             this.RivalPhone.transform.eulerAngles    = base.transform.eulerAngles;
             this.RivalPhone.SetActive(true);
             UnityEngine.Object.Destroy(base.gameObject);
         }
     }
 }
Beispiel #19
0
    // Token: 0x060005E6 RID: 1510 RVA: 0x00052124 File Offset: 0x00050524
    private void Update()
    {
        AudioSource component = base.GetComponent <AudioSource>();

        if (!this.Spoken)
        {
            if (SchemeGlobals.GetSchemeStage(2) == 2 && Vector3.Distance(this.Yandere.position, base.transform.position) < 5f)
            {
                this.EventSubtitle.transform.localScale = new Vector3(1f, 1f, 1f);
                this.EventSubtitle.text = "...that...ring...";
                this.Jukebox.Dip        = 0.5f;
                this.Spoken             = true;
                component.Play();
            }
        }
        else if (!component.isPlaying)
        {
            this.EventSubtitle.transform.localScale = Vector3.zero;
            this.EventSubtitle.text = string.Empty;
            this.Jukebox.Dip        = 1f;
            UnityEngine.Object.Destroy(this);
        }
    }
    public static SchemeSaveData ReadFromGlobals()
    {
        SchemeSaveData schemeSaveData = new SchemeSaveData();

        schemeSaveData.currentScheme = SchemeGlobals.CurrentScheme;
        schemeSaveData.darkSecret    = SchemeGlobals.DarkSecret;
        foreach (int num in SchemeGlobals.KeysOfSchemePreviousStage())
        {
            schemeSaveData.schemePreviousStage.Add(num, SchemeGlobals.GetSchemePreviousStage(num));
        }
        foreach (int num2 in SchemeGlobals.KeysOfSchemeStage())
        {
            schemeSaveData.schemeStage.Add(num2, SchemeGlobals.GetSchemeStage(num2));
        }
        foreach (int num3 in SchemeGlobals.KeysOfSchemeStatus())
        {
            if (SchemeGlobals.GetSchemeStatus(num3))
            {
                schemeSaveData.schemeStatus.Add(num3);
            }
        }
        foreach (int num4 in SchemeGlobals.KeysOfSchemeUnlocked())
        {
            if (SchemeGlobals.GetSchemeUnlocked(num4))
            {
                schemeSaveData.schemeUnlocked.Add(num4);
            }
        }
        foreach (int num5 in SchemeGlobals.KeysOfServicePurchased())
        {
            if (SchemeGlobals.GetServicePurchased(num5))
            {
                schemeSaveData.servicePurchased.Add(num5);
            }
        }
        return(schemeSaveData);
    }
 private void Update()
 {
     if (this.Prompt.Yandere.Inventory.RivalPhone)
     {
         this.Prompt.enabled = true;
         if (this.Prompt.Circle[0].fillAmount == 0f)
         {
             if (this.RivalPhone.StudentID == this.Prompt.Yandere.StudentManager.RivalID && SchemeGlobals.GetSchemeStage(1) == 6)
             {
                 SchemeGlobals.SetSchemeStage(1, 7);
                 this.Prompt.Yandere.PauseScreen.Schemes.UpdateInstructions();
             }
             this.Prompt.Yandere.SmartphoneRenderer.material.mainTexture = this.Prompt.Yandere.YanderePhoneTexture;
             this.Prompt.Yandere.Inventory.RivalPhone = false;
             this.Prompt.Yandere.RivalPhone           = false;
             this.RivalPhone.transform.parent         = null;
             if (this.PhoneSpot == null)
             {
                 this.RivalPhone.transform.position = base.transform.position;
             }
             else
             {
                 this.RivalPhone.transform.position = this.PhoneSpot.position;
             }
             this.RivalPhone.transform.eulerAngles = base.transform.eulerAngles;
             this.RivalPhone.gameObject.SetActive(true);
             base.gameObject.SetActive(false);
             return;
         }
     }
     else if (this.Prompt.enabled)
     {
         this.Prompt.enabled = false;
         this.Prompt.Hide();
     }
 }
 // Token: 0x060018EE RID: 6382 RVA: 0x000E8D94 File Offset: 0x000E6F94
 public void Drop()
 {
     if (this.Salty && SchemeGlobals.GetSchemeStage(4) == 5)
     {
         SchemeGlobals.SetSchemeStage(4, 4);
         this.Yandere.PauseScreen.Schemes.UpdateInstructions();
     }
     if (this.TrashCan)
     {
         this.Yandere.MyController.radius = 0.2f;
     }
     if (this.CarryAnimID == 10)
     {
         this.MyRenderer.mesh = this.ClosedBook;
         this.Yandere.LifeNotePen.SetActive(false);
     }
     if (this.Weight)
     {
         this.Yandere.IdleAnim = this.Yandere.OriginalIdleAnim;
         this.Yandere.WalkAnim = this.Yandere.OriginalWalkAnim;
         this.Yandere.RunAnim  = this.Yandere.OriginalRunAnim;
     }
     if (this.BloodCleaner != null)
     {
         this.BloodCleaner.enabled             = true;
         this.BloodCleaner.Pathfinding.enabled = true;
     }
     this.Yandere.PickUp = null;
     if (this.BodyPart)
     {
         base.transform.parent = this.Yandere.LimbParent;
     }
     else
     {
         base.transform.parent = null;
     }
     if (this.LockRotation)
     {
         base.transform.localEulerAngles = new Vector3(0f, base.transform.localEulerAngles.y, 0f);
     }
     if (this.MyRigidbody != null)
     {
         this.MyRigidbody.constraints = this.OriginalConstraints;
         this.MyRigidbody.isKinematic = false;
         this.MyRigidbody.useGravity  = true;
     }
     if (this.Dumped)
     {
         base.transform.position = this.Incinerator.DumpPoint.position;
     }
     else
     {
         this.Prompt.enabled       = true;
         this.MyCollider.enabled   = true;
         this.MyCollider.isTrigger = false;
         if (!this.CanCollide)
         {
             Physics.IgnoreCollision(this.Yandere.GetComponent <Collider>(), this.MyCollider);
         }
     }
     this.Prompt.Carried = false;
     OutlineScript[] outline = this.Outline;
     for (int i = 0; i < outline.Length; i++)
     {
         outline[i].color = (this.Evidence ? this.EvidenceColor : this.OriginalColor);
     }
     base.transform.localScale = this.OriginalScale;
     if (this.BodyPart)
     {
         this.Yandere.NearBodies--;
     }
     this.Yandere.StudentManager.UpdateStudents(0);
     if (this.Clothing && this.Evidence)
     {
         base.transform.parent = this.Yandere.Police.BloodParent;
     }
 }
 // Token: 0x060019A7 RID: 6567 RVA: 0x000FAA20 File Offset: 0x000F8C20
 private void Update()
 {
     if (!this.Clock.StopTime && !this.EventActive && this.Clock.HourTime > this.EventTime)
     {
         this.EventStudent = this.StudentManager.Students[2];
         if (this.EventStudent != null && !this.EventStudent.Distracted && !this.EventStudent.Talking)
         {
             if (!this.EventStudent.WitnessedMurder && !this.EventStudent.Bullied)
             {
                 if (this.EventStudent.Cosmetic.FemaleAccessories[3].activeInHierarchy)
                 {
                     if (SchemeGlobals.GetSchemeStage(2) < 100)
                     {
                         this.RingPrompt       = this.EventStudent.Cosmetic.FemaleAccessories[3].GetComponent <PromptScript>();
                         this.RingCollider     = this.EventStudent.Cosmetic.FemaleAccessories[3].GetComponent <BoxCollider>();
                         this.OriginalPosition = this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition;
                         this.EventStudent.CurrentDestination = this.EventStudent.Destinations[this.EventStudent.Phase];
                         this.EventStudent.Pathfinding.target = this.EventStudent.Destinations[this.EventStudent.Phase];
                         this.EventStudent.Obstacle.checkTime = 99f;
                         this.EventStudent.InEvent            = true;
                         this.EventStudent.Private            = true;
                         this.EventStudent.Prompt.Hide();
                         this.EventActive = true;
                         if (this.EventStudent.Following)
                         {
                             this.EventStudent.Pathfinding.canMove = true;
                             this.EventStudent.Pathfinding.speed   = 1f;
                             this.EventStudent.Following           = false;
                             this.EventStudent.Routine             = true;
                             this.Yandere.Followers--;
                             this.EventStudent.Subtitle.UpdateLabel(SubtitleType.StopFollowApology, 0, 3f);
                             this.EventStudent.Prompt.Label[0].text = "     Talk";
                         }
                     }
                     else
                     {
                         base.enabled = false;
                     }
                 }
                 else
                 {
                     base.enabled = false;
                 }
             }
             else
             {
                 base.enabled = false;
             }
         }
     }
     if (this.EventActive)
     {
         if (this.EventStudent.DistanceToDestination < 0.5f)
         {
             this.EventStudent.Pathfinding.canSearch = false;
             this.EventStudent.Pathfinding.canMove   = false;
         }
         if (this.EventStudent.Alarmed && this.Yandere.TheftTimer > 0f)
         {
             Debug.Log("Event ended because Sakyu saw theft.");
             this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent           = this.EventStudent.LeftMiddleFinger;
             this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition    = this.OriginalPosition;
             this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localEulerAngles = new Vector3(0f, 0f, 0f);
             this.RingCollider.gameObject.SetActive(true);
             this.RingCollider.enabled   = false;
             this.Yandere.Inventory.Ring = false;
             this.EndEvent();
             return;
         }
         if (this.Clock.HourTime > this.EventTime + 0.5f || this.EventStudent.WitnessedMurder || this.EventStudent.Splashed || this.EventStudent.Alarmed || this.EventStudent.Dying || !this.EventStudent.Alive)
         {
             this.EndEvent();
             return;
         }
         if (!this.EventStudent.Pathfinding.canMove)
         {
             if (this.EventPhase == 1)
             {
                 this.Timer += Time.deltaTime;
                 this.EventStudent.Character.GetComponent <Animation>().CrossFade(this.EventAnim[0]);
                 this.EventPhase++;
             }
             else if (this.EventPhase == 2)
             {
                 this.Timer += Time.deltaTime;
                 if (this.Timer > this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].length)
                 {
                     this.EventStudent.Character.GetComponent <Animation>().CrossFade(this.EventStudent.EatAnim);
                     this.EventStudent.Bento.transform.localPosition    = new Vector3(-0.025f, -0.105f, 0f);
                     this.EventStudent.Bento.transform.localEulerAngles = new Vector3(0f, 165f, 82.5f);
                     this.EventStudent.Chopsticks[0].SetActive(true);
                     this.EventStudent.Chopsticks[1].SetActive(true);
                     this.EventStudent.Bento.SetActive(true);
                     this.EventStudent.Lid.SetActive(false);
                     this.RingCollider.enabled = true;
                     this.EventPhase++;
                     this.Timer = 0f;
                 }
                 else if (this.Timer > 4f)
                 {
                     if (this.EventStudent.Cosmetic.FemaleAccessories[3] != null)
                     {
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent      = null;
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.position    = new Vector3(-2.707666f, 12.4695f, -31.136f);
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.eulerAngles = new Vector3(-20f, 180f, 0f);
                     }
                 }
                 else if (this.Timer > 2.5f)
                 {
                     this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent           = this.EventStudent.RightHand;
                     this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition    = this.HoldingPosition;
                     this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localEulerAngles = this.HoldingRotation;
                 }
             }
             else if (this.EventPhase == 3)
             {
                 if (this.Clock.HourTime > 13.375f)
                 {
                     this.EventStudent.Bento.SetActive(false);
                     this.EventStudent.Chopsticks[0].SetActive(false);
                     this.EventStudent.Chopsticks[1].SetActive(false);
                     if (this.RingCollider != null)
                     {
                         this.RingCollider.enabled = false;
                     }
                     if (this.RingPrompt != null)
                     {
                         this.RingPrompt.Hide();
                         this.RingPrompt.enabled = false;
                     }
                     this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].time  = this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].length;
                     this.EventStudent.Character.GetComponent <Animation>()[this.EventAnim[0]].speed = -1f;
                     this.EventStudent.Character.GetComponent <Animation>().CrossFade((this.EventStudent.Cosmetic.FemaleAccessories[3] != null) ? this.EventAnim[0] : this.EventAnim[1]);
                     this.EventPhase++;
                 }
             }
             else if (this.EventPhase == 4)
             {
                 this.Timer += Time.deltaTime;
                 if (this.EventStudent.Cosmetic.FemaleAccessories[3] != null)
                 {
                     if (this.Timer > 2f)
                     {
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent           = this.EventStudent.RightHand;
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition    = this.HoldingPosition;
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localEulerAngles = this.HoldingRotation;
                     }
                     if (this.Timer > 3f)
                     {
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.parent        = this.EventStudent.LeftMiddleFinger;
                         this.EventStudent.Cosmetic.FemaleAccessories[3].transform.localPosition = this.OriginalPosition;
                         this.RingCollider.enabled = false;
                     }
                     if (this.Timer > 6f)
                     {
                         this.EndEvent();
                     }
                 }
                 else if (this.Timer > 1.5f && this.Yandere.transform.position.z < 0f)
                 {
                     this.EventSubtitle.text = this.EventSpeech[0];
                     AudioClipPlayer.Play(this.EventClip[0], this.EventStudent.transform.position + Vector3.up, 5f, 10f, out this.VoiceClip, out this.CurrentClipLength);
                     this.EventPhase++;
                 }
             }
             else if (this.EventPhase == 5)
             {
                 this.Timer += Time.deltaTime;
                 if (this.Timer > 9.5f)
                 {
                     this.EndEvent();
                 }
             }
             float num = Vector3.Distance(this.Yandere.transform.position, this.EventStudent.transform.position);
             if (num < 11f)
             {
                 if (num < 10f)
                 {
                     float num2 = Mathf.Abs((num - 10f) * 0.2f);
                     if (num2 < 0f)
                     {
                         num2 = 0f;
                     }
                     if (num2 > 1f)
                     {
                         num2 = 1f;
                     }
                     this.EventSubtitle.transform.localScale = new Vector3(num2, num2, num2);
                     return;
                 }
                 this.EventSubtitle.transform.localScale = Vector3.zero;
             }
         }
     }
 }
Beispiel #24
0
 // Token: 0x06000165 RID: 357 RVA: 0x00016BD8 File Offset: 0x00014FD8
 private void Update()
 {
     if (this.Show)
     {
         this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, this.Darkness.color.a - Time.deltaTime);
         if (this.Darkness.color.a <= 0f)
         {
             if (Input.GetKeyDown(KeyCode.Backslash))
             {
                 this.GivePoints();
             }
             if (Input.GetKeyDown(KeyCode.P))
             {
                 this.MaxPhysical();
             }
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, 0f);
             if (this.InputManager.TappedDown)
             {
                 this.Selected++;
                 if (this.Selected > 5)
                 {
                     this.Selected = 1;
                 }
                 this.Highlight.localPosition = new Vector3(this.Highlight.localPosition.x, 375f - 125f * (float)this.Selected, this.Highlight.localPosition.z);
                 this.DescLabel.text          = this.Desc[this.Selected];
                 this.UpdateSubjectLabels();
             }
             if (this.InputManager.TappedUp)
             {
                 this.Selected--;
                 if (this.Selected < 1)
                 {
                     this.Selected = 5;
                 }
                 this.Highlight.localPosition = new Vector3(this.Highlight.localPosition.x, 375f - 125f * (float)this.Selected, this.Highlight.localPosition.z);
                 this.DescLabel.text          = this.Desc[this.Selected];
                 this.UpdateSubjectLabels();
             }
             if (this.InputManager.TappedRight && this.StudyPoints > 0 && this.Subject[this.Selected] + this.SubjectTemp[this.Selected] < 100)
             {
                 this.SubjectTemp[this.Selected]++;
                 this.StudyPoints--;
                 this.UpdateLabel();
                 this.UpdateBars();
             }
             if (this.InputManager.TappedLeft && this.SubjectTemp[this.Selected] > 0)
             {
                 this.SubjectTemp[this.Selected]--;
                 this.StudyPoints++;
                 this.UpdateLabel();
                 this.UpdateBars();
             }
             if (Input.GetButtonDown("A") && this.StudyPoints == 0)
             {
                 this.Show = false;
                 this.PromptBar.ClearButtons();
                 this.PromptBar.Show     = false;
                 ClassGlobals.Biology    = this.Subject[1] + this.SubjectTemp[1];
                 ClassGlobals.Chemistry  = this.Subject[2] + this.SubjectTemp[2];
                 ClassGlobals.Language   = this.Subject[3] + this.SubjectTemp[3];
                 ClassGlobals.Physical   = this.Subject[4] + this.SubjectTemp[4];
                 ClassGlobals.Psychology = this.Subject[5] + this.SubjectTemp[5];
                 for (int i = 0; i < 6; i++)
                 {
                     this.Subject[i]    += this.SubjectTemp[i];
                     this.SubjectTemp[i] = 0;
                 }
                 this.CheckForGradeUp();
             }
         }
     }
     else
     {
         this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, this.Darkness.color.a + Time.deltaTime);
         if (this.Darkness.color.a >= 1f)
         {
             this.Darkness.color = new Color(this.Darkness.color.r, this.Darkness.color.g, this.Darkness.color.b, 1f);
             if (!this.GradeUp)
             {
                 if (this.GradeUpWindow.localScale.x > 0.1f)
                 {
                     this.GradeUpWindow.localScale = Vector3.Lerp(this.GradeUpWindow.localScale, Vector3.zero, Time.deltaTime * 10f);
                 }
                 else
                 {
                     this.GradeUpWindow.localScale = Vector3.zero;
                 }
                 if (this.GradeUpWindow.localScale.x < 0.01f)
                 {
                     this.GradeUpWindow.localScale = Vector3.zero;
                     this.CheckForGradeUp();
                     if (!this.GradeUp)
                     {
                         if (ClassGlobals.ChemistryGrade > 0 && this.Poison != null)
                         {
                             this.Poison.SetActive(true);
                         }
                         if (SchemeGlobals.GetSchemeStage(5) == 7)
                         {
                             SchemeGlobals.SetSchemeStage(5, 100);
                             this.PromptBar.ClearButtons();
                             this.PromptBar.Label[0].text = "Continue";
                             this.PromptBar.UpdateButtons();
                             this.CutsceneManager.gameObject.SetActive(true);
                             this.Schemes.UpdateInstructions();
                             base.gameObject.SetActive(false);
                         }
                         else if (!this.Portal.FadeOut)
                         {
                             this.PromptBar.Show = false;
                             this.Portal.Proceed = true;
                             base.gameObject.SetActive(false);
                         }
                     }
                 }
             }
             else
             {
                 if (this.GradeUpWindow.localScale.x == 0f)
                 {
                     if (this.GradeUpSubject == 1)
                     {
                         this.GradeUpName.text = "BIOLOGY RANK UP";
                         this.GradeUpDesc.text = this.Subject1GradeText[this.Grade];
                     }
                     else if (this.GradeUpSubject == 2)
                     {
                         this.GradeUpName.text = "CHEMISTRY RANK UP";
                         this.GradeUpDesc.text = this.Subject2GradeText[this.Grade];
                     }
                     else if (this.GradeUpSubject == 3)
                     {
                         this.GradeUpName.text = "LANGUAGE RANK UP";
                         this.GradeUpDesc.text = this.Subject3GradeText[this.Grade];
                     }
                     else if (this.GradeUpSubject == 4)
                     {
                         this.GradeUpName.text = "PHYSICAL RANK UP";
                         this.GradeUpDesc.text = this.Subject4GradeText[this.Grade];
                     }
                     else if (this.GradeUpSubject == 5)
                     {
                         this.GradeUpName.text = "PSYCHOLOGY RANK UP";
                         this.GradeUpDesc.text = this.Subject5GradeText[this.Grade];
                     }
                     this.PromptBar.ClearButtons();
                     this.PromptBar.Label[0].text = "Continue";
                     this.PromptBar.UpdateButtons();
                     this.PromptBar.Show = true;
                 }
                 else if (this.GradeUpWindow.localScale.x > 0.99f && Input.GetButtonDown("A"))
                 {
                     this.PromptBar.ClearButtons();
                     this.GradeUp = false;
                 }
                 this.GradeUpWindow.localScale = Vector3.Lerp(this.GradeUpWindow.localScale, new Vector3(1f, 1f, 1f), Time.deltaTime * 10f);
             }
         }
     }
 }
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == 9)
     {
         this.Student = other.gameObject.GetComponent <StudentScript>();
         if (this.Student != null)
         {
             Debug.Log("Student's ''Hurry'' is: " + this.Student.Hurry.ToString());
             if (this.Student.enabled && this.Student.DistractionSpot != new Vector3(base.transform.position.x, this.Student.transform.position.y, base.transform.position.z))
             {
                 UnityEngine.Object.Destroy(this.Student.Giggle);
                 this.Student.InvestigationTimer = 0f;
                 this.Student.InvestigationPhase = 0;
                 this.Student.Investigating      = false;
                 this.Student.DiscCheck          = false;
                 this.Student.VisionDistance    += 1f;
                 this.Student.ChalkDust.Stop();
                 this.Student.CleanTimer = 0f;
                 if (!this.Radio)
                 {
                     if (this.Student != this.Originator)
                     {
                         if (this.Student.Clock.Period == 3 && this.Student.BusyAtLunch)
                         {
                             this.StudentIsBusy = true;
                         }
                         if ((this.Student.StudentID == 47 || this.Student.StudentID == 49) && this.Student.StudentManager.ConvoManager.Confirmed)
                         {
                             this.StudentIsBusy = true;
                         }
                         if (this.Student.StudentID == 7 && this.Student.Hurry)
                         {
                             this.Student.Distracted = false;
                         }
                         if (this.Student.StudentID == this.Student.StudentManager.RivalID || this.Student.StudentID == 1)
                         {
                             StudentActionType currentAction = this.Student.CurrentAction;
                         }
                         Debug.Log("An alarm disc has come into contact with: " + this.Student.Name);
                         Debug.Log("Originator is: " + this.Originator);
                         if ((!this.Student.TurnOffRadio && this.Student.Alive && !this.Student.Pushed && !this.Student.Dying && !this.Student.Alarmed && !this.Student.Guarding && !this.Student.Wet && !this.Student.Slave && !this.Student.CheckingNote && !this.Student.WitnessedMurder && !this.Student.WitnessedCorpse && !this.StudentIsBusy && !this.Student.FocusOnYandere && !this.Student.Fleeing && !this.Student.Shoving && !this.Student.SentHome && this.Student.ClubActivityPhase < 16 && !this.Student.Vomiting && !this.Student.Lethal && !this.Student.Headache && !this.Student.Sedated && !this.Student.SenpaiWitnessingRivalDie) || (this.Student.Persona == PersonaType.Protective && this.Originator.StudentID == 11))
                         {
                             Debug.Log("Nothing is stopping " + this.Student.Name + " from reacting.");
                             bool male = this.Student.Male;
                             if (!this.Student.Struggling)
                             {
                                 this.Student.Character.GetComponent <Animation>().CrossFade(this.Student.LeanAnim);
                             }
                             if (this.Originator != null)
                             {
                                 if (this.Originator.WitnessedMurder)
                                 {
                                     this.Student.DistractionSpot = new Vector3(base.transform.position.x, this.Student.Yandere.transform.position.y, base.transform.position.z);
                                 }
                                 else if (this.Originator.Corpse == null)
                                 {
                                     this.Student.DistractionSpot = new Vector3(base.transform.position.x, this.Student.transform.position.y, base.transform.position.z);
                                 }
                                 else
                                 {
                                     this.Student.DistractionSpot = new Vector3(this.Originator.Corpse.transform.position.x, this.Student.transform.position.y, this.Originator.Corpse.transform.position.z);
                                 }
                             }
                             else
                             {
                                 this.Student.DistractionSpot = new Vector3(base.transform.position.x, this.Student.transform.position.y, base.transform.position.z);
                             }
                             this.Student.DiscCheck = true;
                             if (this.Shocking)
                             {
                                 this.Student.Hesitation = 0.5f;
                             }
                             this.Student.Alarm = 200f;
                             if (!this.NoScream)
                             {
                                 this.Student.Giggle = null;
                                 this.InvestigateScream();
                             }
                             if (this.FocusOnYandere)
                             {
                                 this.Student.FocusOnYandere = true;
                             }
                             if (this.Hesitation != 1f)
                             {
                                 this.Student.Hesitation = this.Hesitation;
                             }
                         }
                     }
                 }
                 else
                 {
                     Debug.Log("A student just heard a radio...");
                     if (this.Student.Giggle != null)
                     {
                         this.Student.StopInvestigating();
                     }
                     if (!this.Student.Nemesis && this.Student.Alive && !this.Student.Dying && !this.Student.Guarding && !this.Student.Alarmed && !this.Student.Wet && !this.Student.Slave && !this.Student.Headache && !this.Student.WitnessedMurder && !this.Student.WitnessedCorpse && !this.Student.Lethal && !this.Student.InEvent && !this.Student.Following && !this.Student.Distracting && this.Student.Actions[this.Student.Phase] != StudentActionType.Teaching && this.Student.Actions[this.Student.Phase] != StudentActionType.SitAndTakeNotes && !this.Student.GoAway && this.Student.Routine && !this.Student.CheckingNote && !this.Student.SentHome && this.Student.Persona != PersonaType.Protective && this.Student.CharacterAnimation != null && this.SourceRadio.Victim == null)
                     {
                         if (this.Student.StudentManager.LockerRoomArea.bounds.Contains(base.transform.position) || this.Student.StudentManager.WestBathroomArea.bounds.Contains(base.transform.position) || this.Student.StudentManager.EastBathroomArea.bounds.Contains(base.transform.position) || (this.Student.Club != ClubType.Delinquent && this.Student.StudentManager.IncineratorArea.bounds.Contains(base.transform.position)) || this.Student.StudentManager.HeadmasterArea.bounds.Contains(base.transform.position))
                         {
                             this.Student.Yandere.NotificationManager.CustomText = this.Student.Name + " ignored a radio.";
                             if (this.Student.Yandere.NotificationManager.CustomText != this.Student.Yandere.NotificationManager.PreviousText)
                             {
                                 this.Student.Yandere.NotificationManager.DisplayNotification(NotificationType.Custom);
                             }
                         }
                         else
                         {
                             Debug.Log(this.Student.Name + " has just been alarmed by a radio!");
                             this.Student.CharacterAnimation.CrossFade(this.Student.LeanAnim);
                             this.Student.Pathfinding.canSearch = false;
                             this.Student.Pathfinding.canMove   = false;
                             this.Student.EatingSnack           = false;
                             this.Student.Radio        = this.SourceRadio;
                             this.Student.TurnOffRadio = true;
                             this.Student.Routine      = false;
                             this.Student.GoAway       = false;
                             bool flag = false;
                             if (this.Student.Bento.activeInHierarchy && this.Student.StudentID > 1)
                             {
                                 flag = true;
                             }
                             this.Student.EmptyHands();
                             if (flag)
                             {
                                 GenericBentoScript component = this.Student.Bento.GetComponent <GenericBentoScript>();
                                 component.enabled        = true;
                                 component.Prompt.enabled = true;
                                 this.Student.Bento.SetActive(true);
                                 this.Student.Bento.transform.parent = this.Student.transform;
                                 if (this.Student.Male)
                                 {
                                     this.Student.Bento.transform.localPosition = new Vector3(0f, 0.4266666f, -0.075f);
                                 }
                                 else
                                 {
                                     this.Student.Bento.transform.localPosition = new Vector3(0f, 0.461f, -0.075f);
                                 }
                                 this.Student.Bento.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
                                 this.Student.Bento.transform.parent           = null;
                             }
                             this.Student.SpeechLines.Stop();
                             this.Student.ChalkDust.Stop();
                             this.Student.CleanTimer = 0f;
                             this.Student.RadioTimer = 0f;
                             this.Student.ReadPhase  = 0;
                             this.SourceRadio.Victim = this.Student;
                             if (this.Student.StudentID == 97 && SchemeGlobals.GetSchemeStage(5) == 3)
                             {
                                 SchemeGlobals.SetSchemeStage(5, 4);
                                 this.Student.Yandere.PauseScreen.Schemes.UpdateInstructions();
                                 base.enabled = false;
                             }
                             this.Student.Yandere.NotificationManager.CustomText = this.Student.Name + " hears the radio.";
                             this.Student.Yandere.NotificationManager.DisplayNotification(NotificationType.Custom);
                         }
                     }
                 }
             }
         }
     }
     this.Student = null;
 }
Beispiel #26
0
 // Token: 0x06001D12 RID: 7442 RVA: 0x0015A954 File Offset: 0x00158B54
 public void Drop()
 {
     if (this.WeaponID == 6 && SchemeGlobals.GetSchemeStage(4) == 2)
     {
         SchemeGlobals.SetSchemeStage(4, 1);
         this.Yandere.PauseScreen.Schemes.UpdateInstructions();
     }
     Debug.Log("A " + base.gameObject.name + " has been dropped.");
     if (this.WeaponID == 11)
     {
         this.Yandere.IdleAnim = "CyborgNinja_Idle_Unarmed";
         this.Yandere.WalkAnim = this.Yandere.OriginalWalkAnim;
         this.Yandere.RunAnim  = "CyborgNinja_Run_Unarmed";
     }
     if (this.StartLow)
     {
         this.Prompt.OffsetY[3] = this.OriginalOffset;
     }
     if (this.Yandere.EquippedWeapon == this)
     {
         this.Yandere.EquippedWeapon = null;
         this.Yandere.Equipped       = 0;
         this.Yandere.StudentManager.UpdateStudents(0);
     }
     base.gameObject.SetActive(true);
     base.transform.parent        = null;
     this.MyRigidbody.constraints = RigidbodyConstraints.None;
     this.MyRigidbody.isKinematic = false;
     this.MyRigidbody.useGravity  = true;
     this.MyCollider.isTrigger    = false;
     if (this.Dumped)
     {
         base.transform.position = this.Incinerator.DumpPoint.position;
     }
     else
     {
         this.Prompt.enabled     = true;
         this.MyCollider.enabled = true;
         if (this.Yandere.GetComponent <Collider>().enabled)
         {
             Physics.IgnoreCollision(this.Yandere.GetComponent <Collider>(), this.MyCollider);
         }
     }
     if (this.Evidence)
     {
         this.Yandere.Police.BloodyWeapons++;
     }
     if (Vector3.Distance(this.StartingPosition, base.transform.position) > 5f && Vector3.Distance(base.transform.position, this.Yandere.StudentManager.WeaponBoxSpot.parent.position) > 1f)
     {
         if (!this.Misplaced)
         {
             this.Prompt.Yandere.WeaponManager.MisplacedWeapons++;
             this.Misplaced = true;
         }
     }
     else if (this.Misplaced)
     {
         this.Prompt.Yandere.WeaponManager.MisplacedWeapons--;
         this.Misplaced = false;
     }
     this.ID = 0;
     while (this.ID < this.Outline.Length)
     {
         this.Outline[this.ID].color = (this.Evidence ? this.EvidenceColor : this.OriginalColor);
         this.ID++;
     }
     if (base.transform.position.y > 1000f)
     {
         base.transform.position = new Vector3(12f, 0f, 28f);
     }
     if (this.WeaponID == 26)
     {
         base.transform.parent           = this.Parent;
         base.transform.localEulerAngles = Vector3.zero;
         base.transform.localPosition    = Vector3.zero;
         this.MyRigidbody.isKinematic    = true;
         this.WeaponTrail.SetActive(false);
     }
 }
Beispiel #27
0
 // Token: 0x06001D11 RID: 7441 RVA: 0x0015A2CC File Offset: 0x001584CC
 private void LateUpdate()
 {
     if (this.Prompt.Circle[3].fillAmount == 0f)
     {
         if (this.WeaponID == 6 && SchemeGlobals.GetSchemeStage(4) == 1)
         {
             SchemeGlobals.SetSchemeStage(4, 2);
             this.Yandere.PauseScreen.Schemes.UpdateInstructions();
         }
         this.Prompt.Circle[3].fillAmount = 1f;
         if (this.Prompt.Suspicious)
         {
             this.Yandere.TheftTimer = 0.1f;
         }
         if (this.Dangerous || this.Suspicious)
         {
             this.Yandere.WeaponTimer = 0.1f;
         }
         if (!this.Yandere.Gloved)
         {
             this.FingerprintID = 100;
         }
         this.ID = 0;
         while (this.ID < this.Outline.Length)
         {
             this.Outline[this.ID].color = new Color(0f, 0f, 0f, 1f);
             this.ID++;
         }
         base.transform.parent        = this.Yandere.ItemParent;
         base.transform.localPosition = Vector3.zero;
         if (this.Type == WeaponType.Bat)
         {
             base.transform.localEulerAngles = new Vector3(0f, 0f, -90f);
         }
         else
         {
             base.transform.localEulerAngles = Vector3.zero;
         }
         this.MyCollider.enabled      = false;
         this.MyRigidbody.constraints = RigidbodyConstraints.FreezeAll;
         if (this.Yandere.Equipped == 3)
         {
             this.Yandere.Weapon[3].Drop();
         }
         if (this.Yandere.PickUp != null)
         {
             this.Yandere.PickUp.Drop();
         }
         if (this.Yandere.Dragging)
         {
             this.Yandere.Ragdoll.GetComponent <RagdollScript>().StopDragging();
         }
         if (this.Yandere.Carrying)
         {
             this.Yandere.StopCarrying();
         }
         if (this.Concealable)
         {
             if (this.Yandere.Weapon[1] == null)
             {
                 if (this.Yandere.Weapon[2] != null)
                 {
                     this.Yandere.Weapon[2].gameObject.SetActive(false);
                 }
                 this.Yandere.Equipped       = 1;
                 this.Yandere.EquippedWeapon = this;
             }
             else if (this.Yandere.Weapon[2] == null)
             {
                 if (this.Yandere.Weapon[1] != null)
                 {
                     this.Yandere.Weapon[1].gameObject.SetActive(false);
                 }
                 this.Yandere.Equipped       = 2;
                 this.Yandere.EquippedWeapon = this;
             }
             else if (this.Yandere.Weapon[2].gameObject.activeInHierarchy)
             {
                 this.Yandere.Weapon[2].Drop();
                 this.Yandere.Equipped       = 2;
                 this.Yandere.EquippedWeapon = this;
             }
             else
             {
                 this.Yandere.Weapon[1].Drop();
                 this.Yandere.Equipped       = 1;
                 this.Yandere.EquippedWeapon = this;
             }
         }
         else
         {
             if (this.Yandere.Weapon[1] != null)
             {
                 this.Yandere.Weapon[1].gameObject.SetActive(false);
             }
             if (this.Yandere.Weapon[2] != null)
             {
                 this.Yandere.Weapon[2].gameObject.SetActive(false);
             }
             this.Yandere.Equipped       = 3;
             this.Yandere.EquippedWeapon = this;
         }
         this.Yandere.StudentManager.UpdateStudents(0);
         this.Prompt.Hide();
         this.Prompt.enabled        = false;
         this.Yandere.NearestPrompt = null;
         if (this.WeaponID == 9 || this.WeaponID == 10 || this.WeaponID == 12 || this.WeaponID == 25)
         {
             this.SuspicionCheck();
         }
         if (this.Yandere.EquippedWeapon.Suspicious)
         {
             if (!this.Yandere.WeaponWarning)
             {
                 this.Yandere.NotificationManager.DisplayNotification(NotificationType.Armed);
                 this.Yandere.WeaponWarning = true;
             }
         }
         else
         {
             this.Yandere.WeaponWarning = false;
         }
         this.Yandere.WeaponMenu.UpdateSprites();
         this.Yandere.WeaponManager.UpdateLabels();
         if (this.Evidence)
         {
             this.Yandere.Police.BloodyWeapons--;
         }
         if (this.WeaponID == 11)
         {
             this.Yandere.IdleAnim = "CyborgNinja_Idle_Armed";
             this.Yandere.WalkAnim = "CyborgNinja_Walk_Armed";
             this.Yandere.RunAnim  = "CyborgNinja_Run_Armed";
         }
         if (this.WeaponID == 26)
         {
             this.WeaponTrail.SetActive(true);
         }
         this.KinematicTimer = 0f;
         AudioSource.PlayClipAtPoint(this.EquipClip, this.Yandere.MainCamera.transform.position);
     }
     if (this.Yandere.EquippedWeapon == this && this.Yandere.Armed)
     {
         base.transform.localScale = new Vector3(1f, 1f, 1f);
         if (!this.Yandere.Struggling)
         {
             if (this.Yandere.CanMove)
             {
                 base.transform.localPosition = Vector3.zero;
                 if (this.Type == WeaponType.Bat)
                 {
                     base.transform.localEulerAngles = new Vector3(0f, 0f, -90f);
                 }
                 else
                 {
                     base.transform.localEulerAngles = Vector3.zero;
                 }
             }
         }
         else
         {
             base.transform.localPosition = new Vector3(-0.01f, 0.005f, -0.01f);
         }
     }
     if (this.Dumped)
     {
         this.DumpTimer += Time.deltaTime;
         if (this.DumpTimer > 1f)
         {
             this.Yandere.Incinerator.MurderWeapons++;
             UnityEngine.Object.Destroy(base.gameObject);
         }
     }
     if (base.transform.parent == this.Yandere.ItemParent && this.Concealable && this.Yandere.Weapon[1] != this && this.Yandere.Weapon[2] != this)
     {
         this.Drop();
     }
 }
    private void Update()
    {
        bool selfie = this.Yandere.Selfie;

        if (this.Snapping)
        {
            if (this.Yandere.Noticed)
            {
                this.Yandere.Shutter.ResumeGameplay();
                this.Yandere.StopAiming();
            }
            else if (this.Close)
            {
                this.currentPercent += 60f * Time.unscaledDeltaTime;
                while (this.currentPercent >= 1f)
                {
                    this.Frame           = Mathf.Min(this.Frame + 1, 8);
                    this.currentPercent -= 1f;
                }
                this.Sprite.spriteName = "Shutter" + this.Frame.ToString();
                if (this.Frame == 8)
                {
                    this.StudentManager.GhostChan.gameObject.SetActive(true);
                    this.PhotoDescription.SetActive(false);
                    this.PhotoDescLabel.text = "";
                    this.StudentManager.GhostChan.Look();
                    this.CheckPhoto();
                    if (this.PhotoDescLabel.text == "")
                    {
                        this.PhotoDescLabel.text = "Cannot determine subject of photo. Try again.";
                    }
                    this.PhotoDescription.SetActive(true);
                    this.SmartphoneCamera.targetTexture = null;
                    this.Yandere.PhonePromptBar.Show    = false;
                    this.NotificationManager.SetActive(false);
                    this.HeartbeatCamera.SetActive(false);
                    this.Yandere.SelfieGuide.SetActive(false);
                    this.MainCamera.enabled = false;
                    this.PhotoIcons.SetActive(true);
                    this.SubPanel.SetActive(false);
                    this.Panel.SetActive(false);
                    this.Close = false;
                    this.PromptBar.ClearButtons();
                    this.PromptBar.Label[0].text = "Save";
                    this.PromptBar.Label[1].text = "Delete";
                    if (!this.Yandere.RivalPhone)
                    {
                        this.PromptBar.Label[2].text = "Send";
                    }
                    else if (this.PantiesX.activeInHierarchy)
                    {
                        this.PromptBar.Label[0].text = "";
                    }
                    this.PromptBar.UpdateButtons();
                    this.PromptBar.Show = true;
                    Time.timeScale      = 0.0001f;
                }
            }
            else
            {
                this.currentPercent += 60f * Time.unscaledDeltaTime;
                while (this.currentPercent >= 1f)
                {
                    this.Frame           = Mathf.Max(this.Frame - 1, 1);
                    this.currentPercent -= 1f;
                }
                this.Sprite.spriteName = "Shutter" + this.Frame.ToString();
                if (this.Frame == 1)
                {
                    this.Sprite.color = new Color(this.Sprite.color.r, this.Sprite.color.g, this.Sprite.color.b, 0f);
                    this.Snapping     = false;
                }
            }
        }
        else if (this.Yandere.Aiming)
        {
            this.TargetStudent = 0;
            this.Timer        += Time.deltaTime;
            if (this.Timer > 0.5f)
            {
                Vector3 direction;
                if (!this.Yandere.Selfie)
                {
                    direction = this.SmartphoneCamera.transform.TransformDirection(Vector3.forward);
                }
                else
                {
                    direction = this.SelfieRayParent.TransformDirection(Vector3.forward);
                }
                if (Physics.Raycast(this.SmartphoneCamera.transform.position, direction, out this.hit, float.PositiveInfinity, this.OnlyPhotography))
                {
                    if (this.hit.collider.gameObject.name == "Face")
                    {
                        GameObject gameObject = this.hit.collider.gameObject.transform.root.gameObject;
                        this.FaceStudent = gameObject.GetComponent <StudentScript>();
                        if (this.FaceStudent != null)
                        {
                            this.TargetStudent = this.FaceStudent.StudentID;
                            if (this.TargetStudent > 1)
                            {
                                this.ReactionDistance = 1.66666f;
                            }
                            else
                            {
                                this.ReactionDistance = this.FaceStudent.VisionDistance;
                            }
                            bool enabled = this.FaceStudent.ShoeRemoval.enabled;
                            if (!this.FaceStudent.Alarmed && !this.FaceStudent.Dying && !this.FaceStudent.Distracted && !this.FaceStudent.InEvent && !this.FaceStudent.Wet && this.FaceStudent.Schoolwear > 0 && !this.FaceStudent.Fleeing && !this.FaceStudent.Following && !enabled && !this.FaceStudent.HoldingHands && this.FaceStudent.Actions[this.FaceStudent.Phase] != StudentActionType.Mourn && !this.FaceStudent.Guarding && !this.FaceStudent.Confessing && !this.FaceStudent.DiscCheck && !this.FaceStudent.TurnOffRadio && !this.FaceStudent.Investigating && !this.FaceStudent.Distracting && !this.FaceStudent.WitnessedLimb && !this.FaceStudent.WitnessedWeapon && !this.FaceStudent.WitnessedBloodPool && !this.FaceStudent.WitnessedBloodyWeapon && Vector3.Distance(this.Yandere.transform.position, gameObject.transform.position) < this.ReactionDistance && this.FaceStudent.CanSeeObject(this.Yandere.gameObject, this.Yandere.transform.position + Vector3.up))
                            {
                                if (this.MissionMode)
                                {
                                    this.PenaltyTimer += Time.deltaTime;
                                    if (this.PenaltyTimer > 1f)
                                    {
                                        this.FaceStudent.Reputation.PendingRep -= -10f;
                                        this.PenaltyTimer = 0f;
                                    }
                                }
                                if (!this.FaceStudent.CameraReacting)
                                {
                                    if (this.FaceStudent.enabled && !this.FaceStudent.Stop)
                                    {
                                        if ((this.FaceStudent.DistanceToDestination < 5f && this.FaceStudent.Actions[this.FaceStudent.Phase] == StudentActionType.Graffiti) || (this.FaceStudent.DistanceToDestination < 5f && this.FaceStudent.Actions[this.FaceStudent.Phase] == StudentActionType.Bully))
                                        {
                                            this.FaceStudent.PhotoPatience = 0f;
                                            this.FaceStudent.KilledMood    = true;
                                            this.FaceStudent.Ignoring      = true;
                                            this.PenaltyTimer = 1f;
                                            this.Penalize();
                                        }
                                        else if (this.FaceStudent.PhotoPatience > 0f)
                                        {
                                            if (this.FaceStudent.StudentID > 1)
                                            {
                                                if ((this.Yandere.Bloodiness > 0f && !this.Yandere.Paint) || (double)this.Yandere.Sanity < 33.33333)
                                                {
                                                    this.FaceStudent.Alarm += 200f;
                                                }
                                                else
                                                {
                                                    this.FaceStudent.CameraReact();
                                                }
                                            }
                                            else
                                            {
                                                this.FaceStudent.Alarm         += Time.deltaTime * (100f / this.FaceStudent.DistanceToPlayer) * this.FaceStudent.Paranoia * this.FaceStudent.Perception * this.FaceStudent.DistanceToPlayer * 2f;
                                                this.FaceStudent.YandereVisible = true;
                                            }
                                        }
                                        else
                                        {
                                            this.Penalize();
                                        }
                                    }
                                }
                                else
                                {
                                    this.FaceStudent.PhotoPatience = Mathf.MoveTowards(this.FaceStudent.PhotoPatience, 0f, Time.deltaTime);
                                    if (this.FaceStudent.PhotoPatience > 0f)
                                    {
                                        this.FaceStudent.CameraPoseTimer = 1f;
                                        if (this.MissionMode)
                                        {
                                            this.FaceStudent.PhotoPatience = 0f;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else if (this.hit.collider.gameObject.name == "Panties" || this.hit.collider.gameObject.name == "Skirt")
                    {
                        GameObject gameObject2 = this.hit.collider.gameObject.transform.root.gameObject;
                        if (Physics.Raycast(this.SmartphoneCamera.transform.position, direction, out this.hit, float.PositiveInfinity, this.OnlyCharacters))
                        {
                            if (Vector3.Distance(this.Yandere.transform.position, gameObject2.transform.position) < 5f)
                            {
                                if (this.hit.collider.gameObject == gameObject2)
                                {
                                    if (!this.Yandere.Lewd)
                                    {
                                        this.Yandere.NotificationManager.DisplayNotification(NotificationType.Lewd);
                                    }
                                    this.Yandere.Lewd = true;
                                }
                                else
                                {
                                    this.Yandere.Lewd = false;
                                }
                            }
                            else
                            {
                                this.Yandere.Lewd = false;
                            }
                        }
                    }
                    else
                    {
                        this.Yandere.Lewd = false;
                    }
                }
                else
                {
                    this.Yandere.Lewd = false;
                }
            }
        }
        else
        {
            this.Timer = 0f;
        }
        if (this.TookPhoto)
        {
            this.ResumeGameplay();
        }
        if (!this.DisplayError)
        {
            if (this.PhotoIcons.activeInHierarchy && !this.Snapping && !this.TextMessages.gameObject.activeInHierarchy)
            {
                if (Input.GetButtonDown("A"))
                {
                    if (!this.Yandere.RivalPhone)
                    {
                        bool flag  = !this.BullyX.activeInHierarchy;
                        bool flag2 = !this.SenpaiX.activeInHierarchy;
                        this.PromptBar.transform.localPosition = new Vector3(this.PromptBar.transform.localPosition.x, -627f, this.PromptBar.transform.localPosition.z);
                        this.PromptBar.ClearButtons();
                        this.PromptBar.Show = false;
                        this.PhotoIcons.SetActive(false);
                        this.ID        = 0;
                        this.FreeSpace = false;
                        while (this.ID < 26)
                        {
                            this.ID++;
                            if (!PlayerGlobals.GetPhoto(this.ID))
                            {
                                this.FreeSpace = true;
                                this.Slot      = this.ID;
                                this.ID        = 26;
                            }
                        }
                        if (this.FreeSpace)
                        {
                            ScreenCapture.CaptureScreenshot(Application.streamingAssetsPath + "/Photographs/Photo_" + this.Slot.ToString() + ".png");
                            this.TookPhoto = true;
                            Debug.Log("Setting Photo " + this.Slot + " to ''true''.");
                            PlayerGlobals.SetPhoto(this.Slot, true);
                            if (flag)
                            {
                                Debug.Log("Saving a bully photo!");
                                int studentID = this.BullyPhotoCollider.transform.parent.gameObject.GetComponent <StudentScript>().StudentID;
                                if (this.StudentManager.Students[studentID].Club != ClubType.Bully)
                                {
                                    PlayerGlobals.SetBullyPhoto(this.Slot, studentID);
                                }
                                else
                                {
                                    PlayerGlobals.SetBullyPhoto(this.Slot, this.StudentManager.Students[studentID].DistractionTarget.StudentID);
                                }
                            }
                            if (flag2)
                            {
                                PlayerGlobals.SetSenpaiPhoto(this.Slot, true);
                            }
                            if (this.AirGuitarShot)
                            {
                                TaskGlobals.SetGuitarPhoto(this.Slot, true);
                                this.TaskManager.UpdateTaskStatus();
                            }
                            if (this.KittenShot)
                            {
                                TaskGlobals.SetKittenPhoto(this.Slot, true);
                                this.TaskManager.UpdateTaskStatus();
                            }
                            if (this.HorudaShot)
                            {
                                TaskGlobals.SetHorudaPhoto(this.Slot, true);
                                this.TaskManager.UpdateTaskStatus();
                            }
                            if (this.OsanaShot && SchemeGlobals.GetSchemeStage(4) == 6)
                            {
                                SchemeGlobals.SetSchemeStage(4, 7);
                                this.Yandere.PauseScreen.Schemes.UpdateInstructions();
                            }
                        }
                        else
                        {
                            this.DisplayError = true;
                        }
                    }
                    else if (!this.PantiesX.activeInHierarchy)
                    {
                        if (SchemeGlobals.GetSchemeStage(1) == 5)
                        {
                            SchemeGlobals.SetSchemeStage(1, 6);
                            this.Schemes.UpdateInstructions();
                        }
                        this.StudentManager.CommunalLocker.RivalPhone.LewdPhotos = true;
                        this.ResumeGameplay();
                    }
                }
                if (!this.Yandere.RivalPhone && Input.GetButtonDown("X"))
                {
                    this.Panel.SetActive(true);
                    this.MainMenu.SetActive(false);
                    this.PauseScreen.Show          = true;
                    this.PauseScreen.Panel.enabled = true;
                    this.PromptBar.ClearButtons();
                    this.PromptBar.Label[1].text = "Exit";
                    if (this.PantiesX.activeInHierarchy)
                    {
                        this.PromptBar.Label[3].text = "Interests";
                    }
                    else
                    {
                        this.PromptBar.Label[3].text = "";
                    }
                    this.PromptBar.UpdateButtons();
                    if (!this.InfoX.activeInHierarchy)
                    {
                        this.PauseScreen.Sideways = true;
                        StudentGlobals.SetStudentPhotographed(this.Student.StudentID, true);
                        this.ID = 0;
                        while (this.ID < this.Student.Outlines.Length)
                        {
                            this.Student.Outlines[this.ID].enabled = true;
                            this.ID++;
                        }
                        this.StudentInfo.UpdateInfo(this.Student.StudentID);
                        this.StudentInfo.gameObject.SetActive(true);
                    }
                    else if (!this.TextMessages.gameObject.activeInHierarchy)
                    {
                        this.PauseScreen.Sideways = false;
                        this.TextMessages.gameObject.SetActive(true);
                        this.SpawnMessage();
                    }
                }
                if (Input.GetButtonDown("B"))
                {
                    this.ResumeGameplay();
                    return;
                }
            }
            else if (this.PhotoIcons.activeInHierarchy && Input.GetButtonDown("B"))
            {
                this.ResumeGameplay();
                return;
            }
        }
        else
        {
            float t = Time.unscaledDeltaTime * 10f;
            this.ErrorWindow.transform.localScale = Vector3.Lerp(this.ErrorWindow.transform.localScale, new Vector3(1f, 1f, 1f), t);
            if (Input.GetButtonDown("A"))
            {
                this.ResumeGameplay();
            }
        }
    }
 // Token: 0x0600076B RID: 1899 RVA: 0x0006FB5C File Offset: 0x0006DF5C
 private void Update()
 {
     if (this.InputManager.TappedUp)
     {
         this.ID--;
         if (this.ID < 1)
         {
             this.ID = this.SchemeNames.Length - 1;
         }
         this.UpdateSchemeInfo();
     }
     if (this.InputManager.TappedDown)
     {
         this.ID++;
         if (this.ID > this.SchemeNames.Length - 1)
         {
             this.ID = 1;
         }
         this.UpdateSchemeInfo();
     }
     if (Input.GetButtonDown("A"))
     {
         AudioSource component = base.GetComponent <AudioSource>();
         if (this.PromptBar.Label[0].text != string.Empty)
         {
             if (!SchemeGlobals.GetSchemeUnlocked(this.ID))
             {
                 if (PlayerGlobals.PantyShots >= this.SchemeCosts[this.ID])
                 {
                     PlayerGlobals.PantyShots -= this.SchemeCosts[this.ID];
                     SchemeGlobals.SetSchemeUnlocked(this.ID, true);
                     SchemeGlobals.CurrentScheme = this.ID;
                     if (SchemeGlobals.GetSchemeStage(this.ID) == 0)
                     {
                         SchemeGlobals.SetSchemeStage(this.ID, 1);
                     }
                     this.UpdateInstructions();
                     this.UpdateSchemeList();
                     this.UpdateSchemeInfo();
                     component.clip = this.InfoPurchase;
                     component.Play();
                 }
             }
             else
             {
                 if (SchemeGlobals.CurrentScheme == this.ID)
                 {
                     SchemeGlobals.CurrentScheme = 0;
                 }
                 else
                 {
                     SchemeGlobals.CurrentScheme = this.ID;
                 }
                 this.UpdateSchemeInfo();
                 this.UpdateInstructions();
             }
         }
         else if (SchemeGlobals.GetSchemeStage(this.ID) != 100 && PlayerGlobals.PantyShots < this.SchemeCosts[this.ID])
         {
             component.clip = this.InfoAfford;
             component.Play();
         }
     }
     if (Input.GetButtonDown("B"))
     {
         this.PromptBar.ClearButtons();
         this.PromptBar.Label[0].text = "Accept";
         this.PromptBar.Label[1].text = "Exit";
         this.PromptBar.Label[5].text = "Choose";
         this.PromptBar.UpdateButtons();
         this.FavorMenu.SetActive(true);
         base.gameObject.SetActive(false);
     }
 }
Beispiel #30
0
 private void Update()
 {
     if (this.Prompt.DistanceSqr <= 1f)
     {
         if (Vector3.Distance(this.Yandere.transform.position, base.transform.position) < 2f)
         {
             if (!this.Near)
             {
                 this.TopicCheck();
                 this.Yandere.Location.Label.text = this.RoomName;
                 this.Yandere.Location.Show       = true;
                 this.Near = true;
             }
             if (this.Prompt.Circle[0].fillAmount == 0f)
             {
                 this.Prompt.Circle[0].fillAmount = 1f;
                 if (!this.Open)
                 {
                     this.OpenDoor();
                 }
                 else
                 {
                     this.CloseDoor();
                 }
             }
             if (this.Double && this.Swinging && this.Prompt.Circle[1].fillAmount == 0f)
             {
                 this.Prompt.Circle[1].fillAmount = 1f;
                 if (!this.BucketSet)
                 {
                     if (SchemeGlobals.GetSchemeStage(1) == 2)
                     {
                         SchemeGlobals.SetSchemeStage(1, 3);
                         this.Yandere.PauseScreen.Schemes.UpdateInstructions();
                     }
                     this.Bucket = this.Yandere.PickUp.Bucket;
                     this.Yandere.EmptyHands();
                     this.Bucket.transform.parent           = base.transform;
                     this.Bucket.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
                     this.Bucket.Trap = true;
                     this.Bucket.Prompt.Hide();
                     this.Bucket.Prompt.enabled = false;
                     this.CheckDirection();
                     if (this.North)
                     {
                         this.Bucket.transform.localPosition = new Vector3(0f, 2.25f, 0.2975f);
                     }
                     else
                     {
                         this.Bucket.transform.localPosition = new Vector3(0f, 2.25f, -0.2975f);
                     }
                     this.Bucket.GetComponent <Rigidbody>().isKinematic = true;
                     this.Bucket.GetComponent <Rigidbody>().useGravity  = false;
                     if (this.Open)
                     {
                         this.DoorColliders[0].isTrigger = true;
                         this.DoorColliders[1].isTrigger = true;
                     }
                     this.Prompt.Label[1].text = "     Remove Bucket";
                     this.Prompt.HideButton[0] = true;
                     this.CanSetBucket         = false;
                     this.BucketSet            = true;
                     this.Open  = false;
                     this.Timer = 0f;
                 }
                 else
                 {
                     this.Yandere.EmptyHands();
                     this.Bucket.PickUp.BePickedUp();
                     this.Prompt.HideButton[0] = false;
                     this.Prompt.Label[1].text = "     Set Trap";
                     this.BucketSet            = false;
                     this.Timer = 0f;
                 }
             }
         }
     }
     else if (this.Near)
     {
         this.Yandere.Location.Show = false;
         this.Near = false;
     }
     if (this.Timer < this.TimeLimit)
     {
         this.Timer += Time.deltaTime;
         if (this.Timer >= this.TimeLimit)
         {
             this.DoorColliders[0].isTrigger = false;
             if (this.DoorColliders[1] != null)
             {
                 this.DoorColliders[1].isTrigger = false;
             }
             if (this.Portal != null)
             {
                 this.Portal.open = this.Open;
             }
         }
         if (this.BucketSet)
         {
             for (int i = 0; i < this.Doors.Length; i++)
             {
                 Transform transform = this.Doors[i];
                 transform.localPosition    = new Vector3(transform.localPosition.x, transform.localPosition.y, Mathf.Lerp(transform.localPosition.z, this.OriginX[i] + (this.North ? this.ShiftSouth : this.ShiftNorth), Time.deltaTime * 3.6f));
                 this.Rotation              = Mathf.Lerp(this.Rotation, this.North ? (-this.TrapSwing) : this.TrapSwing, Time.deltaTime * 3.6f);
                 transform.localEulerAngles = new Vector3(transform.localEulerAngles.x, (i == 0) ? this.Rotation : (-this.Rotation), transform.localEulerAngles.z);
             }
         }
         else if (!this.Open)
         {
             for (int j = 0; j < this.Doors.Length; j++)
             {
                 Transform transform2 = this.Doors[j];
                 if (!this.Swinging)
                 {
                     transform2.localPosition = new Vector3(Mathf.Lerp(transform2.localPosition.x, this.ClosedPositions[j], Time.deltaTime * 3.6f), transform2.localPosition.y, transform2.localPosition.z);
                 }
                 else
                 {
                     this.Rotation               = Mathf.Lerp(this.Rotation, 0f, Time.deltaTime * 3.6f);
                     transform2.localPosition    = new Vector3(transform2.localPosition.x, transform2.localPosition.y, Mathf.Lerp(transform2.localPosition.z, this.OriginX[j], Time.deltaTime * 3.6f));
                     transform2.localEulerAngles = new Vector3(transform2.localEulerAngles.x, (j == 0) ? this.Rotation : (-this.Rotation), transform2.localEulerAngles.z);
                 }
             }
         }
         else
         {
             for (int k = 0; k < this.Doors.Length; k++)
             {
                 Transform transform3 = this.Doors[k];
                 if (!this.Swinging)
                 {
                     transform3.localPosition = new Vector3(Mathf.Lerp(transform3.localPosition.x, this.OpenPositions[k], Time.deltaTime * 3.6f), transform3.localPosition.y, transform3.localPosition.z);
                 }
                 else
                 {
                     transform3.localPosition    = new Vector3(transform3.localPosition.x, transform3.localPosition.y, Mathf.Lerp(transform3.localPosition.z, this.OriginX[k] + (this.North ? this.ShiftNorth : this.ShiftSouth), Time.deltaTime * 3.6f));
                     this.Rotation               = Mathf.Lerp(this.Rotation, this.North ? this.Swing : (-this.Swing), Time.deltaTime * 3.6f);
                     transform3.localEulerAngles = new Vector3(transform3.localEulerAngles.x, (k == 0) ? this.Rotation : (-this.Rotation), transform3.localEulerAngles.z);
                 }
             }
         }
     }
     else if (this.Locked)
     {
         if (this.Prompt.Circle[0].fillAmount < 1f)
         {
             this.Prompt.Label[0].text        = "     Locked";
             this.Prompt.Circle[0].fillAmount = 1f;
         }
         if (this.Yandere.Inventory.LockPick)
         {
             this.Prompt.HideButton[2] = false;
             if (this.Prompt.Circle[2].fillAmount == 0f)
             {
                 this.Prompt.Yandere.Inventory.LockPick = false;
                 this.Prompt.HideButton[2] = true;
                 this.Locked = false;
             }
         }
         else if (!this.Prompt.HideButton[2])
         {
             this.Prompt.HideButton[2] = true;
         }
     }
     if (!this.NoTrap && this.Swinging && this.Double)
     {
         if (this.Yandere.PickUp != null)
         {
             if (this.Yandere.PickUp.Bucket != null)
             {
                 if (this.Yandere.PickUp.GetComponent <BucketScript>().Full)
                 {
                     if (this.Bucket == null)
                     {
                         this.Prompt.HideButton[1] = false;
                         this.CanSetBucket         = true;
                     }
                 }
                 else if (this.CanSetBucket)
                 {
                     this.Prompt.HideButton[1] = true;
                     this.CanSetBucket         = false;
                 }
             }
             else if (this.CanSetBucket)
             {
                 this.Prompt.HideButton[1] = true;
                 this.CanSetBucket         = false;
             }
         }
         else if (this.CanSetBucket)
         {
             this.Prompt.HideButton[1] = true;
             this.CanSetBucket         = false;
         }
     }
     if (this.BucketSet && this.Bucket.Gasoline && this.StudentManager.Students[this.StudentManager.RivalID] != null && this.StudentManager.Students[this.StudentManager.RivalID].Follower != null && this.StudentManager.Students[this.StudentManager.RivalID].Follower.CurrentAction == StudentActionType.Follow && Vector3.Distance(base.transform.position, this.StudentManager.Students[this.StudentManager.RivalID].transform.position) < 10f)
     {
         this.Yandere.Subtitle.UpdateLabel(SubtitleType.GasWarning, 1, 5f);
         this.StudentManager.Students[this.StudentManager.RivalID].GasWarned = true;
     }
 }