diff --git a/Assets/Audio/Footstep04.mp3 b/Assets/Audio/Footstep04.mp3 new file mode 100644 index 0000000..373a7a5 Binary files /dev/null and b/Assets/Audio/Footstep04.mp3 differ diff --git a/Assets/Audio/Footstep04.mp3.meta b/Assets/Audio/Footstep04.mp3.meta new file mode 100644 index 0000000..1466f56 --- /dev/null +++ b/Assets/Audio/Footstep04.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a07dd9ac7a1874e4fbf70ec1e7c49ab8 +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: diff --git a/Assets/Audio/Run01.mp3 b/Assets/Audio/Run01.mp3 new file mode 100644 index 0000000..79398e1 Binary files /dev/null and b/Assets/Audio/Run01.mp3 differ diff --git a/Assets/Audio/Run01.mp3.meta b/Assets/Audio/Run01.mp3.meta new file mode 100644 index 0000000..266dad6 --- /dev/null +++ b/Assets/Audio/Run01.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ace6f20d983bec8409e399f09ada3ade +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: diff --git a/Assets/Audio/Run02.mp3 b/Assets/Audio/Run02.mp3 new file mode 100644 index 0000000..79398e1 Binary files /dev/null and b/Assets/Audio/Run02.mp3 differ diff --git a/Assets/Audio/Run02.mp3.meta b/Assets/Audio/Run02.mp3.meta new file mode 100644 index 0000000..d862544 --- /dev/null +++ b/Assets/Audio/Run02.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 72e9aced55d056d4a83fde7caa330038 +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: diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index 72a347b..e57a126 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -139,7 +139,37 @@ MonoBehaviour: - name: MainTheme clip: {fileID: 8300000, guid: 23f58ffff5e98424b82e0a34bfeb8a77, type: 3} volume: 0.49 - pitch: 2.19 + pitch: 0 + loop: 1 + source: {fileID: 0} + - name: Lose + clip: {fileID: 8300000, guid: 5e46f3118010926438116b8116aa135f, type: 3} + volume: 1 + pitch: 0 + loop: 0 + source: {fileID: 0} + - name: Pickup + clip: {fileID: 8300000, guid: 8dde256f26d302448a0864b01ed338e1, type: 3} + volume: 1 + pitch: 0 + loop: 0 + source: {fileID: 0} + - name: Jump + clip: {fileID: 8300000, guid: 2a79e7c44a88012449116094f3db3529, type: 3} + volume: 1 + pitch: 0 + loop: 0 + source: {fileID: 0} + - name: Run + clip: {fileID: 8300000, guid: ace6f20d983bec8409e399f09ada3ade, type: 3} + volume: 1 + pitch: 0 + loop: 0 + source: {fileID: 0} + - name: Walk + clip: {fileID: 8300000, guid: a07dd9ac7a1874e4fbf70ec1e7c49ab8, type: 3} + volume: 1 + pitch: 0 loop: 0 source: {fileID: 0} --- !u!1 &7094923890942819438 diff --git a/Assets/Scripts/AudioManager.cs b/Assets/Scripts/AudioManager.cs index 98d982b..067a47e 100644 --- a/Assets/Scripts/AudioManager.cs +++ b/Assets/Scripts/AudioManager.cs @@ -28,6 +28,7 @@ public class AudioManager : MonoBehaviour if (s == null) { return; } + Debug.Log("Sound is playng"); s.source.Play(); } } diff --git a/Assets/Scripts/PlayerManager.cs b/Assets/Scripts/PlayerManager.cs index b1d3706..52ac8e9 100644 --- a/Assets/Scripts/PlayerManager.cs +++ b/Assets/Scripts/PlayerManager.cs @@ -73,6 +73,7 @@ public class PlayerManager : MonoBehaviour { cannotMove = true; playerAnimator.Play("Die"); + FindObjectOfType().Play("lose"); } if (interact) { @@ -85,6 +86,7 @@ public class PlayerManager : MonoBehaviour )) { if (Input.GetKeyUp(KeyCode.E)) { + FindObjectOfType().Play("Pickup"); playerAnimator.SetTrigger("Eat"); interact = false; } @@ -117,6 +119,7 @@ public class PlayerManager : MonoBehaviour if (!cannotMove && !onLadder) { Jump(); + FindObjectOfType().Play("Jump"); } } @@ -227,6 +230,7 @@ public class PlayerManager : MonoBehaviour if (Input.GetAxisRaw("Run") > 0) { run = true; + } else { @@ -363,6 +367,7 @@ public class PlayerManager : MonoBehaviour speed += power; runSpeed += power; + FindObjectOfType().Play("Jump"); } else if (powerType == PowerCubeManager.PowerType.Jumper) {