diff --git a/Assets/Prefabs/bomb.prefab b/Assets/Prefabs/bomb.prefab index b2602b5..472e392 100644 --- a/Assets/Prefabs/bomb.prefab +++ b/Assets/Prefabs/bomb.prefab @@ -74,6 +74,7 @@ MonoBehaviour: bombRadius: .5 fuseTime: 1.5 explosion: {fileID: 100000, guid: 340a9e7d5164c9c4fba1dc34dc50b866, type: 2} + explode: {fileID: 8300000, guid: dab22f74a5dfe954d8917770deaee808, type: 3} --- !u!212 &21297412 SpriteRenderer: m_ObjectHideFlags: 1 @@ -123,6 +124,22 @@ Prefab: propertyPath: bombRadius value: .5 objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_audioClip + value: + objectReference: {fileID: 8300000, guid: dab22f74a5dfe954d8917770deaee808, type: 3} + - target: {fileID: 0} + propertyPath: BypassReverbZones + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_PlayOnAwake + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: explode + value: + objectReference: {fileID: 8300000, guid: dab22f74a5dfe954d8917770deaee808, type: 3} m_RemovedComponents: [] m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 172872} diff --git a/Assets/Scenes/MasterScene.unity b/Assets/Scenes/MasterScene.unity index 4a4193b..580f9e1 100644 --- a/Assets/Scenes/MasterScene.unity +++ b/Assets/Scenes/MasterScene.unity @@ -924,6 +924,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: audioPickup: {fileID: 8300000, guid: a48a7087d05490f4b913e6cd1d177494, type: 3} + health: {fileID: 1113329686} --- !u!61 &1736051096 BoxCollider2D: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Bomb.cs b/Assets/Scripts/Bomb.cs index d87c65f..7859734 100644 --- a/Assets/Scripts/Bomb.cs +++ b/Assets/Scripts/Bomb.cs @@ -10,7 +10,7 @@ public class Bomb : MonoBehaviour private LayBombs layBombs; // Reference to the player's LayBombs script. - + public AudioClip explode; void Awake () @@ -40,7 +40,9 @@ public class Bomb : MonoBehaviour public void Explode() { - + + AudioSource.PlayClipAtPoint(explode, transform.position); + // The player is now free to lay bombs when he has them. layBombs.bombLaid = false; diff --git a/Assets/Sound/Explode.wav b/Assets/Sound/Explode.wav new file mode 100644 index 0000000..2fb054e Binary files /dev/null and b/Assets/Sound/Explode.wav differ diff --git a/Assets/Sound/Explode.wav.meta b/Assets/Sound/Explode.wav.meta new file mode 100644 index 0000000..24c4d72 --- /dev/null +++ b/Assets/Sound/Explode.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dab22f74a5dfe954d8917770deaee808 +timeCreated: 1449022293 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index e040c5c..8a062e6 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 5.2.0f3 +m_EditorVersion: 5.2.1f1 m_StandardAssetsVersion: 0