added prototype bgm to game
This commit is contained in:
parent
c126d80e2d
commit
04f7f72fe3
6 changed files with 293 additions and 14 deletions
|
@ -113,6 +113,130 @@ NavMeshSettings:
|
|||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &30160409
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 30160410}
|
||||
- component: {fileID: 30160411}
|
||||
m_Layer: 0
|
||||
m_Name: Audio Source
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &30160410
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 30160409}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 120074943}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &30160411
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 30160409}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 8300000, guid: a90787ea4a183c44699deb2babada64b, type: 3}
|
||||
m_PlayOnAwake: 0
|
||||
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
|
||||
--- !u!1 &120074942
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -140,6 +264,7 @@ Transform:
|
|||
m_Children:
|
||||
- {fileID: 1600556434}
|
||||
- {fileID: 801288608}
|
||||
- {fileID: 30160410}
|
||||
m_Father: {fileID: 734498092}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -619,8 +744,8 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mixer: {fileID: 24100000, guid: efb934a745665924d8c7dd46c0a117ae, type: 2}
|
||||
maintheme: {fileID: 24500006, guid: efb934a745665924d8c7dd46c0a117ae, type: 2}
|
||||
end: {fileID: 245089854461186482, guid: efb934a745665924d8c7dd46c0a117ae, type: 2}
|
||||
maintheme: {fileID: 1600556435}
|
||||
menutheme: {fileID: 30160411}
|
||||
gameovers: {fileID: 801288609}
|
||||
soundeffects:
|
||||
- {fileID: 1908750963}
|
||||
|
@ -851,7 +976,7 @@ Prefab:
|
|||
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
|
||||
type: 2}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 66.396866
|
||||
value: 65.33481
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
|
||||
type: 2}
|
||||
|
@ -979,8 +1104,9 @@ AudioSource:
|
|||
m_GameObject: {fileID: 1600556433}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
OutputAudioMixerGroup: {fileID: 243359265566762914, guid: efb934a745665924d8c7dd46c0a117ae,
|
||||
type: 2}
|
||||
m_audioClip: {fileID: 8300000, guid: c89601ee48d799943a756d1d15cd4954, type: 3}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
|
|
|
@ -113,6 +113,131 @@ NavMeshSettings:
|
|||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &52367873
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 52367874}
|
||||
- component: {fileID: 52367875}
|
||||
m_Layer: 0
|
||||
m_Name: menu
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &52367874
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 52367873}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 792683703}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &52367875
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 52367873}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 243359265566762914, guid: efb934a745665924d8c7dd46c0a117ae,
|
||||
type: 2}
|
||||
m_audioClip: {fileID: 8300000, guid: a90787ea4a183c44699deb2babada64b, type: 3}
|
||||
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
|
||||
--- !u!1 &287217883
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -524,6 +649,7 @@ Transform:
|
|||
m_Children:
|
||||
- {fileID: 923869162}
|
||||
- {fileID: 287217884}
|
||||
- {fileID: 52367874}
|
||||
m_Father: {fileID: 1926562125}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -564,8 +690,9 @@ AudioSource:
|
|||
m_GameObject: {fileID: 923869161}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
OutputAudioMixerGroup: {fileID: 243359265566762914, guid: efb934a745665924d8c7dd46c0a117ae,
|
||||
type: 2}
|
||||
m_audioClip: {fileID: 8300000, guid: c89601ee48d799943a756d1d15cd4954, type: 3}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
|
@ -871,8 +998,8 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mixer: {fileID: 24100000, guid: efb934a745665924d8c7dd46c0a117ae, type: 2}
|
||||
maintheme: {fileID: 24500006, guid: efb934a745665924d8c7dd46c0a117ae, type: 2}
|
||||
end: {fileID: 245089854461186482, guid: efb934a745665924d8c7dd46c0a117ae, type: 2}
|
||||
maintheme: {fileID: 923869163}
|
||||
menutheme: {fileID: 52367875}
|
||||
gameovers: {fileID: 287217885}
|
||||
soundeffects: []
|
||||
--- !u!1 &1039057777
|
||||
|
@ -1360,7 +1487,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
notifications: {fileID: 0}
|
||||
gameOverPanel: {fileID: 0}
|
||||
restartUIPanel: {fileID: 0}
|
||||
healthcontroller: {fileID: 0}
|
||||
mainMenuSceneIndex: 0
|
||||
--- !u!1 &1586619316
|
||||
|
@ -1757,6 +1884,6 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
notifications: {fileID: 0}
|
||||
gameOverPanel: {fileID: 0}
|
||||
restartUIPanel: {fileID: 0}
|
||||
healthcontroller: {fileID: 0}
|
||||
mainMenuSceneIndex: 0
|
||||
|
|
|
@ -7,6 +7,7 @@ public class AudioControl : MonoBehaviour
|
|||
{
|
||||
public AudioMixer mixer;
|
||||
public AudioSource maintheme;
|
||||
public AudioSource menutheme;
|
||||
public AudioSource gameovers;
|
||||
public AudioSource[] soundeffects;
|
||||
|
||||
|
@ -21,6 +22,7 @@ public class AudioControl : MonoBehaviour
|
|||
void Start()
|
||||
{
|
||||
maintheme.loop = true;
|
||||
menutheme.loop = true;
|
||||
gameovers.loop = true;
|
||||
}
|
||||
|
||||
|
@ -42,7 +44,7 @@ public class AudioControl : MonoBehaviour
|
|||
{
|
||||
if (gameovers.isPlaying)
|
||||
gameovers.Stop();
|
||||
maintheme.Play();
|
||||
menutheme.Play();
|
||||
}
|
||||
|
||||
public void LevelBgm()
|
||||
|
|
|
@ -219,6 +219,7 @@ public class GameController : MonoBehaviour {
|
|||
}
|
||||
|
||||
private void Starting() {
|
||||
|
||||
StartObjective goal = new StartObjective(start, playerPrefab);
|
||||
start.SetObjective(goal);
|
||||
start.OnPlayerEnter(player);
|
||||
|
@ -228,7 +229,8 @@ public class GameController : MonoBehaviour {
|
|||
GetUI().InitHealthController(player);
|
||||
} else {
|
||||
Debug.Log("No Player spawned!");
|
||||
}
|
||||
}
|
||||
cam.GetComponent<AudioControl>().LevelBgm();
|
||||
}
|
||||
|
||||
private void Running() {
|
||||
|
@ -240,7 +242,7 @@ public class GameController : MonoBehaviour {
|
|||
//Time.timeScale = 0;
|
||||
if ( ui != null ) {
|
||||
Debug.Log("show Gameover UI");
|
||||
cam.GetComponent<AudioControl>().SfxPlay(2);
|
||||
cam.GetComponent<AudioControl>().GameOverBgm();
|
||||
ui.GetComponent<UIController>().ShowGameOverUI();
|
||||
} else {
|
||||
Debug.Log("No UI specified");
|
||||
|
|
BIN
Assets/sound/menuV1.wav
Normal file
BIN
Assets/sound/menuV1.wav
Normal file
Binary file not shown.
22
Assets/sound/menuV1.wav.meta
Normal file
22
Assets/sound/menuV1.wav.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a90787ea4a183c44699deb2babada64b
|
||||
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:
|
Loading…
Add table
Reference in a new issue