This commit is contained in:
aube.lee
2025-03-01 21:46:34 +09:00
40 changed files with 430 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 65232055f6eef9e448a7fe045b14e461
guid: b28bcc4f81c0b4241be9fd9d2f59604e
AudioImporter:
externalObjects: {}
serializedVersion: 7

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0d446aad3a2bbb64f81063aa72ba4831
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7e82105a0d9784144ae38fc5230a777d
guid: d5e7610e90cfd054b9c1fc1fef110d91
AudioImporter:
externalObjects: {}
serializedVersion: 7

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 3aa1c6aa8a0b2c24487dde9a48e1d6da
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:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 365990a793283564aa391eddb2dc2c76
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:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 205332da33a32af498c7e76ae1250668
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:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: bbb6809f75e3f71468da0b8bf20187ba
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:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 22b2ca228b3f8ee49b511d312127d757
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:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 410601cdf0dc2194e8c95506d0f9410c
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:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 0f19b48052aaaf249b0961eb5a51fce0
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:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 0276d1771dc6b084da5731cd611b452a
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:

View File

@@ -643,3 +643,6 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 410601cdf0dc2194e8c95506d0f9410c, type: 3}
_deathSound: {fileID: 8300000, guid: 22b2ca228b3f8ee49b511d312127d757, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}

View File

@@ -562,6 +562,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 0276d1771dc6b084da5731cd611b452a, type: 3}
_deathSound: {fileID: 8300000, guid: 22b2ca228b3f8ee49b511d312127d757, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &7570151098365513060
GameObject:
m_ObjectHideFlags: 0

View File

@@ -229,6 +229,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 0276d1771dc6b084da5731cd611b452a, type: 3}
_deathSound: {fileID: 8300000, guid: b28bcc4f81c0b4241be9fd9d2f59604e, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &3020795925047894191
GameObject:
m_ObjectHideFlags: 0

View File

@@ -229,6 +229,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 410601cdf0dc2194e8c95506d0f9410c, type: 3}
_deathSound: {fileID: 8300000, guid: 22b2ca228b3f8ee49b511d312127d757, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &1425971833131969348
GameObject:
m_ObjectHideFlags: 0

View File

@@ -568,6 +568,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 0f19b48052aaaf249b0961eb5a51fce0, type: 3}
_deathSound: {fileID: 8300000, guid: 22b2ca228b3f8ee49b511d312127d757, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &8136905868517816863
GameObject:
m_ObjectHideFlags: 0

View File

@@ -643,3 +643,6 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 0276d1771dc6b084da5731cd611b452a, type: 3}
_deathSound: {fileID: 8300000, guid: b28bcc4f81c0b4241be9fd9d2f59604e, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}

View File

@@ -305,6 +305,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 410601cdf0dc2194e8c95506d0f9410c, type: 3}
_deathSound: {fileID: 8300000, guid: 22b2ca228b3f8ee49b511d312127d757, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &5762289934519905782
GameObject:
m_ObjectHideFlags: 0

View File

@@ -310,6 +310,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 0276d1771dc6b084da5731cd611b452a, type: 3}
_deathSound: {fileID: 8300000, guid: 22b2ca228b3f8ee49b511d312127d757, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &4890974773502705404
GameObject:
m_ObjectHideFlags: 0

View File

@@ -386,6 +386,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 410601cdf0dc2194e8c95506d0f9410c, type: 3}
_deathSound: {fileID: 8300000, guid: 22b2ca228b3f8ee49b511d312127d757, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &5557906192929727440
GameObject:
m_ObjectHideFlags: 0

View File

@@ -384,6 +384,9 @@ MonoBehaviour:
Gold: 0
Exp: 0
Score: 0
_attackSound: {fileID: 8300000, guid: 0276d1771dc6b084da5731cd611b452a, type: 3}
_deathSound: {fileID: 8300000, guid: b28bcc4f81c0b4241be9fd9d2f59604e, type: 3}
_hitSound: {fileID: 8300000, guid: f48df33f7dda4a94aae097863d2e875d, type: 3}
--- !u!1 &6732329482384499360
GameObject:
m_ObjectHideFlags: 0

View File

@@ -380,6 +380,12 @@ MonoBehaviour:
firePoint: {fileID: 3571909985532505043}
attackCollider: {fileID: 3772826248857896723}
rb: {fileID: 4986202531950816680}
mpRecoveryRate: 1
mpRecoveryInterval: 3
isRecovering: 0
_attackSound: {fileID: 8300000, guid: 3aa1c6aa8a0b2c24487dde9a48e1d6da, type: 3}
_deathSound: {fileID: 8300000, guid: d5e7610e90cfd054b9c1fc1fef110d91, type: 3}
_hitSound: {fileID: 8300000, guid: 365990a793283564aa391eddb2dc2c76, type: 3}
--- !u!1 &6930308287002930140
GameObject:
m_ObjectHideFlags: 0

View File

@@ -349,6 +349,12 @@ MonoBehaviour:
firePoint: {fileID: 3204799031628172313}
attackCollider: {fileID: 5093782900058509363}
rb: {fileID: 4986202531950816680}
mpRecoveryRate: 1
mpRecoveryInterval: 3
isRecovering: 0
_attackSound: {fileID: 8300000, guid: 3aa1c6aa8a0b2c24487dde9a48e1d6da, type: 3}
_deathSound: {fileID: 8300000, guid: d5e7610e90cfd054b9c1fc1fef110d91, type: 3}
_hitSound: {fileID: 8300000, guid: 365990a793283564aa391eddb2dc2c76, type: 3}
--- !u!1 &4475587780921916628
GameObject:
m_ObjectHideFlags: 0

View File

@@ -20061,6 +20061,10 @@ MonoBehaviour:
monsterPrefabB: {fileID: 0}
bossPrefab: {fileID: 3667660097767351871, guid: ef14281ca23119941b755a7bff7ff6c8, type: 3}
waveCounter: {fileID: 312801291}
_13StageSound: {fileID: 8300000, guid: 4f6e8dfda91d08a4ba54929ea80c3305, type: 3}
_46StageSound: {fileID: 8300000, guid: ee8fe21d7aa40914f94c8d6096ab5f45, type: 3}
_79StageSound: {fileID: 8300000, guid: dcc4a0adc983e3946af96ad9a7d8d239, type: 3}
_10StageSound: {fileID: 8300000, guid: d3e291fdf326c5644ae98d97b25436be, type: 3}
--- !u!4 &1103604663
Transform:
m_ObjectHideFlags: 0
@@ -34287,6 +34291,7 @@ GameObject:
m_Component:
- component: {fileID: 2068238029}
- component: {fileID: 2068238028}
- component: {fileID: 2068238030}
m_Layer: 0
m_Name: SoundManager
m_TagString: Untagged
@@ -34306,6 +34311,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 023ac119be3a3d24c816494653c341dc, type: 3}
m_Name:
m_EditorClassIdentifier:
bgSound: {fileID: 2068238030}
--- !u!4 &2068238029
Transform:
m_ObjectHideFlags: 0
@@ -34321,6 +34327,102 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &2068238030
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2068238027}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 1
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
--- !u!1 &2135657550
GameObject:
m_ObjectHideFlags: 0

