Compare commits

..

11 Commits

25 changed files with 1711 additions and 2836 deletions

View File

@@ -1,5 +1,38 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!243 &-6354048548703642832
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Flavor VO
m_AudioMixer: {fileID: 24100000}
m_GroupID: d96f2f2d9081a2b4680e4cc99ae6dde2
m_Children: []
m_Volume: 8b556d01082609a41b5e0ac71387eb2b
m_Pitch: 543e5193b3b867a4a9e179b532d94963
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 2755879577735596061}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &-2388863367724940654
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 70589a6f94c3a7e4f985d76dc20fec7d
m_EffectName: Attenuation
m_MixLevel: 1017da8a9e9644f46a2582f97a979436
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!243 &-1208528772216134639
AudioMixerGroupController:
m_ObjectHideFlags: 0
@@ -19,6 +52,25 @@ AudioMixerGroupController:
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!243 &-281949353495416486
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Critical VO
m_AudioMixer: {fileID: 24100000}
m_GroupID: 0564b669f5b88d74fbf644daddff7659
m_Children: []
m_Volume: b5a4611797e711d4384da7546db03ad4
m_Pitch: 6b6c6926b5cf7d64e8546ad727cd1b56
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 4434749241126400044}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!241 &24100000
AudioMixerController:
m_ObjectHideFlags: 0
@@ -33,7 +85,7 @@ AudioMixerController:
m_StartSnapshot: {fileID: 24500006}
m_SuspendThreshold: -80
m_EnableSuspend: 1
m_UpdateMode: 0
m_UpdateMode: 1
m_ExposedParameters: []
m_AudioMixerGroupViews:
- guids:
@@ -41,6 +93,9 @@ AudioMixerController:
- 18a903247b220fb47b8e743f756a2d19
- 7e41227c6d9a65c4898080710c015deb
- 93449300145f3ff4c9f21b59e4c06cb8
- 0564b669f5b88d74fbf644daddff7659
- d96f2f2d9081a2b4680e4cc99ae6dde2
- 69e7e2391e0225240b94aab8ac4968dd
name: View
m_CurrentViewIndex: 0
m_TargetSnapshot: {fileID: 24500006}
@@ -56,6 +111,7 @@ AudioMixerGroupController:
m_Children:
- {fileID: -1208528772216134639}
- {fileID: 1171626333864818265}
- {fileID: 5060278701334990569}
- {fileID: 3533147658878909314}
m_Volume: 59834639f5649d34cbb5ed8055029b93
m_Pitch: 2c79200ddd7bbf244bc5980d7fbb6e1c
@@ -124,6 +180,20 @@ AudioMixerGroupController:
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &2755879577735596061
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Attenuation
m_EffectID: 938281aaf51dfdb448130f1d299a9c32
m_EffectName: Attenuation
m_MixLevel: ba6923d75c4220e4bab55e5aa6eab3ea
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!243 &3533147658878909314
AudioMixerGroupController:
m_ObjectHideFlags: 0
@@ -133,7 +203,9 @@ AudioMixerGroupController:
m_Name: Voice Over
m_AudioMixer: {fileID: 24100000}
m_GroupID: 7e41227c6d9a65c4898080710c015deb
m_Children: []
m_Children:
- {fileID: -281949353495416486}
- {fileID: -6354048548703642832}
m_Volume: f2db72fd62c62d74cb03d11a28b9ec8f
m_Pitch: f711bad694828024996b7a703eb57af7
m_Send: 00000000000000000000000000000000
@@ -143,6 +215,39 @@ AudioMixerGroupController:
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &4434749241126400044
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 28433275b262aa6499b0cf5076b597de
m_EffectName: Attenuation
m_MixLevel: 5925348bdea90b04a895b3cd54c45b27
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!243 &5060278701334990569
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Music
m_AudioMixer: {fileID: 24100000}
m_GroupID: 69e7e2391e0225240b94aab8ac4968dd
m_Children: []
m_Volume: c518de39492791c49b618d0aeac5a88d
m_Pitch: 264704130d9d22745aa9fa1150ff4490
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: -2388863367724940654}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &6612228481115079330
AudioMixerEffectController:
m_ObjectHideFlags: 3

View File

@@ -54,6 +54,8 @@ SpriteRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
@@ -75,6 +77,7 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
@@ -163,6 +166,8 @@ SpriteRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
@@ -184,6 +189,7 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
@@ -214,6 +220,8 @@ GameObject:
- component: {fileID: 6455089331794006644}
- component: {fileID: 5043618791380611472}
- component: {fileID: 4538351495758615844}
- component: {fileID: 1474128690748341614}
- component: {fileID: 8147035636176183831}
m_Layer: 10
m_Name: AnneLise_Camera
m_TagString: Untagged
@@ -439,3 +447,115 @@ BoxCollider2D:
m_AutoTiling: 0
m_Size: {x: 4, y: 5}
m_EdgeRadius: 0
--- !u!82 &1474128690748341614
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5172497182660285677}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: -281949353495416486, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0}
m_Resource: {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
--- !u!114 &8147035636176183831
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5172497182660285677}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 242e6101be071f44fb14c3c12641c833, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::AppleAudioSource
audioSourceType: 0
audioSource: {fileID: 0}
priority: 0

