So much audio stuff holy shit
This commit is contained in:
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88be08429a0d9ce47be6aa3f26cb9049
|
||||
guid: 25727fca96ddc4a4b9853bdda9a8898d
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41d492691ac4344449aa9ff5c17748f6
|
||||
guid: 408939c214df68749bb7a080dae3dbb2
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6793f14304f8801499a088954e74a608
|
||||
guid: b1144df3b7ca8db4c98d19f3ccf1b58e
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b883e0424317ff643bcfe072a31906a3
|
||||
guid: ce545721254386b41b29192d867663a2
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 799d65ff7527e3e489d249dd08a956c1
|
||||
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:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34a994bf36ad1f34796bc95e5e53cbdb
|
||||
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:
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e835f2d7ebb56849815ae28219a6865
|
||||
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:
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e63ac9ec26a9296418d433db868e65f7
|
||||
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:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92c47cfaea6d1a7459d82ceae05b67bb
|
||||
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:
|
||||
Binary file not shown.
@@ -1,22 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1528f757c7a9c6f4aac1fb1f6d029790
|
||||
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:
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f00c9f1fcd1ccea45865ac86ba52a0b1
|
||||
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:
|
||||
Binary file not shown.
@@ -1,22 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2710774aabc5664e8fa288d8e1519ea
|
||||
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:
|
||||
@@ -143,3 +143,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a30097626420c2945aa94dc3cee845d7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
hit:
|
||||
- {fileID: 8300000, guid: 408939c214df68749bb7a080dae3dbb2, type: 3}
|
||||
- {fileID: 8300000, guid: b1144df3b7ca8db4c98d19f3ccf1b58e, type: 3}
|
||||
|
||||
+106
-1
@@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 3604935524688938201}
|
||||
- component: {fileID: 6741981845749859313}
|
||||
- component: {fileID: 8332197680746461102}
|
||||
- component: {fileID: 6716227068369250423}
|
||||
- component: {fileID: 917023915065383399}
|
||||
m_Layer: 0
|
||||
m_Name: Enemy
|
||||
@@ -131,6 +132,102 @@ BoxCollider2D:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1.28, y: 1.28}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!82 &6716227068369250423
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3604935524688938200}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &917023915065383399
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -143,4 +240,12 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 8fbb02e1dc3bc974aa589a68804bca34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
speed: 2
|
||||
spawnSounds:
|
||||
- {fileID: 8300000, guid: 799d65ff7527e3e489d249dd08a956c1, type: 3}
|
||||
- {fileID: 8300000, guid: 34a994bf36ad1f34796bc95e5e53cbdb, type: 3}
|
||||
- {fileID: 8300000, guid: 4e835f2d7ebb56849815ae28219a6865, type: 3}
|
||||
- {fileID: 8300000, guid: e63ac9ec26a9296418d433db868e65f7, type: 3}
|
||||
defeatSounds:
|
||||
- {fileID: 8300000, guid: a893ab6c293735e41aca1983292a129a, type: 3}
|
||||
- {fileID: 8300000, guid: 92c47cfaea6d1a7459d82ceae05b67bb, type: 3}
|
||||
- {fileID: 8300000, guid: f00c9f1fcd1ccea45865ac86ba52a0b1, type: 3}
|
||||
|
||||
@@ -1822,16 +1822,16 @@ MonoBehaviour:
|
||||
- {fileID: 8300000, guid: 2961feedab8e5c343a61790bad7949b1, type: 3}
|
||||
- {fileID: 8300000, guid: 04e710af10e4bd94e8eb289b690cd004, type: 3}
|
||||
- {fileID: 8300000, guid: e7f74ac85912ae74ebb6a79d65954ab7, type: 3}
|
||||
- {fileID: 8300000, guid: 718c7a969c7162c4d9a3371ed7e640e2, type: 3}
|
||||
- {fileID: 8300000, guid: 8d44d147b421b844c931f21d5778b6b6, type: 3}
|
||||
- {fileID: 8300000, guid: f53aa12ee37973f4fa6a988236dc6ea3, type: 3}
|
||||
- {fileID: 8300000, guid: 0121e097f0a483244a5d614bc592f2fb, type: 3}
|
||||
- {fileID: 8300000, guid: 5d1cd6316de7f214fa32195d9ea32411, type: 3}
|
||||
- {fileID: 8300000, guid: 0314b015087ad3246a9211160fac0f3c, type: 3}
|
||||
- {fileID: 8300000, guid: 4ecea409ff0857f4d81d5b22a7a7622e, type: 3}
|
||||
- {fileID: 8300000, guid: 6793f14304f8801499a088954e74a608, type: 3}
|
||||
- {fileID: 8300000, guid: 1528f757c7a9c6f4aac1fb1f6d029790, type: 3}
|
||||
- {fileID: 8300000, guid: 8d44d147b421b844c931f21d5778b6b6, type: 3}
|
||||
- {fileID: 8300000, guid: 4c9aa55bb1fa7f14b92c8d0b0d673ad5, type: 3}
|
||||
damage: []
|
||||
- {fileID: 8300000, guid: 4ecea409ff0857f4d81d5b22a7a7622e, type: 3}
|
||||
- {fileID: 8300000, guid: 0121e097f0a483244a5d614bc592f2fb, type: 3}
|
||||
- {fileID: 8300000, guid: 718c7a969c7162c4d9a3371ed7e640e2, type: 3}
|
||||
damage:
|
||||
- {fileID: 8300000, guid: ce545721254386b41b29192d867663a2, type: 3}
|
||||
reload: {fileID: 8300000, guid: d2710774aabc5664e8fa288d8e1519ea, type: 3}
|
||||
--- !u!50 &1990476333
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
|
||||
@@ -5,12 +5,17 @@ using UnityEngine;
|
||||
public class BulletScript : MonoBehaviour
|
||||
{
|
||||
|
||||
public AudioClip[] hit;
|
||||
|
||||
private float speed;
|
||||
private Rigidbody2D rb;
|
||||
private ShakeScript shake;
|
||||
|
||||
private AudioSource audioSource;
|
||||
|
||||
void Start()
|
||||
{
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
rb = GetComponent<Rigidbody2D>();
|
||||
speed = Random.Range(3.0f, 8.0f);
|
||||
shake = GameObject.Find("Shake Manager").GetComponent<ShakeScript>();
|
||||
@@ -29,6 +34,8 @@ public class BulletScript : MonoBehaviour
|
||||
|
||||
if(other.gameObject.tag != "Player" && other.gameObject.tag != "Bullet")
|
||||
{
|
||||
AudioSource.PlayClipAtPoint(
|
||||
hit[Random.Range(0,hit.Length)], new Vector3(0, 0, 0));
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,14 +4,21 @@ using UnityEngine;
|
||||
|
||||
public class EnemyScript : MonoBehaviour
|
||||
{
|
||||
|
||||
public AudioClip[] spawnSounds;
|
||||
public AudioClip[] defeatSounds;
|
||||
|
||||
private float speed;
|
||||
private GameObject player;
|
||||
|
||||
private AudioSource audioSource;
|
||||
|
||||
void Start()
|
||||
{
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
player = GameObject.FindWithTag("Player");
|
||||
speed = Random.Range(0.5f, 3.0f);
|
||||
audioSource.clip = spawnSounds[Random.Range(0,spawnSounds.Length)];
|
||||
audioSource.Play();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -32,11 +39,15 @@ public class EnemyScript : MonoBehaviour
|
||||
if(other.gameObject.tag == "Bullet")
|
||||
{
|
||||
PlayerPrefs.SetInt("Score", PlayerPrefs.GetInt("Score")+1);
|
||||
AudioSource.PlayClipAtPoint(
|
||||
defeatSounds[Random.Range(0,defeatSounds.Length)], new Vector3(0, 0, 0));
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
if(other.gameObject.tag == "Player")
|
||||
{
|
||||
AudioSource.PlayClipAtPoint(
|
||||
defeatSounds[Random.Range(0,defeatSounds.Length)], new Vector3(0, 0, 0));
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ public class PlayerScript : MonoBehaviour
|
||||
|
||||
if(other.gameObject.tag == "Enemy")
|
||||
{
|
||||
AudioSource.PlayClipAtPoint(
|
||||
damage[Random.Range(0,damage.Length)], new Vector3(0, 0, 0));
|
||||
|
||||
life--;
|
||||
|
||||
if(life > 0)
|
||||
|
||||
Reference in New Issue
Block a user