Sound stuffs bitches
This commit is contained in:
parent
2988856d38
commit
2db1e474ec
9
Assets/Sounds.meta
Normal file
9
Assets/Sounds.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a1fddcb1f592f24681f0652123f44ab
|
||||
folderAsset: yes
|
||||
timeCreated: 1454198769
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
37
Assets/Sounds/BackgroundMusic.cs
Normal file
37
Assets/Sounds/BackgroundMusic.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class BackgroundMusic : MonoBehaviour {
|
||||
public AudioClip[] mClips;
|
||||
int currSong;
|
||||
int nextSong;
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
currSong = 0;
|
||||
GetComponent<AudioSource> ().clip = mClips [currSong];
|
||||
GetComponent<AudioSource> ().Play ();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
AudioSource audio = GetComponent<AudioSource> ();
|
||||
if (Input.GetKeyDown (KeyCode.Minus)) {
|
||||
audio.Stop ();
|
||||
nextSong = -1;
|
||||
}
|
||||
if (Input.GetKeyDown (KeyCode.Equals)) {
|
||||
audio.Stop ();
|
||||
nextSong = 1;
|
||||
}
|
||||
if (!audio.isPlaying) {
|
||||
currSong += nextSong;
|
||||
if (currSong == mClips.Length - 1)
|
||||
currSong = 0;
|
||||
if (currSong < 0)
|
||||
currSong = mClips.Length - 1;
|
||||
audio.clip = mClips [currSong];
|
||||
audio.Play ();
|
||||
}
|
||||
}
|
||||
}
|
12
Assets/Sounds/BackgroundMusic.cs.meta
Normal file
12
Assets/Sounds/BackgroundMusic.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d06988e0a5c83b04099f727bb4bc655c
|
||||
timeCreated: 1454208549
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/BackgroundMusic.prefab
Normal file
BIN
Assets/Sounds/BackgroundMusic.prefab
Normal file
Binary file not shown.
8
Assets/Sounds/BackgroundMusic.prefab.meta
Normal file
8
Assets/Sounds/BackgroundMusic.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3cf1967180430cb4fbf45d0ad0efaea6
|
||||
timeCreated: 1454208513
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/ESPARK1.mp3
Normal file
BIN
Assets/Sounds/ESPARK1.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/ESPARK1.mp3.meta
Normal file
22
Assets/Sounds/ESPARK1.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29d824f2d96a75c4db12e04095b1dace
|
||||
timeCreated: 1454209490
|
||||
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:
|
BIN
Assets/Sounds/New Prefab.prefab
Normal file
BIN
Assets/Sounds/New Prefab.prefab
Normal file
Binary file not shown.
8
Assets/Sounds/New Prefab.prefab.meta
Normal file
8
Assets/Sounds/New Prefab.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29031dbf93e7d904c80614eeca3b24d8
|
||||
timeCreated: 1454201048
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/NewAudioMixer.mixer
Normal file
BIN
Assets/Sounds/NewAudioMixer.mixer
Normal file
Binary file not shown.
8
Assets/Sounds/NewAudioMixer.mixer.meta
Normal file
8
Assets/Sounds/NewAudioMixer.mixer.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 217dc611389075a4e8c3e1aead8871e9
|
||||
timeCreated: 1454198781
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/activity.mp3
Normal file
BIN
Assets/Sounds/activity.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/activity.mp3.meta
Normal file
22
Assets/Sounds/activity.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae102d0e06987c3408292fd7eaac7018
|
||||
timeCreated: 1454209521
|
||||
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:
|
BIN
Assets/Sounds/brain hacker.mp3
Normal file
BIN
Assets/Sounds/brain hacker.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/brain hacker.mp3.meta
Normal file
22
Assets/Sounds/brain hacker.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 901b233f07e78f74fb2a0f8744c0b7a8
|
||||
timeCreated: 1454209502
|
||||
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:
|
BIN
Assets/Sounds/earcing.mp3
Normal file
BIN
Assets/Sounds/earcing.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/earcing.mp3.meta
Normal file
22
Assets/Sounds/earcing.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4838efc262cb6484e9b98fc5b63c7d24
|
||||
timeCreated: 1454199153
|
||||
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: 1
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/electricguitar.mp3
Normal file
BIN
Assets/Sounds/electricguitar.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/electricguitar.mp3.meta
Normal file
22
Assets/Sounds/electricguitar.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 484722fafeeaee84c881efed180b7266
|
||||
timeCreated: 1454209490
|
||||
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:
|
BIN
Assets/Sounds/electricshock.mp3
Normal file
BIN
Assets/Sounds/electricshock.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/electricshock.mp3.meta
Normal file
22
Assets/Sounds/electricshock.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d9d19d95a8b92742b5abab2b6713f11
|
||||
timeCreated: 1454209496
|
||||
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:
|
BIN
Assets/Sounds/evil my friend.mp3
Normal file
BIN
Assets/Sounds/evil my friend.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/evil my friend.mp3.meta
Normal file
22
Assets/Sounds/evil my friend.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa359037b64e72949af464aaacbbefa3
|
||||
timeCreated: 1454209514
|
||||
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:
|
BIN
Assets/Sounds/memorization.mp3
Normal file
BIN
Assets/Sounds/memorization.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/memorization.mp3.meta
Normal file
22
Assets/Sounds/memorization.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53d1bc705d795f046b348a2ab69fe3bc
|
||||
timeCreated: 1454209496
|
||||
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:
|
19
Assets/Sounds/soundTest.cs
Normal file
19
Assets/Sounds/soundTest.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class soundTest : MonoBehaviour {
|
||||
public AudioClip mClip;
|
||||
int playing = 0;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
if ((GameObject.Find ("Player").transform.position - transform.position).magnitude < 1.0) {
|
||||
AudioSource.PlayClipAtPoint (mClip, transform.position, 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
12
Assets/Sounds/soundTest.cs.meta
Normal file
12
Assets/Sounds/soundTest.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cdb301d991e2ec64fb4b7aaddaf89f3f
|
||||
timeCreated: 1454199574
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/unborn.mp3
Normal file
BIN
Assets/Sounds/unborn.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/unborn.mp3.meta
Normal file
22
Assets/Sounds/unborn.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0202d5f4375c1c24d8369a29dc7521ea
|
||||
timeCreated: 1454209489
|
||||
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:
|
Reference in New Issue
Block a user