View File

@@ -134,12 +134,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f0f1834ce0c7b0b42b633a6d2bd67698, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
gardenerAudioPlayer: {fileID: 2263287369158035129}
mowerAudioPlayer: {fileID: 647208781616539222}
gardenerAudioPlayer: {fileID: 0}
mowerAudioPlayer: {fileID: 0}
mowerStartAudio: {fileID: 8300000, guid: 082fcd5bdadf2884e9aefc6abf4a5cc5, type: 3}
mowerLoopAudio: {fileID: 8300000, guid: aed79daa951bce74196ce04da2990b22, type: 3}
mowerLoopAudio: {fileID: 0}
gardenerFleeAudioClip: {fileID: 6418180475301049370, guid: 4949348ce86bb9e43a4251c06c1cb5d1, type: 2}
gardenerChaseAudioClip: {fileID: 6418180475301049370, guid: 97ccaa2fcf396f446aa7fde8586d225a, type: 2}
gardenerSprite: {fileID: 0}
--- !u!1 &1251257928845417300
GameObject:
m_ObjectHideFlags: 0
@@ -308,7 +309,6 @@ Transform:
- {fileID: 5409891338185859165}
- {fileID: 3150182414053579701}
- {fileID: 1667791532132169314}
- {fileID: 3539173003033760347}
m_Father: {fileID: 2264394306674147778}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &20943836391379072
@@ -907,135 +907,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5980d28f81eb545d78e1d84e1449a10f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &8590192324315186055
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3539173003033760347}
- component: {fileID: 647208781616539222}
m_Layer: 0
m_Name: MowerSFX
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3539173003033760347
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8590192324315186055}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.5896003, y: -4.9567494, z: 0}
m_LocalScale: {x: 0.7142856, y: 0.7142856, z: 0.7142856}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8242272023601642381}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &647208781616539222
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8590192324315186055}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 1171626333864818265, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 20
MaxDistance: 50.5
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: 1
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 &9197792684223820912
GameObject:
m_ObjectHideFlags: 0
@@ -1171,11 +1042,11 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 1592061707390547073, guid: 7be57ba4ecd292f4c90169045a2d69e4, type: 3}
propertyPath: m_LocalPosition.x
value: -0.22846493
value: -0.22846495
objectReference: {fileID: 0}
- target: {fileID: 1592061707390547073, guid: 7be57ba4ecd292f4c90169045a2d69e4, type: 3}
propertyPath: m_LocalPosition.y
value: -3.3647113
value: -3.3647115
objectReference: {fileID: 0}
- target: {fileID: 1592061707390547073, guid: 7be57ba4ecd292f4c90169045a2d69e4, type: 3}
propertyPath: m_LocalPosition.z
@@ -1232,9 +1103,6 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 5034469437909578894, guid: 7be57ba4ecd292f4c90169045a2d69e4, type: 3}
insertIndex: -1
addedObject: {fileID: 7341880855800055810}
- targetCorrespondingSourceObject: {fileID: 5034469437909578894, guid: 7be57ba4ecd292f4c90169045a2d69e4, type: 3}
insertIndex: -1
addedObject: {fileID: 2263287369158035129}
m_SourcePrefab: {fileID: 100100000, guid: 7be57ba4ecd292f4c90169045a2d69e4, type: 3}
--- !u!1 &1789599716509294674 stripped
GameObject:
@@ -1253,103 +1121,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: eaefd3d5a2a864ca5b5d9ec5f2a7040f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!82 &2263287369158035129
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1789599716509294674}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 3533147658878909314, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 20
MaxDistance: 50
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: 1
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!4 &5409891338185859165 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1592061707390547073, guid: 7be57ba4ecd292f4c90169045a2d69e4, type: 3}

View File

