This commit is contained in:
GamerClassN7 2021-01-31 14:22:06 +01:00
parent 8119ff8620
commit dc894c90b9
9 changed files with 103 additions and 1 deletions

BIN
Assets/Audio/Footstep04.mp3 Normal file

Binary file not shown.

View File

@ -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:

BIN
Assets/Audio/Run01.mp3 Normal file

Binary file not shown.

View File

@ -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:

BIN
Assets/Audio/Run02.mp3 Normal file

Binary file not shown.

View File

@ -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:

View File

@ -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

View File

@ -28,6 +28,7 @@ public class AudioManager : MonoBehaviour
if (s == null) {
return;
}
Debug.Log("Sound is playng");
s.source.Play();
}
}

View File

@ -73,6 +73,7 @@ public class PlayerManager : MonoBehaviour
{
cannotMove = true;
playerAnimator.Play("Die");
FindObjectOfType<AudioManager>().Play("lose");
}
if (interact)
{
@ -85,6 +86,7 @@ public class PlayerManager : MonoBehaviour
)) {
if (Input.GetKeyUp(KeyCode.E))
{
FindObjectOfType<AudioManager>().Play("Pickup");
playerAnimator.SetTrigger("Eat");
interact = false;
}
@ -117,6 +119,7 @@ public class PlayerManager : MonoBehaviour
if (!cannotMove && !onLadder)
{
Jump();
FindObjectOfType<AudioManager>().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<AudioManager>().Play("Jump");
}
else if (powerType == PowerCubeManager.PowerType.Jumper)
{