DEG-133 [Fix] 기타 버그 수정
This commit is contained in:
parent
d6514980de
commit
2d71a980cf
@ -93,7 +93,9 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
||||
|
||||
// 공격 입력 처리
|
||||
if (Input.GetKeyDown(KeyCode.X) && (_currentAction == null || !_currentAction.IsActive)
|
||||
&& (CurrentState != PlayerState.Win && CurrentState != PlayerState.Dead)) {
|
||||
&& (CurrentState != PlayerState.Win && CurrentState != PlayerState.Dead))
|
||||
{
|
||||
GameManager.Instance.PlayPlayerAttackSound();
|
||||
StartAttackAction();
|
||||
}
|
||||
|
||||
@ -397,6 +399,7 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
||||
if (character != this) return;
|
||||
if (CurrentState == PlayerState.Dead) return;
|
||||
|
||||
GameManager.Instance.PlayPlayerHitSound();
|
||||
SetState(PlayerState.Hit);
|
||||
}
|
||||
|
||||
|
BIN
Assets/JYY/Prefabs/Alien Big Blink.prefab
(Stored with Git LFS)
BIN
Assets/JYY/Prefabs/Alien Big Blink.prefab
(Stored with Git LFS)
Binary file not shown.
@ -113,8 +113,9 @@ public class DungeonLogic : MonoBehaviour
|
||||
_player.SetState(PlayerState.Win);
|
||||
|
||||
// TODO: 강화 시스템으로 넘어가고 일상 맵으로 이동
|
||||
GameManager.Instance.PanelManager.GetPanel("ClearPanelBG");
|
||||
|
||||
StartCoroutine(DelayedSceneChange()); // 3초 대기 후 전환
|
||||
StartCoroutine(DelayedSceneChange()); // 5초 대기 후 전환
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,13 +134,15 @@ public class DungeonLogic : MonoBehaviour
|
||||
_player.gameObject.layer = LayerMask.NameToLayer("Ignore Raycast");
|
||||
_enemy.SetState(EnemyState.Idle);
|
||||
|
||||
StartCoroutine(DelayedSceneChange()); // 3초 대기 후 전환
|
||||
GameManager.Instance.PanelManager.GetPanel("FailedPanelBG");
|
||||
|
||||
StartCoroutine(DelayedSceneChange()); // 5초 대기 후 전환
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator DelayedSceneChange()
|
||||
{
|
||||
yield return new WaitForSeconds(3f);
|
||||
yield return new WaitForSeconds(5f);
|
||||
GameManager.Instance.ChangeToHomeScene();
|
||||
}
|
||||
|
||||
|
BIN
Assets/KSH/ReDungeon.unity
(Stored with Git LFS)
BIN
Assets/KSH/ReDungeon.unity
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/KSH/ReHousing.unity
(Stored with Git LFS)
BIN
Assets/KSH/ReHousing.unity
(Stored with Git LFS)
Binary file not shown.
@ -2,20 +2,23 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class PanelManager : MonoBehaviour
|
||||
public class PanelManager : Singleton<PanelManager>
|
||||
{
|
||||
private Canvas _canvas;
|
||||
private Dictionary<string, GameObject> _panels = new Dictionary<string, GameObject>();
|
||||
|
||||
private void Awake()
|
||||
private void Start()
|
||||
{
|
||||
if (_canvas == null)
|
||||
{
|
||||
_canvas = GameObject.Find("Canvas").GetComponent<Canvas>();
|
||||
}
|
||||
FindCanvas();
|
||||
LoadPanels();
|
||||
}
|
||||
|
||||
private void FindCanvas()
|
||||
{
|
||||
_canvas = GameObject.Find("Canvas").GetComponent<Canvas>();
|
||||
}
|
||||
|
||||
//패널을 딕셔너리에 오브젝트 이름으로 로드
|
||||
private void LoadPanels()
|
||||
@ -27,9 +30,12 @@ public class PanelManager : MonoBehaviour
|
||||
_panels[prefab.name] = prefab;
|
||||
}
|
||||
}
|
||||
|
||||
//패널 이름을 딕셔너리 키로 찾음
|
||||
public GameObject GetPanel(string panelName)
|
||||
{
|
||||
if(_canvas == null) FindCanvas();
|
||||
|
||||
if (_panels.TryGetValue(panelName, out GameObject prefab))
|
||||
{
|
||||
return Instantiate(prefab, _canvas.transform);
|
||||
@ -41,4 +47,5 @@ public class PanelManager : MonoBehaviour
|
||||
return null;
|
||||
}
|
||||
|
||||
protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode) { }
|
||||
}
|
||||
|
@ -36,24 +36,38 @@ public class SettingsPanelController : PanelController
|
||||
public void SFXSliderButtonClicked()
|
||||
{
|
||||
sfxSliderButton.OnClicked();
|
||||
//todo: sfxSliderButton.IsActive를 기준으로 뮤트 여부 확인 및 뮤트 적용
|
||||
ApplySFXSettings(sfxSliderButton.IsActive, sfxSlider.value);
|
||||
}
|
||||
|
||||
public void BGMSliderButtonClicked()
|
||||
{
|
||||
bgmSliderButton.OnClicked();
|
||||
//todo: sfxSliderButton.IsActive를 기준으로 뮤트 여부 확인 및 뮤트 적용
|
||||
ApplyBGMSettings(bgmSliderButton.IsActive, bgmSlider.value);
|
||||
}
|
||||
|
||||
//슬라이더 변경 시 마다 호출
|
||||
public void OnSFXSliderValueChanged(float value)
|
||||
{
|
||||
//todo: 소리 볼륨 조절
|
||||
ApplySFXSettings(sfxSliderButton.IsActive, value);
|
||||
}
|
||||
|
||||
public void OnBGMSliderValueChanged(float value)
|
||||
{
|
||||
//todo: 소리 볼륨 조절
|
||||
ApplyBGMSettings(bgmSliderButton.IsActive, value);
|
||||
}
|
||||
|
||||
// 효과음 설정 적용 메서드
|
||||
private void ApplySFXSettings(bool isActive, float volume)
|
||||
{
|
||||
float actualVolume = isActive ? volume : 0f;
|
||||
SoundManager.Instance.SetSFXVolume(actualVolume);
|
||||
}
|
||||
|
||||
// 배경음 설정 적용 메서드
|
||||
private void ApplyBGMSettings(bool isActive, float volume)
|
||||
{
|
||||
float actualVolume = isActive ? volume : 0f;
|
||||
SoundManager.Instance.SetBGMVolume(actualVolume);
|
||||
}
|
||||
|
||||
public void OnCloseButtonClicked()
|
||||
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 103d1c060596bdd4bbe4361b2d571cdd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14ced887e59fe2247ad5ac97a92b7003
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/PIH/Assets/RpgBgmDungeon/RPG_Dungeon.wav
(Stored with Git LFS)
BIN
Assets/PIH/Assets/RpgBgmDungeon/RPG_Dungeon.wav
(Stored with Git LFS)
Binary file not shown.
@ -1,24 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6278383b82513424bb58a3faeeb8a9db
|
||||
timeCreated: 1545638758
|
||||
licenseType: Store
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -6,8 +6,6 @@ using UnityEngine.SceneManagement;
|
||||
|
||||
public partial class GameManager : Singleton<GameManager>
|
||||
{
|
||||
private Canvas _canvas;
|
||||
|
||||
// 게임 진행 상태
|
||||
private int currentDay = 1; // 날짜
|
||||
public int CurrentDay => currentDay;
|
||||
|
@ -32,7 +32,7 @@ public partial class GameManager
|
||||
[SerializeField] private AudioClip victorySFX;
|
||||
|
||||
[Header("플레이어 전투 효과음")]
|
||||
[SerializeField] private AudioClip housingFootstepSFX;
|
||||
[SerializeField] private AudioClip playerHitSFX;
|
||||
[SerializeField] private AudioClip dungeonFootstepSFX;
|
||||
[SerializeField] private AudioClip playerAttackSFX;
|
||||
|
||||
@ -85,7 +85,7 @@ public partial class GameManager
|
||||
if (sleepingSFX != null) SafeSoundManager?.LoadAudioClip("Sleeping", sleepingSFX);
|
||||
|
||||
// 플레이어 전투 효과음 등록
|
||||
if (housingFootstepSFX != null) SafeSoundManager?.LoadAudioClip("HousingFootstep", housingFootstepSFX);
|
||||
if (playerHitSFX != null) SafeSoundManager?.LoadAudioClip("PlayerHit", playerHitSFX);
|
||||
if (dungeonFootstepSFX != null) SafeSoundManager?.LoadAudioClip("DungeonFootstep", dungeonFootstepSFX);
|
||||
if (playerAttackSFX != null) SafeSoundManager?.LoadAudioClip("PlayerAttack", playerAttackSFX);
|
||||
|
||||
@ -173,6 +173,7 @@ public partial class GameManager
|
||||
{
|
||||
SafeSoundManager?.PlayBGM(bgmClip, true, 1.5f);
|
||||
currentBGMTrack = targetScene;
|
||||
wasPlayingBGM = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -223,6 +224,12 @@ public partial class GameManager
|
||||
|
||||
public void PlayInteractionSound(ActionType actionType)
|
||||
{
|
||||
if (sceneBGMMap.TryGetValue(currentBGMTrack, out AudioClip bgmClip))
|
||||
{
|
||||
previousBGMClip = bgmClip;
|
||||
wasPlayingBGM = true;
|
||||
}
|
||||
|
||||
// 배경음 중지 (페이드아웃)
|
||||
SafeSoundManager?.StopBGM(true, 0.5f);
|
||||
|
||||
@ -301,9 +308,9 @@ public partial class GameManager
|
||||
|
||||
#region 플레이어 전투 효과음 제어
|
||||
|
||||
public void PlayHousingFootstepSound()
|
||||
public void PlayPlayerHitSound()
|
||||
{
|
||||
SafeSoundManager?.PlaySFX("HousingFootstep");
|
||||
SafeSoundManager?.PlaySFX("PlayerHit");
|
||||
}
|
||||
|
||||
public void PlayDungeonFootstepSound()
|
||||
|
Loading…
x
Reference in New Issue
Block a user