@@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 536416456044738252}
- component: {fileID: 6629069534496617365}
m_Layer: 0
m_Name: SoundManager
m_Name: AudioManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -44,3 +44,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d8bd90cfc02c8274fac5ce090285ed6a, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
currentPauseBehavior: 2
audioMixer: {fileID: 24100000, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
currentlyPlayingVO: {fileID: 0}
criticalVOSources: []
VOSources: []
musicSources: []
ambienceSources: []
SFXSources: []

View File

@@ -651,6 +651,7 @@ GameObject:
- component: {fileID: 578146208477020881}
- component: {fileID: 1193493154550576580}
- component: {fileID: 7652960462502122104}
- component: {fileID: 989520896849684110}
m_Layer: 0
m_Name: AnneLiseBush
m_TagString: Untagged
@@ -747,10 +748,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: edc43a9f07fedb44abb68b06c71d17ea, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
VOPlayer: {fileID: 7652960462502122104}
SFXPlayer: {fileID: 5129281429389775297}
VOPlayer: {fileID: 989520896849684110}
SFXPlayer: {fileID: 2614810362455218124}
reactionClipToPlay: {fileID: 0}
flashSFXClipToPlay: {fileID: 8300000, guid: 2ac461fcc3f7a014ca716a4f231be004, type: 3}
birdGameStats: {fileID: 0}
birdCounterClip:
- {fileID: 8300000, guid: 60d02b75b267d5949a36f04bb5dfe409, type: 3}
- {fileID: 8300000, guid: 86dc2e8f9a1cf7440adccad824209334, type: 3}
@@ -853,6 +855,21 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &989520896849684110
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5943355783477523754}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 242e6101be071f44fb14c3c12641c833, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::AppleAudioSource
audioSourceType: 0
audioSource: {fileID: 0}
priority: 0
--- !u!1 &6948354193133336628
GameObject:
m_ObjectHideFlags: 0
@@ -863,6 +880,7 @@ GameObject:
m_Component:
- component: {fileID: 6330838396794415978}
- component: {fileID: 5129281429389775297}
- component: {fileID: 2614810362455218124}
m_Layer: 0
m_Name: SFXAudio
m_TagString: Untagged
@@ -982,6 +1000,21 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &2614810362455218124
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6948354193133336628}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 242e6101be071f44fb14c3c12641c833, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::AppleAudioSource
audioSourceType: 3
audioSource: {fileID: 0}
priority: 0
--- !u!1 &7019503702609181254
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,7 @@ public class PicnicBehaviour : MonoBehaviour
[Header("The FakeChocolate to destroy!")]
[SerializeField] private GameObject fakeChocolate; // Assign in Inspector
private AudioSource _audioSource;
private AppleAudioSource _audioSource;
public AudioResource distractedAudioClips;
public AudioResource angryAudioClips;
public AudioResource feederClips;
@@ -34,7 +34,7 @@ public class PicnicBehaviour : MonoBehaviour
{
stateMachine = GetComponent<StateMachine>();
animator = GetComponent<Animator>();
_audioSource = GetComponent<AudioSource>();
_audioSource = GetComponent<AppleAudioSource>();
}
private IEnumerator StateCycleRoutine()
@@ -68,8 +68,8 @@ public class PicnicBehaviour : MonoBehaviour
animator.SetTrigger("theyAngry");
//stateMachine.ChangeState("Picnic PPL Angry");
Logging.Debug("Hey! Don't steal my chocolate!");
_audioSource.resource = angryAudioClips;
_audioSource.Play();
_audioSource.audioSource.resource = angryAudioClips;
_audioSource.Play(0);
}
public void destroyFakeChocolate()
@@ -83,20 +83,20 @@ public class PicnicBehaviour : MonoBehaviour
public void PlayFeederAudio()
{
_audioSource.resource = feederClips;
_audioSource.Play();
_audioSource.audioSource.resource = feederClips;
_audioSource.Play(0);
}
public void PlayMoanerAudio()
{
_audioSource.resource = moanerClips;
_audioSource.Play();
_audioSource.audioSource.resource = moanerClips;
_audioSource.Play(0);
}
public void PlayDistractedAudio()
{
_audioSource.resource = distractedAudioClips;
_audioSource.Play();
_audioSource.audioSource.resource = distractedAudioClips;
_audioSource.Play(0);
}

View File

