블랙잭 지형 복구 저장

This commit is contained in:
dldydtn9755-crypto
2026-06-12 17:55:01 +09:00
parent a0521c974a
commit ee73e1424d
9958 changed files with 732566 additions and 7 deletions

View File

@@ -0,0 +1,32 @@
// Copyright (C) 2015 ricimi - All rights reserved.
// This code can only be used under the standard Unity Asset Store End User License Agreement.
// A Copy of the Asset Store EULA is available at http://unity3d.com/company/legal/as_terms.
using UnityEngine;
using UnityEngine.UI;
namespace Ricimi
{
// This class handles updating the music UI widgets depending on the player's selection.
public class MusicManager : MonoBehaviour
{
private Slider m_musicSlider;
private GameObject m_musicButton;
private void Start()
{
m_musicSlider = GetComponent<Slider>();
m_musicSlider.value = PlayerPrefs.GetInt("music_on");
m_musicButton = GameObject.Find("MusicButton/Button");
}
public void SwitchMusic()
{
var backgroundAudioSource = GameObject.Find("BackgroundMusic").GetComponent<AudioSource>();
backgroundAudioSource.volume = m_musicSlider.value;
PlayerPrefs.SetInt("music_on", (int)m_musicSlider.value);
if (m_musicButton != null)
m_musicButton.GetComponent<MusicButton>().ToggleSprite();
}
}
}