From 6832045bd9d277273f5c97ecd29b265a76aa181c Mon Sep 17 00:00:00 2001 From: Steven Leal Date: Thu, 30 Nov 2017 14:27:16 -0600 Subject: [PATCH] added mission complete sound and spyCaught sound --- .../Assets/Scenes/GameScene.unity | 154 +++++++++++++++++- .../Assets/Scripts/MissionTracker.cs | 8 + 2 files changed, 156 insertions(+), 6 deletions(-) diff --git a/Project Undercover/Assets/Scenes/GameScene.unity b/Project Undercover/Assets/Scenes/GameScene.unity index 438b5fa..78bc0e4 100755 --- a/Project Undercover/Assets/Scenes/GameScene.unity +++ b/Project Undercover/Assets/Scenes/GameScene.unity @@ -264,7 +264,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 24 + m_RootOrder: 23 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &72674721 GameObject: @@ -2261,12 +2261,12 @@ Transform: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 318845411} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 14.8796015, y: -0.6699748, z: -0.386904} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 23 + m_Father: {fileID: 1505667460} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &324022483 GameObject: @@ -2971,7 +2971,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 25 + m_RootOrder: 24 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &653680998 MonoBehaviour: @@ -2987,6 +2987,9 @@ MonoBehaviour: spyMissionLogText: {fileID: 2018902401} guardNotificationPanel: {fileID: 1213473208} guardNotificationText: {fileID: 658035871} + audioSource: {fileID: 1726009263} + missionCompleteClip: {fileID: 8300000, guid: 8e07bcd757ad02c4691f56c303777248, type: 3} + caughtSpy: {fileID: 8300000, guid: 345aa076c0a01a34ea7427d7cd9c6013, type: 3} --- !u!114 &653680999 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6939,6 +6942,36 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1500738973} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1505667459 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1505667460} + m_Layer: 0 + m_Name: Audio + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1505667460 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1505667459} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -14.8796015, y: 0.6699748, z: 0.386904} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 318845413} + - {fileID: 1726009262} + m_Father: {fileID: 0} + m_RootOrder: 25 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1528851507 GameObject: m_ObjectHideFlags: 0 @@ -7709,6 +7742,115 @@ MonoBehaviour: choicePanel: {fileID: 660853931} spyButton: {fileID: 1924847321} npcButton: {fileID: 1470653501} +--- !u!1 &1726009261 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1726009262} + - component: {fileID: 1726009263} + m_Layer: 0 + m_Name: SoundEffects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1726009262 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1726009261} + 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: 1505667460} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &1726009263 +AudioSource: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1726009261} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 8e07bcd757ad02c4691f56c303777248, 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: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 --- !u!1 &1726737895 GameObject: m_ObjectHideFlags: 0 diff --git a/Project Undercover/Assets/Scripts/MissionTracker.cs b/Project Undercover/Assets/Scripts/MissionTracker.cs index 237cf8a..240d951 100755 --- a/Project Undercover/Assets/Scripts/MissionTracker.cs +++ b/Project Undercover/Assets/Scripts/MissionTracker.cs @@ -42,6 +42,10 @@ public class MissionTracker : Photon.PunBehaviour private int mGuardPoints; private int mGuardIncorrectGuesses; + public AudioSource audioSource; + public AudioClip missionCompleteClip; + public AudioClip caughtSpy; + private class Mission { private string mAlertText; // text shown to overseers after mission completes @@ -248,6 +252,8 @@ public class MissionTracker : Photon.PunBehaviour { if (mCompletedMissions + mGuardIncorrectGuesses >= mMissionLog.Count) return; + audioSource.clip = missionCompleteClip; + audioSource.Play(); Mission m = mMissionLog[interactionName]; m.Completed = true; @@ -265,6 +271,8 @@ public class MissionTracker : Photon.PunBehaviour { if (mGuardPoints >= mMissionLog.Count) return; + audioSource.clip = caughtSpy; + audioSource.Play(); mGuardPoints++; ScorePanelController.Singleton.UpdateGuardScore((float) mGuardPoints / MAX_GUARD_POINTS);