Ejemplo n.º 1
0
 private void Update()
 {
     if (DialogueScript.TextActive)
     {
         return;
     }
     if (isAsleep == true)
     {
         if (WP.Health < 1f && !UI.UIActive)
         {
             WP.Health += Time.unscaledDeltaTime / streamDurationBar;
             TS.TimeStart(streamDurationTimer);
             PS.Sleeping();
             Light.SetActive(false);
             HelpScreenScript.TSleepBool = true;
             SoundManager.BGM.Stop();
             SoundManager.SleepBGM.enabled = true;
         }
         else
         {
             TutorialTriggerCheck.ProgressTo5();
             SoundManager.BGM.Play();
             SoundManager.SleepBGM.enabled            = false;
             this.GetComponent <BoxCollider>().size   = new Vector3(5.951694f, 2.631015f, 7.626603f);
             this.GetComponent <BoxCollider>().center = new Vector3(-0.8318317f, -0.004668713f, -0.01983786f);
             sleepButton.SetActive(false);
             isAsleep = false;
             Light.SetActive(true);
             PS.Idle();
             sleepSprite.sprite = sleepingSprite;
         }
     }
     {
     }
 }
Ejemplo n.º 2
0
 private void GoToBed()
 {
     if (!isAsleep)
     {
         SoundManager.PlaySound(SoundManager.clickSound);
         isAsleep           = true;
         sleepSprite.sprite = wakeUpSprite;
     }
     else
     {
         TutorialTriggerCheck.ProgressTo5();
         SoundManager.PlaySound(SoundManager.clickSound);
         SoundManager.BGM.Play();
         SoundManager.SleepBGM.enabled = false;
         PS.Idle();
         Light.SetActive(true);
         isAsleep           = false;
         sleepSprite.sprite = sleepingSprite;
     }
 }