@@ -7,7 +7,7 @@ public class SoundGenerator : MonoBehaviour
[SerializeField] private Sprite enterSprite;
[SerializeField] private Sprite exitSprite;
[SerializeField] private AudioClip enterSound;
[SerializeField] private AudioSource audioSource;
[SerializeField] private AppleAudioSource audioSource;
[SerializeField] private StateMachine soundBirdSMRef;
[SerializeField] private soundBird_CanFly soundbirdHearingCheck;
@@ -35,7 +35,7 @@ public class SoundGenerator : MonoBehaviour
}
if (audioSource != null && enterSound != null)
{
audioSource.PlayOneShot(enterSound);
audioSource.audioSource.PlayOneShot(enterSound);
}
if (soundBirdSMRef != null && soundBirdSMRef.currentState.name == "SoundBird" && soundbirdHearingCheck.canFly == true)
{

View File

@@ -13,7 +13,7 @@ public class soundBird_TakeOffBehaviour : MonoBehaviour
private Animator animator;
private TweenBase objectTween;
public AudioSource audioSource;
public AppleAudioSource audioSource;
void Awake()
{
@@ -29,7 +29,7 @@ public class soundBird_TakeOffBehaviour : MonoBehaviour
{
animator.SetBool("isScared", true);
objectTween = Tween.Spline(FlightSpline, SoundBirdObject, 0, 1, false, flightDuration, flightDelay, Tween.EaseIn, Tween.LoopType.None, HandleTweenStarted, HandleTweenFinished);
audioSource.Play();
audioSource.Play(0);
}
void HandleTweenStarted()
{

View File

@@ -6,11 +6,12 @@ using Core;
using Interactions;
using UnityEngine;
using PuzzleS;
using UnityEngine.Audio;
namespace Dialogue
{
[AddComponentMenu("AppleHills/Dialogue/Dialogue Component")]
[RequireComponent(typeof(AudioSource))]
[RequireComponent(typeof(AppleAudioSource))]
public class DialogueComponent : MonoBehaviour
{
[SerializeField] private RuntimeDialogueGraph dialogueGraph;
@@ -19,7 +20,7 @@ namespace Dialogue
private int currentLineIndex;
private bool initialized = false;
private SpeechBubble speechBubble;
private AudioSource audioSource;
private AppleAudioSource appleAudioSource;
// Flag to track when a condition has been met but dialogue hasn't advanced yet
private bool _conditionSatisfiedPendingAdvance = false;
@@ -37,7 +38,7 @@ namespace Dialogue
private void Start()
{
// Get required components
audioSource = GetComponent<AudioSource>();
appleAudioSource = GetComponent<AppleAudioSource>();
speechBubble = GetComponentInChildren<SpeechBubble>();
if (speechBubble == null)
@@ -109,19 +110,19 @@ namespace Dialogue
/// Play the audio clip for the current dialogue content
/// </summary>
/// <param name="clip">Audio clip to play</param>
private void PlayDialogueAudio(AudioClip clip)
private void PlayDialogueAudio(AudioResource clip)
{
// Stop any currently playing audio
if (audioSource.isPlaying)
if (appleAudioSource.audioSource.isPlaying)
{
audioSource.Stop();
appleAudioSource.Stop();
}
// Play the new clip if it exists
if (clip != null)
{
audioSource.clip = clip;
audioSource.Play();
appleAudioSource.audioSource.resource = clip;
appleAudioSource.Play(1);
Logging.Debug($"Playing dialogue audio: {clip.name}");
}
}

View File

@@ -0,0 +1,94 @@
using AudioSourceEvents;
using System;
using System.Diagnostics.Tracing;
using UnityEditor.UI;
using UnityEngine;
using UnityEngine.Audio;
/// <summary>
/// We automatically add the AudioSource component here so we can control it. Do not add it manually!
/// </summary>
[RequireComponent(typeof(AudioSource))]
public class AppleAudioSource : MonoBehaviour
{
public enum AudioSourceType{CriticalVO,VO,Ambience,SFX,Music}
public AudioSourceType audioSourceType;
[HideInInspector] public AudioSource audioSource;
private AudioMixer _audioMixer;
[HideInInspector ] public int clipPriority;
public int sourcePriority;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
audioSource = GetComponent<AudioSource>();
AudioManager.Instance.RegisterNewAudioSource(this);
_audioMixer = AudioManager.Instance.audioMixer;
InitializeAudioSource();
audioSource.playOnAwake = false;
}
private void Awake()
{
Start();
}
public void InitializeAudioSource()
{
// Route the audio to the correct bus depending on type
switch (audioSourceType)
{
case AppleAudioSource.AudioSourceType.CriticalVO:
audioSource.outputAudioMixerGroup = _audioMixer.FindMatchingGroups("Critical VO")[0];
break;
case AppleAudioSource.AudioSourceType.VO:
audioSource.outputAudioMixerGroup = _audioMixer.FindMatchingGroups("Flavor VO")[0];
break;
case AppleAudioSource.AudioSourceType.SFX:
audioSource.outputAudioMixerGroup = _audioMixer.FindMatchingGroups("SFX")[0];
break;
case AppleAudioSource.AudioSourceType.Ambience:
audioSource.outputAudioMixerGroup = _audioMixer.FindMatchingGroups("Ambience")[0];
break;
case AppleAudioSource.AudioSourceType.Music:
audioSource.outputAudioMixerGroup = _audioMixer.FindMatchingGroups("Music")[0];
break;
}
}
public void Play(int requestedClipPriority)
{
clipPriority = requestedClipPriority;
if (audioSourceType == AudioSourceType.CriticalVO || audioSourceType == AudioSourceType.VO)
{
if (AudioManager.Instance.RequestPlayVO(this))
{
audioSource.Play();
}
else
{
Debug.Log("[AUDIOMANAGER] AppleAudioSource " + name + " was suppressed because something more important is playing");
}
}
else
{
audioSource.Play();
}
}
public void InterruptAudio(string nameOfInterruptingAudio)
{
Stop();
}
public void Stop()
{
clipPriority = 0;
audioSource.Stop();
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 242e6101be071f44fb14c3c12641c833

View File

@@ -1,16 +1,277 @@
using AppleHills.Core.Settings;
using Bootstrap;
using Core;
using PuzzleS;
using UnityEngine;
using UnityEngine.Audio;
using AppleHills.Core;
using AppleHills.Core.Interfaces;
using System.Collections.Generic;
using AudioSourceEvents;
using System;
public class AudioManager : MonoBehaviour
public class AudioManager : MonoBehaviour, IPausable
{
/// <summary>
/// Play all audio, just music or no audio at all when the game is paused.
/// </summary>
public enum PauseBehavior
{ PlayAllAudio, MusicOnly, NoAudio }
public PauseBehavior currentPauseBehavior;
public AudioMixer audioMixer;
private AudioListener _audioListener;
public AppleAudioSource currentlyPlayingVO;
private static AudioManager _instance;
private GameObject _player;
public List<AppleAudioSource> criticalVOSources;
public List<AppleAudioSource> VOSources;
public List<AppleAudioSource> musicSources;
public List<AppleAudioSource> ambienceSources;
public List<AppleAudioSource> SFXSources;
private IAudioEventSource _eventSource;
private bool wasInterrupted;
/// <summary>
/// Singleton instance of the AudioManager.
/// </summary>
public static AudioManager Instance => _instance;
void Awake()
{
_instance = this;
// Register for post-boot initialization
BootCompletionService.RegisterInitAction(InitializePostBoot);
GameManager.Instance.RegisterPausableComponent(this);
}
private void InitializePostBoot()
{
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
_player = QuickAccess.Instance.PlayerGameObject;
_audioListener = QuickAccess.Instance.MainCamera.GetComponent<AudioListener>();
foreach (AppleAudioSource _audioSource in criticalVOSources)
{
Debug.Log("Found source: " + _audioSource.name);
}
}
// Update is called once per frame
void Update()
public void SetAudioPauseBehavior(PauseBehavior newPauseBehavior)
{
switch (newPauseBehavior)
{
case PauseBehavior.PlayAllAudio:
audioMixer.updateMode = AudioMixerUpdateMode.UnscaledTime;
AudioListener.pause = false;
break;
case PauseBehavior.MusicOnly:
audioMixer.updateMode = AudioMixerUpdateMode.UnscaledTime; break;
//TODO: Pause all audio mixers except music mixer
case PauseBehavior.NoAudio:
audioMixer.updateMode = AudioMixerUpdateMode.Normal;
AudioListener.pause = true;
break;
}
}
public LevelAudioObject GetCurrentLevelAudioObject()
{
Debug.Log("Audio objects: " + FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length);
if (FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length > 1)
{
Debug.LogWarning("Warning! More than one LevelAudioObject in the level! Using the first one found");
return FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None)[0];
}
if (FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length == 0)
{
Debug.LogWarning("Error! No LevelAudioObject found, AudioManager might not function properly!");
return null;
}
else
return FindFirstObjectByType<LevelAudioObject>();
}
public void Pause()
{
SetAudioPauseBehavior(PauseBehavior.NoAudio);
}
public void DoResume()
{
SetAudioPauseBehavior(PauseBehavior.PlayAllAudio);
}
public void RegisterNewAudioSource(AppleAudioSource newAudioSource)
{
switch (newAudioSource.audioSourceType)
{
case AppleAudioSource.AudioSourceType.CriticalVO:
criticalVOSources.Add(newAudioSource);
break;
case AppleAudioSource.AudioSourceType.VO:
VOSources.Add(newAudioSource);
break;
case AppleAudioSource.AudioSourceType.SFX:
SFXSources.Add(newAudioSource);
break;
case AppleAudioSource.AudioSourceType.Ambience:
ambienceSources.Add(newAudioSource);
break;
case AppleAudioSource.AudioSourceType.Music:
musicSources.Add(newAudioSource);
break;
}
}
/// <summary>
/// Request playing a VO line. Returns true if whatever is playing is not critical, or weight of requested VO line is lower.
/// </summary>
public bool RequestPlayVO(AppleAudioSource requestedAudioSource)
{
//Debug.Log($"[AUDIOMANAGER] CurrentVO source prio: {currentlyPlayingVO.sourcePriority}, clip prio: {currentlyPlayingVO.clipPriority} requested VO prio: {requestedAudioSource.sourcePriority}, clip prio: {clipPriority}");
// If nothing is playing, let the requested audio source play
if (currentlyPlayingVO == null)
{
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] Playing {currentlyPlayingVO.name} as nothing is currently playing.");
return true;
}
// If the requested audio is not critical, and the currently playing audio is, tell the request to get bent
if (requestedAudioSource.audioSourceType == AppleAudioSource.AudioSourceType.VO && currentlyPlayingVO.audioSourceType == AppleAudioSource.AudioSourceType.CriticalVO)
{
return false;
}
// If the requested audio source is the same, interrupt and trigger it again
if (currentlyPlayingVO == requestedAudioSource)
{
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] {currentlyPlayingVO.name} is the same as {requestedAudioSource.name}. Triggering it again.");
return true;
}
// if the currently playing audio source is not critical, interrupt it and play the requested audio source
if (currentlyPlayingVO.audioSourceType != AppleAudioSource.AudioSourceType.CriticalVO)
{
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] {currentlyPlayingVO.name} is not critical. Playing {requestedAudioSource.name} instead because it is critical.");
return true;
}
// If the requested audio source has the same priority as currently playing source, check the priority of the requested clip
if (currentlyPlayingVO.audioSourceType == AppleAudioSource.AudioSourceType.CriticalVO && currentlyPlayingVO.sourcePriority == requestedAudioSource.sourcePriority)
{
if (currentlyPlayingVO.clipPriority > requestedAudioSource.clipPriority)
{
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] Interrupted {currentlyPlayingVO.name} because it has same priority as {requestedAudioSource.name} but the requested clip has higher priority");
return true;
}
else
{
return false;
}
}
// If the requested audio source has higher priority than the currently playing source, interrupt the current source and let the requested one play
if (currentlyPlayingVO.audioSourceType == AppleAudioSource.AudioSourceType.CriticalVO && currentlyPlayingVO.sourcePriority > requestedAudioSource.sourcePriority)
{
currentlyPlayingVO.InterruptAudio(requestedAudioSource.name);
Debug.Log($"[AUDIOMANAGER] Interrupted {currentlyPlayingVO.name} because {requestedAudioSource.name} has higher priority");
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
return true;
}
// If the requested audio source didn't clear any of the above cases, tell it to get rekt.
else
{
Debug.Log($"[AUDIOMANAGER] {currentlyPlayingVO.name} is still playing. {requestedAudioSource.name} has lower priority");
return false;
}
}
private void OnApplicationQuit()
{
// TODO: Release the handles safely ReleaseAllHandles();
}
private void SetupNewAudioSource(AppleAudioSource audioSource)
{
if (audioSource.audioSource.resource == null)
{
Debug.Log($"[AUDIOMANAGER] Faled to setup {audioSource.name}. Invalid resource");
}
else
{
currentlyPlayingVO = audioSource;
_eventSource = audioSource.audioSource.RequestEventHandlers();
_eventSource.AudioStopped += OnAudioStopped;
_eventSource.AudioStarted += OnAudioStarted;
}
}
private void OnAudioStopped(object sender, EventArgs e)
{
if (wasInterrupted)
{
ResetAudioSource();
}
else
{
currentlyPlayingVO = null;
ResetAudioSource();
}
}
private void OnAudioStarted(object sender, EventArgs e)
{
}
private void ResetAudioSource()
{
_eventSource.AudioStopped -= OnAudioStopped;
_eventSource.AudioStarted -= OnAudioStarted;
wasInterrupted = false;
}
private void InterruptAudioSource(AppleAudioSource newAudioSource)
{
wasInterrupted = true;
//currentlyPlayingVO.InterruptAudio(newAudioSource.name);
InterruptAllVOSources();
ResetAudioSource();
currentlyPlayingVO = newAudioSource;
}
private void InterruptAllVOSources()
{
foreach (AppleAudioSource source in criticalVOSources)
{
source.InterruptAudio("GlobalInterrupt");
}
foreach (AppleAudioSource source in VOSources)
{
source.InterruptAudio("GlobalInterrupt");
}
}
}

View File

@@ -8,8 +8,8 @@ using UnityEngine.Audio;
public class BushAudioController : MonoBehaviour
{
private IAudioEventSource _eventSource;
public AudioSource VOPlayer;
public AudioSource SFXPlayer;
public AppleAudioSource VOPlayer;
public AppleAudioSource SFXPlayer;
public AudioResource reactionClipToPlay;
public AudioResource flashSFXClipToPlay;
@@ -22,29 +22,30 @@ public class BushAudioController : MonoBehaviour
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
_eventSource = VOPlayer.RequestEventHandlers();
_eventSource = VOPlayer.audioSource.RequestEventHandlers();
_eventSource.AudioStopped += PlayBirdCounter;
}
public void PlayPhotoSoundBite()
{
VOPlayer.resource = reactionClipToPlay;
VOPlayer.Play();
VOPlayer.audioSource.resource = reactionClipToPlay;
VOPlayer.Play(1);
}
public void PlayFlashSound()
{
SFXPlayer.resource = flashSFXClipToPlay;
SFXPlayer.Play();
SFXPlayer.audioSource.resource = flashSFXClipToPlay;
SFXPlayer.Play(0);
}
private void PlayBirdCounter(object sender, EventArgs e)
{
VOPlayer.resource = birdCounterClip[birdGameStats.birdsFoundInLevel];
VOPlayer.Play();
birdGameStats.BirdFound();
_eventSource.AudioStopped -= PlayBirdCounter;
VOPlayer.audioSource.resource = birdCounterClip[birdGameStats.birdsFoundInLevel];
VOPlayer.Play(0);
birdGameStats.BirdFound();
}
public void OnDisable()

View File

@@ -7,8 +7,9 @@ using UnityEngine.Audio;
public class GardenerAudioController : MonoBehaviour
{
public AudioSource gardenerAudioPlayer;
public AudioSource mowerAudioPlayer;
public AppleAudioSource gardenerIdleAudioPlayer;
public AppleAudioSource gardenerRunningAudioPlayer;
public AppleAudioSource mowerAudioPlayer;
public AudioResource mowerStartAudio;
public AudioResource mowerLoopAudio;
public AudioResource gardenerFleeAudioClip;
@@ -23,15 +24,11 @@ public class GardenerAudioController : MonoBehaviour
{
}
void GardenerIsOnScreen()
{
Debug.Log("Gardener spotted!");
}
public void StartMowerSound()
{
mowerAudioPlayer.Play();
_eventSource = mowerAudioPlayer.RequestEventHandlers();
mowerAudioPlayer.Play(0);
_eventSource = mowerAudioPlayer.audioSource.RequestEventHandlers();
_eventSource.AudioStopped += PlayMowerLoop;
}
@@ -39,22 +36,22 @@ public class GardenerAudioController : MonoBehaviour
private void PlayMowerLoop(object sender, EventArgs e)
{
_eventSource.AudioStopped -= PlayMowerLoop;
mowerAudioPlayer.resource = mowerLoopAudio;
mowerAudioPlayer.loop = true;
mowerAudioPlayer.Play();
mowerAudioPlayer.audioSource.resource = mowerLoopAudio;
mowerAudioPlayer.audioSource.loop = true;
mowerAudioPlayer.Play(0);
}
public void PlayGardenerVOClip(bool fleeing)
{
if (gardenerAudioPlayer.isPlaying) { return; }
if (gardenerRunningAudioPlayer.audioSource.isPlaying) { return; }
if (fleeing) {
gardenerAudioPlayer.resource = gardenerFleeAudioClip;
gardenerAudioPlayer.Play();
gardenerRunningAudioPlayer.audioSource.resource = gardenerFleeAudioClip;
gardenerRunningAudioPlayer.Play(1);
}
if (!fleeing)
{
gardenerAudioPlayer.resource = gardenerChaseAudioClip;
gardenerAudioPlayer.Play();
gardenerRunningAudioPlayer.audioSource.resource = gardenerChaseAudioClip;
gardenerRunningAudioPlayer.Play(1);
}

View File

@@ -0,0 +1,22 @@
using UnityEngine;
using UnityEngine.Audio;
using System;
public class LevelAudioObject : MonoBehaviour
{
public AppleAudioSource narratorAudioSource;
public AudioResource firstNarration;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
PlayNarrationAudio();
}
void PlayNarrationAudio()
{
narratorAudioSource.audioSource.resource = firstNarration;
narratorAudioSource.Play(0);
}
}

View File

@@ -1,31 +0,0 @@
using UnityEngine;
using UnityEngine.Audio;
using System;
using UnityEngine.Events;
public class NarratorVO : MonoBehaviour
{
public AudioSource narratorAudioSource;
public AudioResource firstNarration;
public UnityEvent narrationFinished;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
PlayNarrationAudio();
}
void PlayNarrationAudio()
{
narratorAudioSource.resource = firstNarration;
narratorAudioSource.Play();
}
private void NarrationFinished(object sender, EventArgs e)
{
narrationFinished.Invoke();
}
}

View File

@@ -9,7 +9,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1817619063130555080}
- component: {fileID: 2652043308892028149}
- component: {fileID: 7011897926976640219}
- component: {fileID: 2868668640744225356}
m_Layer: 0
m_Name: LakeAmbience
m_TagString: Untagged
@@ -32,7 +33,7 @@ Transform:
m_Children: []
m_Father: {fileID: 2873907538289469479}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &2652043308892028149
--- !u!82 &7011897926976640219
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -129,6 +130,21 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &2868668640744225356
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1142003717250661430}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 242e6101be071f44fb14c3c12641c833, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::AppleAudioSource
audioSourceType: 2
audioSource: {fileID: 0}
priority: 0
--- !u!1 &5928208945904495084
GameObject:
m_ObjectHideFlags: 0
@@ -138,7 +154,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 4121215864022656322}
- component: {fileID: 4192226596753188864}
- component: {fileID: 4697053756786608239}
- component: {fileID: 3633366175640516686}
m_Layer: 0
m_Name: AmbiencePlayer
m_TagString: Untagged
@@ -161,7 +178,7 @@ Transform:
m_Children: []
m_Father: {fileID: 2873907538289469479}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &4192226596753188864
--- !u!82 &4697053756786608239
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -258,6 +275,21 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &3633366175640516686
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5928208945904495084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 242e6101be071f44fb14c3c12641c833, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::AppleAudioSource
audioSourceType: 2
audioSource: {fileID: 0}
priority: 0
--- !u!1 &6199677512542707633
GameObject:
m_ObjectHideFlags: 0
@@ -268,7 +300,6 @@ GameObject:
m_Component:
- component: {fileID: 2873907538289469479}
- component: {fileID: 8545106365577783398}
- component: {fileID: 7585931024614860467}
m_Layer: 0
m_Name: QuarryAudio
m_TagString: Untagged
@@ -306,24 +337,57 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: cb5c6632b7606ce43a0b2dbf11215dc8, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
narratorAudioSource: {fileID: 9091997474527205907}
narratorAudioSource: {fileID: 4188190597242138317}
firstNarration: {fileID: 8300000, guid: d0a13dd948bacda48be267eec3e0b080, type: 3}
narrationFinished:
m_PersistentCalls:
m_Calls: []
--- !u!82 &7585931024614860467
--- !u!1 &6350035581257276269
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2279651898552875333}
- component: {fileID: 7536581660526894160}
- component: {fileID: 4188190597242138317}
m_Layer: 0
m_Name: Narrator1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2279651898552875333
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6350035581257276269}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -21.218311, y: -13.261439, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2873907538289469479}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &7536581660526894160
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6199677512542707633}
m_GameObject: {fileID: 6350035581257276269}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
OutputAudioMixerGroup: {fileID: -281949353495416486, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
@@ -408,132 +472,18 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &6350035581257276269
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2279651898552875333}
- component: {fileID: 9091997474527205907}
m_Layer: 0
m_Name: Narrator1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2279651898552875333
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6350035581257276269}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -21.218311, y: -13.261439, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2873907538289469479}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &9091997474527205907
AudioSource:
--- !u!114 &4188190597242138317
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6350035581257276269}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 3533147658878909314, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 0
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
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 242e6101be071f44fb14c3c12641c833, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::AppleAudioSource
audioSourceType: 0
audioSource: {fileID: 0}
priority: 1

