bgm 적용
This commit is contained in:
parent
23e4b33a0d
commit
010150cf4b
Binary file not shown.
|
|
@ -0,0 +1,23 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f6114cbd9684c734a86622e924246b10
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 8
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 0.01
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -9,7 +9,7 @@ AudioImporter:
|
||||||
sampleRateSetting: 0
|
sampleRateSetting: 0
|
||||||
sampleRateOverride: 44100
|
sampleRateOverride: 44100
|
||||||
compressionFormat: 1
|
compressionFormat: 1
|
||||||
quality: 1
|
quality: 0.01
|
||||||
conversionMode: 0
|
conversionMode: 0
|
||||||
preloadAudioData: 0
|
preloadAudioData: 0
|
||||||
platformSettingOverrides: {}
|
platformSettingOverrides: {}
|
||||||
|
|
|
||||||
|
|
@ -8022,7 +8022,7 @@ BoxCollider2D:
|
||||||
drawMode: 0
|
drawMode: 0
|
||||||
adaptiveTiling: 0
|
adaptiveTiling: 0
|
||||||
m_AutoTiling: 0
|
m_AutoTiling: 0
|
||||||
m_Size: {x: 1080, y: 50}
|
m_Size: {x: 720, y: 50}
|
||||||
m_EdgeRadius: 0
|
m_EdgeRadius: 0
|
||||||
--- !u!114 &420248623
|
--- !u!114 &420248623
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|
@ -9470,7 +9470,8 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
arr_clip:
|
arr_clip:
|
||||||
- {fileID: 8300000, guid: 566a779851d20d948a663e4cb01b8e7b, type: 3}
|
- {fileID: 8300000, guid: 566a779851d20d948a663e4cb01b8e7b, type: 3}
|
||||||
arr_bgm: []
|
arr_bgm:
|
||||||
|
- {fileID: 8300000, guid: f6114cbd9684c734a86622e924246b10, type: 3}
|
||||||
--- !u!114 &500962030
|
--- !u!114 &500962030
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
IEnumerator Start()
|
IEnumerator Start()
|
||||||
{
|
{
|
||||||
Load();
|
Load();
|
||||||
|
yield return null;
|
||||||
|
SoundInfo.Ins.Play_BGM(eBGM.b001_BGM);
|
||||||
while (!LobbyUI.Ins) yield return null;
|
while (!LobbyUI.Ins) yield return null;
|
||||||
LobbyUI.Ins.Set_Money();
|
LobbyUI.Ins.Set_Money();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ using UnityEngine;
|
||||||
public enum eSound { s001_ButtonClick,
|
public enum eSound { s001_ButtonClick,
|
||||||
Max
|
Max
|
||||||
}
|
}
|
||||||
public enum eBGM { Max }
|
public enum eBGM { b001_BGM, Max }
|
||||||
|
|
||||||
public class SoundInfo : MonoBehaviourSingletonTemplate<SoundInfo>
|
public class SoundInfo : MonoBehaviourSingletonTemplate<SoundInfo>
|
||||||
{
|
{
|
||||||
|
|
@ -14,15 +14,17 @@ public class SoundInfo : MonoBehaviourSingletonTemplate<SoundInfo>
|
||||||
public AudioClip[] arr_clip, arr_bgm;
|
public AudioClip[] arr_clip, arr_bgm;
|
||||||
List<AudioSource> list_audiosource = new List<AudioSource>();
|
List<AudioSource> list_audiosource = new List<AudioSource>();
|
||||||
AudioSource BGM_AudioSource;
|
AudioSource BGM_AudioSource;
|
||||||
eBGM CurBGM;
|
eBGM CurBGM = eBGM.Max;
|
||||||
float minVolume = 0.02f;
|
float minVolume = 0.02f;
|
||||||
bool EnablePlay = true;
|
bool EnablePlay = true;
|
||||||
|
|
||||||
Dictionary<eSound, AudioClip> dic_clip = new Dictionary<eSound, AudioClip>();
|
Dictionary<eSound, AudioClip> dic_clip = new Dictionary<eSound, AudioClip>();
|
||||||
Dictionary<eBGM, AudioClip> dic_bgmclip = new Dictionary<eBGM, AudioClip>();
|
Dictionary<eBGM, AudioClip> dic_bgmclip = new Dictionary<eBGM, AudioClip>();
|
||||||
|
|
||||||
private void Start()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
|
base.Awake();
|
||||||
|
|
||||||
DontDestroy();
|
DontDestroy();
|
||||||
|
|
||||||
for (eSound i = 0; i < eSound.Max; i++)
|
for (eSound i = 0; i < eSound.Max; i++)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,13 @@ public class OptionUI : MonoBehaviour
|
||||||
SaveMgr.Ins.Set_Option(option);
|
SaveMgr.Ins.Set_Option(option);
|
||||||
Set();
|
Set();
|
||||||
|
|
||||||
if (option == eOption.Bgm && !SaveMgr.Ins.Get_Option(option)) SoundInfo.Ins.Stop_BGM();
|
if (option == eOption.Bgm)
|
||||||
|
{
|
||||||
|
if (!SaveMgr.Ins.Get_Option(option))
|
||||||
|
SoundInfo.Ins.Stop_BGM();
|
||||||
|
else
|
||||||
|
SoundInfo.Ins.RePlay_BGM();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClick_Game(int index)
|
public void OnClick_Game(int index)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue