bgm 적용

This commit is contained in:
Ino 2025-09-14 07:08:25 +09:00
parent 23e4b33a0d
commit 010150cf4b
7 changed files with 41 additions and 7 deletions

Binary file not shown.

View File

@ -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:

View File

@ -9,7 +9,7 @@ AudioImporter:
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
quality: 0.01
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}

View File

@ -8022,7 +8022,7 @@ BoxCollider2D:
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 1080, y: 50}
m_Size: {x: 720, y: 50}
m_EdgeRadius: 0
--- !u!114 &420248623
MonoBehaviour:
@ -9470,7 +9470,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
arr_clip:
- {fileID: 8300000, guid: 566a779851d20d948a663e4cb01b8e7b, type: 3}
arr_bgm: []
arr_bgm:
- {fileID: 8300000, guid: f6114cbd9684c734a86622e924246b10, type: 3}
--- !u!114 &500962030
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -25,6 +25,8 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
IEnumerator Start()
{
Load();
yield return null;
SoundInfo.Ins.Play_BGM(eBGM.b001_BGM);
while (!LobbyUI.Ins) yield return null;
LobbyUI.Ins.Set_Money();
}

View File

@ -4,7 +4,7 @@ using UnityEngine;
public enum eSound { s001_ButtonClick,
Max
}
public enum eBGM { Max }
public enum eBGM { b001_BGM, Max }
public class SoundInfo : MonoBehaviourSingletonTemplate<SoundInfo>
{
@ -14,15 +14,17 @@ public class SoundInfo : MonoBehaviourSingletonTemplate<SoundInfo>
public AudioClip[] arr_clip, arr_bgm;
List<AudioSource> list_audiosource = new List<AudioSource>();
AudioSource BGM_AudioSource;
eBGM CurBGM;
eBGM CurBGM = eBGM.Max;
float minVolume = 0.02f;
bool EnablePlay = true;
Dictionary<eSound, AudioClip> dic_clip = new Dictionary<eSound, AudioClip>();
Dictionary<eBGM, AudioClip> dic_bgmclip = new Dictionary<eBGM, AudioClip>();
private void Start()
protected override void Awake()
{
base.Awake();
DontDestroy();
for (eSound i = 0; i < eSound.Max; i++)

View File

@ -20,7 +20,13 @@ public class OptionUI : MonoBehaviour
SaveMgr.Ins.Set_Option(option);
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)