Merge pull request #40 from Degulleo/DO-44-상점-패널-버그-픽스
Do 44 상점 패널 버그 픽스
This commit is contained in:
commit
0f308f98d4
BIN
Assets/Resources/Click Sound.mp3
Normal file
BIN
Assets/Resources/Click Sound.mp3
Normal file
Binary file not shown.
23
Assets/Resources/Click Sound.mp3.meta
Normal file
23
Assets/Resources/Click Sound.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cff2e6cf7f46a074d86955b3b6fd499a
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Close Sound.mp3
Normal file
BIN
Assets/Resources/Close Sound.mp3
Normal file
Binary file not shown.
23
Assets/Resources/Close Sound.mp3.meta
Normal file
23
Assets/Resources/Close Sound.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7c0f32158a3e5b46bc3b59035aba898
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -10,6 +10,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 2402232447803946232}
|
||||
- component: {fileID: 3667565604047053759}
|
||||
- component: {fileID: 841089304725320238}
|
||||
m_Layer: 0
|
||||
m_Name: Audio Manager
|
||||
m_TagString: Untagged
|
||||
@ -45,3 +46,102 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mainBgm: {fileID: 8300000, guid: 1d9c7fb20aa822c48933d00b6bd6a757, type: 3}
|
||||
clickSound: {fileID: 8300000, guid: cff2e6cf7f46a074d86955b3b6fd499a, type: 3}
|
||||
closeSound: {fileID: 8300000, guid: e7c0f32158a3e5b46bc3b59035aba898, type: 3}
|
||||
sfxVolume: 0
|
||||
--- !u!82 &841089304725320238
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2946408323859178723}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -148,7 +148,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
handleImage: {fileID: 6756679498073114696}
|
||||
clickSound: {fileID: 8300000, guid: 6296b07572c34d4439bb8bb660025449, type: 3}
|
||||
clickSound: {fileID: 8300000, guid: cff2e6cf7f46a074d86955b3b6fd499a, type: 3}
|
||||
--- !u!82 &6428684691423417346
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -994,7 +994,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
handleImage: {fileID: 1822478720763898751}
|
||||
clickSound: {fileID: 8300000, guid: 6296b07572c34d4439bb8bb660025449, type: 3}
|
||||
clickSound: {fileID: 8300000, guid: cff2e6cf7f46a074d86955b3b6fd499a, type: 3}
|
||||
--- !u!82 &9145795730378986889
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -134,6 +134,7 @@ GameObject:
|
||||
- component: {fileID: 390032769}
|
||||
- component: {fileID: 390032768}
|
||||
- component: {fileID: 390032767}
|
||||
- component: {fileID: 390032771}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
@ -223,6 +224,18 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!225 &390032771
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 390032766}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!1 &519420028
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3,13 +3,20 @@
|
||||
[RequireComponent(typeof(AudioSource))]
|
||||
public class AudioManager : MonoBehaviour
|
||||
{
|
||||
[Header("Sound")]
|
||||
[Header("BGM")]
|
||||
[SerializeField] private AudioClip mainBgm;
|
||||
[Header("SFX")]
|
||||
[SerializeField] private AudioClip clickSound;
|
||||
[SerializeField] private AudioClip closeSound;
|
||||
|
||||
private AudioSource audioSource;
|
||||
|
||||
[HideInInspector] public float sfxVolume;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
PlayMainBGM();
|
||||
sfxVolume = 1.0f; //테스트 코드
|
||||
}
|
||||
|
||||
// 배경음악 시작
|
||||
@ -23,7 +30,7 @@ public class AudioManager : MonoBehaviour
|
||||
// 배경음악이 설정되면 재생
|
||||
audioSource.clip = mainBgm; // 음악 클립 설정
|
||||
audioSource.loop = true; // 반복 재생
|
||||
audioSource.volume = 0.2f; // 볼륨
|
||||
audioSource.volume = 0.1f; // 볼륨
|
||||
audioSource.Play(); // 음악 시작
|
||||
}
|
||||
}
|
||||
@ -36,4 +43,14 @@ public class AudioManager : MonoBehaviour
|
||||
audioSource.Stop(); // 배경음악 멈추기
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayClickSound()
|
||||
{
|
||||
audioSource.PlayOneShot(clickSound, sfxVolume);
|
||||
}
|
||||
|
||||
public void PlayCloseSound()
|
||||
{
|
||||
audioSource.PlayOneShot(closeSound, sfxVolume);
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ public class LeaderBoardController : MonoBehaviour
|
||||
|
||||
public void OnClickLeaderboardButton()
|
||||
{
|
||||
GameManager.Instance.audioManager.PlayClickSound();
|
||||
|
||||
if (isLeaderboardLoaded) return; // 이미 리더보드가 로드되었으면 중복 호출 방지
|
||||
|
||||
leaderboardPanel.SetActive(true);
|
||||
@ -69,6 +71,8 @@ public class LeaderBoardController : MonoBehaviour
|
||||
// BackButton 클릭 시 호출되는 메소드
|
||||
public void OnBackButtonClicked()
|
||||
{
|
||||
GameManager.Instance.audioManager.PlayCloseSound();
|
||||
|
||||
leaderboardPanel.SetActive(false); // LeaderboardPanel 숨기기
|
||||
MainPanel.SetActive(true); // SignInPanel 보이게 하기
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ public class PanelController : MonoBehaviour
|
||||
/// </summary>
|
||||
public void Show()
|
||||
{
|
||||
GameManager.Instance.audioManager.PlayClickSound();
|
||||
|
||||
if (backGroundCanvasGroup == null)
|
||||
{
|
||||
backGroundCanvasGroup = GetComponent<CanvasGroup>();
|
||||
@ -42,6 +44,8 @@ public class PanelController : MonoBehaviour
|
||||
/// </summary>
|
||||
public void Hide(PanelControllerHideDelegate hideDelegate = null)
|
||||
{
|
||||
GameManager.Instance.audioManager.PlayCloseSound();
|
||||
|
||||
backGroundCanvasGroup.alpha = 1;
|
||||
panelRectTransform.localScale = Vector3.one;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user