コード例 #1
0
 void CheckToPlayMusic()
 {
     if (GamePeferences.GetMusic() == 1)
     {
         MusicManager.Instance.PlayMusic(true);
         musicButton.image.sprite = musicIcons[1];
     }
     else
     {
         MusicManager.Instance.PlayMusic(false);
         musicButton.image.sprite = musicIcons[0];
     }
 }
コード例 #2
0
 public void Music()
 {
     if (GamePeferences.GetMusic() == 0)
     {
         GamePeferences.SetMusic(1);
         MusicManager.Instance.PlayMusic(true);
         musicButton.image.sprite = musicIcons[1];
     }
     else
     {
         GamePeferences.SetMusic(0);
         MusicManager.Instance.PlayMusic(false);
         musicButton.image.sprite = musicIcons[0];
     }
 }