コード例 #1
0
 // Token: 0x060018DF RID: 6367 RVA: 0x000E7018 File Offset: 0x000E5218
 public void UpdateButtonPrompts()
 {
     if (this.NamingBully)
     {
         if (this.Photographs[this.CurrentIndex].mainTexture != this.NoPhoto && PlayerGlobals.GetBullyPhoto(this.CurrentIndex) > 0)
         {
             if (PlayerGlobals.GetBullyPhoto(this.CurrentIndex) > 0)
             {
                 this.PromptBar.Label[0].text = "Name Bully";
             }
             else
             {
                 this.PromptBar.Label[0].text = string.Empty;
             }
         }
         else
         {
             this.PromptBar.Label[0].text = string.Empty;
         }
         this.PromptBar.Label[1].text = string.Empty;
         this.PromptBar.Label[2].text = string.Empty;
         this.PromptBar.Label[3].text = string.Empty;
         this.PromptBar.Label[4].text = "Move";
         this.PromptBar.Label[5].text = "Move";
     }
     else if (this.Moving || this.MovingString)
     {
         this.PromptBar.Label[0].text = "Place";
         this.PromptBar.Label[1].text = string.Empty;
         this.PromptBar.Label[2].text = string.Empty;
         this.PromptBar.Label[3].text = string.Empty;
         this.PromptBar.Label[4].text = "Move";
         this.PromptBar.Label[5].text = "Move";
         if (!this.MovingString)
         {
             this.PromptBar.Label[2].text = "Resize";
             this.PromptBar.Label[3].text = "Resize";
         }
     }
     else if (this.Adjusting)
     {
         if (this.Cursor.Photograph != null)
         {
             this.PromptBar.Label[0].text = "Adjust";
             this.PromptBar.Label[1].text = string.Empty;
             this.PromptBar.Label[2].text = "Remove";
             this.PromptBar.Label[3].text = string.Empty;
         }
         else if (this.Cursor.Tack != null)
         {
             this.PromptBar.Label[2].text = "Remove";
         }
         else
         {
             this.PromptBar.Label[0].text = string.Empty;
             this.PromptBar.Label[2].text = string.Empty;
         }
         this.PromptBar.Label[1].text = "Back";
         this.PromptBar.Label[3].text = "Place Pin";
         this.PromptBar.Label[4].text = "Move";
         this.PromptBar.Label[5].text = "Move";
     }
     else if (!this.Viewing)
     {
         int currentIndex = this.CurrentIndex;
         if (this.Photographs[currentIndex].mainTexture != this.NoPhoto)
         {
             this.PromptBar.Label[0].text = "View";
             this.PromptBar.Label[2].text = "Delete";
         }
         else
         {
             this.PromptBar.Label[0].text = string.Empty;
             this.PromptBar.Label[2].text = string.Empty;
         }
         if (!this.Corkboard)
         {
             this.PromptBar.Label[3].text = (PlayerGlobals.GetSenpaiPhoto(currentIndex) ? "Use" : string.Empty);
         }
         else
         {
             this.PromptBar.Label[3].text = "Corkboard";
         }
         this.PromptBar.Label[1].text = "Back";
         this.PromptBar.Label[4].text = "Choose";
         this.PromptBar.Label[5].text = "Choose";
     }
     else
     {
         if (this.Corkboard)
         {
             this.PromptBar.Label[0].text = "Place";
         }
         else
         {
             this.PromptBar.Label[0].text = string.Empty;
         }
         this.PromptBar.Label[2].text = string.Empty;
         this.PromptBar.Label[3].text = string.Empty;
         this.PromptBar.Label[4].text = string.Empty;
         this.PromptBar.Label[5].text = string.Empty;
     }
     this.PromptBar.UpdateButtons();
     this.PromptBar.Show = true;
 }
