This commit is contained in:
JA
2026-06-20 19:34:23 +08:00
parent e5031c0068
commit d442805c3f
4136 changed files with 514641 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
using Manager;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SystemConfig : MonoBehaviour
{
//¿ª¹Ø
public static bool MusicOn
{
get
{
return PlayerPrefs.GetInt("Music", 1) == 1;
}
set
{
PlayerPrefs.SetInt("Music", value ? 1 : 0);
SoundManager.Instance.MusicOn = value;
}
}
public static bool SoundOn
{
get
{
return PlayerPrefs.GetInt("Sound", 1) == 1;
}
set
{
PlayerPrefs.SetInt("Sound", value ? 1 : 0);
SoundManager.Instance.SoundOn = value;
}
}
//´óС
public static int MusicVolume
{
get
{
return PlayerPrefs.GetInt("MusicVolume", 100);
}
set
{
PlayerPrefs.SetInt("MusicVolume", value);
SoundManager.Instance.MusicVolume = value;
}
}
public static int SoundVolume
{
get
{
return PlayerPrefs.GetInt("SoundVolume", 100);
}
set
{
PlayerPrefs.SetInt("SoundVolume", value);
SoundManager.Instance.SoundVolume = value;
}
}
~SystemConfig()
{
PlayerPrefs.Save();
}
}