View File

@@ -0,0 +1,44 @@
# Apple Hills Audio Manager
This document describes the classes and functionality of the AudioManager, LevelAudioObject and AppleAudioSource classes and components.
# AudioManager
The AudioManager is loaded through the bootstrap framework and will be added to every single level and minigame automatically.
It implements our Singletong framework and you can call functionality on the manager from any script in the project using:
```
AudioManager.Instance.WhatEverFunctionYouDesire();
```
## General overview
Everything that makes a sound should add the `AppleAudioSource` component. This component automatically adds Unity's own AudioSource that handles playing audio, but wraps it in our own custom class enabling more control over the game's audio assets.
All `AppleAudioSource` assets registers themselves with the `AudioManager` Singleton class that gets loaded in all levels allowing us to control all audio sources without fiddling with every single gameobject that makes sound.
All `AppleAudioSource` assets routes their audio to the AudioMixer which allows us to change the volume on categories of sounds i.e. ambience, music, sound etc. seperately. The AudioMixer also allows us to add effects to every category of sounds seperately and has a Master bus to control the general volume of all sound effects in the game.
## AudioManager component
![The AudioManager Component.](media/audiomanager_component.png)
The AudioManager component requires only one reference to function: The AudioMixer asset that handles all audio routing and volume mixing of the project.
### AudioManager options
The AudioManager only has one available option which is how it should handle audio when the game is paused.
**No Audio** pauses all audio sources when Pause is called on the GameManager.
**Play All Audio** ignores Pause completely by using `UnscaledTime`.
**MusicOnly** is still TODO and not fully implemented, but it also sets the mixer to work on `UnscaledTime` and we just need pause all other audio sources when Pause is called on the GameManager.
### AudioMixer
![The AudioMixer asset controlling all volumes.](media/audiomixer.png)
All AppleAudioSources outputs their audio to the `AppleHillsAudioMix` asset which handles the final volume of all audio sources of the game.
This allows us to expose volume sliders to options, and to tweak the volume of each sound source seperately, add effects like limiters, compressors etc.
**Ambience** is for the atmospheric background audio. Wind in the trees, bird chirps, water burbles etc. Outputs audio to the Master channel.
**SFX** is for smacks, whooshes, and other sound effects. Outputs audio to the Master channel.
**Music** is for.. music.. Outputs audio to the Master channel.
**Voice Over** is the accumulated audio of critical voice-over and flavor VO. Outputs audio to the Master channel.
**Critical VO** is all voice-over that guides the player and is considered more important to hear than everything else in the game. Outputs audio the the Voice Over channel.
**Flavor VO** is voice-over used for jokes, screams etc. and which is considered less important to hear than critical VO. Outputs audio to the Voice Over channel.
```
Some code
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
docs/media/audiomixer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB