1
This commit is contained in:
17
unity/Assets/Script/Tools/Config/SoundDefine.cs
Normal file
17
unity/Assets/Script/Tools/Config/SoundDefine.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SoundDefine
|
||||
{
|
||||
#region music
|
||||
public const string LoadingMusic= "select";
|
||||
public const string Map_1Music = "map_01";
|
||||
public const string Map_2Music = "map_02";
|
||||
public const string Map_3Music = "map_03";
|
||||
#endregion
|
||||
|
||||
#region fix
|
||||
public const string BoxOpen = "BoxOpen";
|
||||
#endregion
|
||||
}
|
||||
11
unity/Assets/Script/Tools/Config/SoundDefine.cs.meta
Normal file
11
unity/Assets/Script/Tools/Config/SoundDefine.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9836183019983914fb04067f5ceb6760
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
64
unity/Assets/Script/Tools/Config/SystemConfig.cs
Normal file
64
unity/Assets/Script/Tools/Config/SystemConfig.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
11
unity/Assets/Script/Tools/Config/SystemConfig.cs.meta
Normal file
11
unity/Assets/Script/Tools/Config/SystemConfig.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee97715ada4062f4d85b5b96d8cb30fc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user