Add Audio
Added Audio and created script
This commit is contained in:
parent
4b374c6805
commit
e5bb973b2e
8
Assets/Audio.meta
Normal file
8
Assets/Audio.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 999daa338112b454398d2351fbb79852
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Audio/BoxDrop01.wav
Normal file
BIN
Assets/Audio/BoxDrop01.wav
Normal file
Binary file not shown.
22
Assets/Audio/BoxDrop01.wav.meta
Normal file
22
Assets/Audio/BoxDrop01.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 293c8ac0451b26043b4d483bed786fa3
|
||||
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/BoxDrop02.wav
Normal file
BIN
Assets/Audio/BoxDrop02.wav
Normal file
Binary file not shown.
22
Assets/Audio/BoxDrop02.wav.meta
Normal file
22
Assets/Audio/BoxDrop02.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a88fba221ea7e44783c4e5e0a1e8817
|
||||
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/George Jones Theme.wav
Normal file
BIN
Assets/Audio/George Jones Theme.wav
Normal file
Binary file not shown.
22
Assets/Audio/George Jones Theme.wav.meta
Normal file
22
Assets/Audio/George Jones Theme.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23f58ffff5e98424b82e0a34bfeb8a77
|
||||
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/ItemDrop01.wav
Normal file
BIN
Assets/Audio/ItemDrop01.wav
Normal file
Binary file not shown.
22
Assets/Audio/ItemDrop01.wav.meta
Normal file
22
Assets/Audio/ItemDrop01.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 257c349682313bf41911b67bfc3087df
|
||||
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/ItemDrop02.wav
Normal file
BIN
Assets/Audio/ItemDrop02.wav
Normal file
Binary file not shown.
22
Assets/Audio/ItemDrop02.wav.meta
Normal file
22
Assets/Audio/ItemDrop02.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 471829b70bc91324b873f3b1ee9d84fd
|
||||
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/ItemPickup01.wav
Normal file
BIN
Assets/Audio/ItemPickup01.wav
Normal file
Binary file not shown.
22
Assets/Audio/ItemPickup01.wav.meta
Normal file
22
Assets/Audio/ItemPickup01.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8dde256f26d302448a0864b01ed338e1
|
||||
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/ItemPickup02.wav
Normal file
BIN
Assets/Audio/ItemPickup02.wav
Normal file
Binary file not shown.
22
Assets/Audio/ItemPickup02.wav.meta
Normal file
22
Assets/Audio/ItemPickup02.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf0db54ea7fce1744beb947e4f68776f
|
||||
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/Jump01.wav
Normal file
BIN
Assets/Audio/Jump01.wav
Normal file
Binary file not shown.
22
Assets/Audio/Jump01.wav.meta
Normal file
22
Assets/Audio/Jump01.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f599fbf58d27644da4bb34e041e15e5
|
||||
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/Jump02.wav
Normal file
BIN
Assets/Audio/Jump02.wav
Normal file
Binary file not shown.
22
Assets/Audio/Jump02.wav.meta
Normal file
22
Assets/Audio/Jump02.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a79e7c44a88012449116094f3db3529
|
||||
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/Jump03.wav
Normal file
BIN
Assets/Audio/Jump03.wav
Normal file
Binary file not shown.
22
Assets/Audio/Jump03.wav.meta
Normal file
22
Assets/Audio/Jump03.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebff1b1b6619bdf48a334db25b73db57
|
||||
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/Lose.wav
Normal file
BIN
Assets/Audio/Lose.wav
Normal file
Binary file not shown.
22
Assets/Audio/Lose.wav.meta
Normal file
22
Assets/Audio/Lose.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e46f3118010926438116b8116aa135f
|
||||
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/Push01.wav
Normal file
BIN
Assets/Audio/Push01.wav
Normal file
Binary file not shown.
22
Assets/Audio/Push01.wav.meta
Normal file
22
Assets/Audio/Push01.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e97d1a43634eb5f43882eab4e5e3348d
|
||||
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:
|
62
Assets/Audio/SoundManagerScript.cs
Normal file
62
Assets/Audio/SoundManagerScript.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SoundManagerScript : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
public static AudioClip BoxDrop01, BoxDrop02, ItemDrop01, ItemDrop02, ItemPickup01, ItemPickup02, Jump01, Jump02, Jump03, Lose, Push01, Theme, Win;
|
||||
static AudioSource audioSrc;
|
||||
|
||||
ThemeSong = Audio.load<AudioClip>("Theme")
|
||||
BoxDrop01Sound = Audio.load<AudioClip>("BoxDrop01")
|
||||
BoxDrop02Sound = Audio.load<AudioClip>("BoxDrop02")
|
||||
ItemDrop01Sound = Audio.load<AudioClip>("ItemDrop01")
|
||||
ItemDrop02Sound = Audio.load<AudioClip>("ItemDrop02")
|
||||
ItemPickup01Sound = Audio.load<AudioClip>("ItemPickup01")
|
||||
ItemPickup02Sound = Audio.load<AudioClip>("ItemPickup02")
|
||||
Jump01Sound = Audio.load<AudioClip>("Jump01")
|
||||
Jump02Sound = Audio.load<AudioClip>("Jump02")
|
||||
Jump03Sound = Audio.load<AudioClip>("Jump03")
|
||||
LoseSound = Audio.load<AudioClip>("Lose")
|
||||
Push01Sound = Audio.load<AudioClip>("Push01")
|
||||
WinSound = Audio.load<AudioClip>("Win")
|
||||
|
||||
audiosrc = GetComponent<audiosource>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
public static void PlaySound(string clip)
|
||||
{
|
||||
switch (clip)
|
||||
{
|
||||
case "BoxDrop":
|
||||
audioSrc.PlayOneShot(Dropbox01 || Dropbox02 || Dropbox03);
|
||||
break;
|
||||
case "ItemDrop":
|
||||
audioSrc.PlayOneShot(ItemDrop01 || ItemDrop02);
|
||||
break;
|
||||
case "ItemPickup":
|
||||
audioSrc.PlayOneShot(ItemPickup01 || ItemPickup02);
|
||||
break;
|
||||
case "ItemDrop01":
|
||||
audioSrc.PlayOneShot(ItemDrop01 || ItemDrop02);
|
||||
break;
|
||||
case "Jump":
|
||||
audioSrc.PlayOneShot(Jump01 || Jump02);
|
||||
break;
|
||||
case "Lose":
|
||||
audioSrc.PlayOneShot(Lose);
|
||||
break;
|
||||
case "win":
|
||||
audioSrc.PlayOneShot(Win);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
11
Assets/Audio/SoundManagerScript.cs.meta
Normal file
11
Assets/Audio/SoundManagerScript.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 359232fb046cb2d46bfa9649f443d567
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Audio/Win.wav
Normal file
BIN
Assets/Audio/Win.wav
Normal file
Binary file not shown.
22
Assets/Audio/Win.wav.meta
Normal file
22
Assets/Audio/Win.wav.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c29860436d5147346b6e77bc7a49c405
|
||||
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:
|
Loading…
Reference in New Issue
Block a user