コード例 #2
0
    // Token: 0x060018D8 RID: 6360 RVA: 0x000E5B8C File Offset: 0x000E3D8C
    private void UpdatePhotoSelection()
    {
        if (Input.GetButtonDown("A"))
        {
            if (!this.NamingBully)
            {
                UITexture uitexture = this.Photographs[this.CurrentIndex];
                if (uitexture.mainTexture != this.NoPhoto)
                {
                    this.ViewPhoto.mainTexture          = uitexture.mainTexture;
                    this.ViewPhoto.transform.position   = uitexture.transform.position;
                    this.ViewPhoto.transform.localScale = uitexture.transform.localScale;
                    this.Destination.position           = uitexture.transform.position;
                    this.Viewing = true;
                    if (!this.Corkboard)
                    {
                        for (int i = 1; i < 26; i++)
                        {
                            this.Hearts[i].gameObject.SetActive(false);
                        }
                    }
                    this.CanAdjust = false;
                }
                this.UpdateButtonPrompts();
            }
            else if (this.Photographs[this.CurrentIndex].mainTexture != this.NoPhoto && PlayerGlobals.GetBullyPhoto(this.CurrentIndex) > 0)
            {
                this.Yandere.Police.EndOfDay.FragileTarget = PlayerGlobals.GetBullyPhoto(this.CurrentIndex);
                this.Yandere.StudentManager.FragileOfferHelp.Continue();
                this.PauseScreen.MainMenu.SetActive(true);
                this.Yandere.RPGCamera.enabled = true;
                base.gameObject.SetActive(false);
                this.PauseScreen.Show = false;
                this.PromptBar.Show   = false;
                this.NamingBully      = false;
                Time.timeScale        = 1f;
            }
        }
        if (!this.NamingBully && Input.GetButtonDown("B"))
        {
            this.PromptBar.ClearButtons();
            this.PromptBar.Label[0].text = "Accept";
            this.PromptBar.Label[1].text = "Exit";
            this.PromptBar.Label[4].text = "Choose";
            this.PromptBar.Label[5].text = "Choose";
            this.PromptBar.UpdateButtons();
            this.PauseScreen.MainMenu.SetActive(true);
            this.PauseScreen.Sideways = false;
            this.PauseScreen.PressedB = true;
            base.gameObject.SetActive(false);
            this.UpdateButtonPrompts();
        }
        if (Input.GetButtonDown("X"))
        {
            this.ViewPhoto.mainTexture = null;
            int currentIndex = this.CurrentIndex;
            if (this.Photographs[currentIndex].mainTexture != this.NoPhoto)
            {
                this.Photographs[currentIndex].mainTexture = this.NoPhoto;
                PlayerGlobals.SetPhoto(currentIndex, false);
                PlayerGlobals.SetSenpaiPhoto(currentIndex, false);
                TaskGlobals.SetGuitarPhoto(currentIndex, false);
                TaskGlobals.SetKittenPhoto(currentIndex, false);
                this.Hearts[currentIndex].gameObject.SetActive(false);
                this.TaskManager.UpdateTaskStatus();
            }
            this.UpdateButtonPrompts();
        }
        if (this.Corkboard)
        {
            if (Input.GetButtonDown("Y"))
            {
                this.CanAdjust = false;
                this.Cursor.gameObject.SetActive(true);
                this.Adjusting = true;
                this.UpdateButtonPrompts();
            }
        }
        else if (Input.GetButtonDown("Y") && PlayerGlobals.GetSenpaiPhoto(this.CurrentIndex))
        {
            int currentIndex2 = this.CurrentIndex;
            PlayerGlobals.SetSenpaiPhoto(currentIndex2, false);
            this.Hearts[currentIndex2].gameObject.SetActive(false);
            this.CanAdjust       = false;
            this.Yandere.Sanity += 20f;
            this.UpdateButtonPrompts();
            AudioSource.PlayClipAtPoint(this.Sighs[UnityEngine.Random.Range(0, this.Sighs.Length)], this.Yandere.Head.position);
        }
        if (this.InputManager.TappedRight)
        {
            this.Column = ((this.Column < 5) ? (this.Column + 1) : 1);
        }
        if (this.InputManager.TappedLeft)
        {
            this.Column = ((this.Column > 1) ? (this.Column - 1) : 5);
        }
        if (this.InputManager.TappedUp)
        {
            this.Row = ((this.Row > 1) ? (this.Row - 1) : 5);
        }
        if (this.InputManager.TappedDown)
        {
            this.Row = ((this.Row < 5) ? (this.Row + 1) : 1);
        }
        bool flag  = this.InputManager.TappedRight || this.InputManager.TappedLeft;
        bool flag2 = this.InputManager.TappedUp || this.InputManager.TappedDown;

        if (flag || flag2)
        {
            this.Highlight.transform.localPosition = new Vector3(this.HighlightX, this.HighlightY, this.Highlight.transform.localPosition.z);
            this.UpdateButtonPrompts();
        }
        this.ViewPhoto.transform.localScale = Vector3.Lerp(this.ViewPhoto.transform.localScale, new Vector3(1f, 1f, 1f), this.LerpSpeed);
        this.ViewPhoto.transform.position   = Vector3.Lerp(this.ViewPhoto.transform.position, this.Destination.position, this.LerpSpeed);
        if (this.Corkboard)
        {
            this.Gallery.transform.localPosition = new Vector3(this.Gallery.transform.localPosition.x, Mathf.Lerp(this.Gallery.transform.localPosition.y, 0f, Time.deltaTime * 10f), this.Gallery.transform.localPosition.z);
        }
    }