View File

@@ -40,8 +40,10 @@ namespace TON
[SerializeField] private float mpRecoveryRate = 1f; // MP 회복량
[SerializeField] private float mpRecoveryInterval = 3f; // 회복 간격(초)
[SerializeField] private bool isRecovering = false;
public AudioClip _attackSound;
public AudioClip _deathSound;
public void Start()
{
animator = GetComponent<Animator>();
@@ -172,6 +174,8 @@ namespace TON
isAttack = true;
// 공격 애니메이션 적용
animator.Play("Default Attack");
SoundManager.instance.SFXPlay("Attack", _attackSound);
// 공격 범위 Collider 활성화
attackCollider.EnableCollider(true);
@@ -269,6 +273,7 @@ namespace TON
if (currentHP <= 0f && prevHP > 0)
{
Dead();
SoundManager.instance.SFXPlay("Death", _deathSound);
}
// 체력이 0 보다 클때만 피격 모션 실행

View File

@@ -40,6 +40,11 @@ namespace TON
[SerializeField]
public TextMeshProUGUI waveCounter;
public AudioClip _13StageSound;
public AudioClip _46StageSound;
public AudioClip _79StageSound;
public AudioClip _10StageSound;
// Start is called before the first frame update
void Start()
{
@@ -84,11 +89,20 @@ namespace TON
activeMonsters.RemoveAll(monster => monster == null);
// 모든 몬스터가 죽었는지 확인하고 다음 웨이브 준비
if (activeMonsters.Count == 0 && currentWave > 0 && !isWaitingForNextWave)
if (activeMonsters.Count == 0 && currentWave > 0 && currentWave < 11 && !isWaitingForNextWave)
{
isWaitingForNextWave = true;
StartCoroutine(StartNextWaveWithDelay());
}
// 플레이어 존재 여부 확인
var player = GameObject.Find("TON.Player").GetComponentInChildren<CharacterBase>();
if (player == null && gameStarted)
{
// 플레이어가 죽었을 때
SoundManager.instance.BgSoundPlay(null);
// 필요하다면 gameStarted = false; 등을 설정하여 한 번만 실행되게 함
}
}
private void SpawnBossMonster()
@@ -110,6 +124,23 @@ namespace TON
StageManager.Singleton.SetWaveData(currentWave); // 웨이브 정보 전달.
currentWave++;
if (0 < currentWave && currentWave <= 3)
{
SoundManager.instance.BgSoundPlay(_13StageSound); // 1~3스테이지 배경음
}
else if (3 < currentWave && currentWave <= 6)
{
SoundManager.instance.BgSoundPlay(_46StageSound); // 4~6스테이지 배경음
}
else if (6 < currentWave && currentWave <= 9)
{
SoundManager.instance.BgSoundPlay(_79StageSound); // 7~9스테이지 배경음
}
else if(currentWave == 10)
{
SoundManager.instance.BgSoundPlay(_10StageSound); // 10스테이지 배경음
}
if (currentWave > TOTAL_WAVES)
{
@@ -235,6 +266,8 @@ namespace TON
{
if (currentWave != 11 && GameObject.Find("TON.Player").GetComponentInChildren<CharacterBase>() != null)
{
SoundManager.instance.BgSoundPlay(null);
float timer = nextWaveDelay;
while (timer > 0)

View File

@@ -1,11 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace TON
{
public class SoundManager : MonoBehaviour
{
public AudioSource bgSound;
public static SoundManager instance;
private void Awake()
@@ -14,12 +17,20 @@ namespace TON
{
instance = this;
DontDestroyOnLoad(instance);
// 씬 로드 이벤트에 리스너 등록
SceneManager.sceneLoaded += OnSceneLoaded;
}
else
{
Destroy(gameObject);
}
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
// 씬이 바뀔 때마다 배경 음악 종료
BgSoundPlay(null);
}
public void SFXPlay(string sfxName, AudioClip clip)
{
@@ -31,5 +42,13 @@ namespace TON
Destroy(go, clip.length);
}
public void BgSoundPlay(AudioClip clip)
{
bgSound.clip = clip;
bgSound.loop = true;
bgSound.volume = 1f;
bgSound.Play();
}
}
}