From 40f280ea3ea09ea0e3f77100d41bce97050c8b46 Mon Sep 17 00:00:00 2001 From: jparent Date: Sun, 31 Jan 2016 14:45:13 -0500 Subject: [PATCH] add horn sound on match start --- Assets/prefabs/SoundManager.prefab | 80 +++++++++++++++++++++++++++++- Assets/scripts/LevelManager.cs | 3 ++ Assets/scripts/SoundManager.cs | 6 +++ 3 files changed, 87 insertions(+), 2 deletions(-) diff --git a/Assets/prefabs/SoundManager.prefab b/Assets/prefabs/SoundManager.prefab index a609834..0e9777c 100644 --- a/Assets/prefabs/SoundManager.prefab +++ b/Assets/prefabs/SoundManager.prefab @@ -11,6 +11,7 @@ GameObject: - 114: {fileID: 11481872} - 82: {fileID: 8254278} - 82: {fileID: 8250766} + - 82: {fileID: 8206014} m_Layer: 0 m_Name: SoundManager m_TagString: Untagged @@ -30,6 +31,80 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 +--- !u!82 &8206014 +AudioSource: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 112570} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 42ca4bd826baa2945a1896e2bbad1d37, type: 3} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + Priority: 0 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 --- !u!82 &8250766 AudioSource: m_ObjectHideFlags: 1 @@ -41,10 +116,10 @@ AudioSource: OutputAudioMixerGroup: {fileID: 24300001, guid: 4dfc40942aa25594b8af2511c1814e5c, type: 2} m_audioClip: {fileID: 8300000, guid: ab3b851bbb749cf4984c1aea0241f278, type: 3} - m_PlayOnAwake: 1 + m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 0.52 - Loop: 1 + Loop: 0 Mute: 0 Spatialize: 0 Priority: 0 @@ -194,6 +269,7 @@ MonoBehaviour: Gameplay: {fileID: 0} Scrapping: {fileID: 8254278} RunePickup: {fileID: 8250766} + ShortHorn: {fileID: 8206014} --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 diff --git a/Assets/scripts/LevelManager.cs b/Assets/scripts/LevelManager.cs index d4395a7..bfd1237 100644 --- a/Assets/scripts/LevelManager.cs +++ b/Assets/scripts/LevelManager.cs @@ -76,6 +76,9 @@ public class LevelManager : MonoBehaviour { Selector = GameObject.FindObjectOfType(); PhysicsContainer = GameObject.Find("PhysicsContainer"); + + //play start sound + SoundManager.Instance.PlayShortHorn(); } public void PressTile(int letterNum, RuneBehaviour tile) diff --git a/Assets/scripts/SoundManager.cs b/Assets/scripts/SoundManager.cs index 27e6986..7d158dd 100644 --- a/Assets/scripts/SoundManager.cs +++ b/Assets/scripts/SoundManager.cs @@ -7,6 +7,7 @@ public class SoundManager : MonoBehaviour public AudioSource Gameplay; public AudioSource Scrapping; public AudioSource RunePickup; + public AudioSource ShortHorn; public static SoundManager Instance { @@ -78,4 +79,9 @@ public class SoundManager : MonoBehaviour RunePickup.Play(); } + public void PlayShortHorn() + { + ShortHorn.Play(); + } + }