This commit is contained in:
haitem 2021-01-31 11:53:10 +01:00
commit 37e93d3ea9
32 changed files with 462 additions and 20 deletions

8
Assets/Audio.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 999daa338112b454398d2351fbb79852
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Audio/BoxDrop01.wav Normal file

Binary file not shown.

View 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

Binary file not shown.

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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

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

BIN
Assets/Audio/Win.wav Normal file

Binary file not shown.

22
Assets/Audio/Win.wav.meta Normal file
View 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:

View File

@ -92,6 +92,36 @@ Light:
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &3454083825413701809
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2859544536000255872}
m_Layer: 0
m_Name: AudioManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2859544536000255872
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3454083825413701809}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7094923891560833917}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7094923890942819438
GameObject:
m_ObjectHideFlags: 0
@ -269,6 +299,7 @@ Transform:
m_Children:
- {fileID: 7094923890942819435}
- {fileID: 7552584426519275258}
- {fileID: 2859544536000255872}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -342,12 +373,6 @@ MonoBehaviour:
- {fileID: 2644881069278570743, guid: 94642d7ef8c97e544af1d5ca3596a37f, type: 3}
- {fileID: 7945524436670112111, guid: 2d077f1b027540045b6833e51a067855, type: 3}
- {fileID: 7411583397803452420, guid: d42abe5652faa4543b100c9bf55091a7, type: 3}
powerIcons:
- {fileID: 21300000, guid: b486233fe80c73e41ad238593d9950d7, type: 3}
- {fileID: 21300000, guid: 39371c4e9eb74b4449614b13a886d673, type: 3}
- {fileID: 21300000, guid: 54d88af8950445844b1b95a6339ab8d1, type: 3}
- {fileID: 21300000, guid: 92bad1a4524af17479ce7b274fd4c941, type: 3}
powerImage: {fileID: 0}
dashPower: 40
dashTime: 0.3
--- !u!95 &7009705026125325791
@ -381,6 +406,102 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d6a0240c7e91f1644908b3c8bb8d9c96, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!82 &7756717506152340812
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7177606588354821184}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
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!1001 &8023887280909926673
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -2,28 +2,27 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;
using System;
public class Audiomanager : MonoBehaviour
{
public [] clips;
public AudioSound[] clips;
// Start is called before the first frame update
void Awake()
{
foreach (AudioClip c in clips)
foreach (AudioSound c in clips)
{
s.source = gameObject.AddComponent<AudionSource>();
s.source.clip = s.clip;
s.source.volume = s.volume;
s.source.pitch = s.pitch;
c.source = gameObject.AddComponent<AudioSource>();
c.source.clip = c.clip;
c.source.volume = c.volume;
c.source.pitch = c.pitch;
}
}
// Update is called once per frame
void Play(string name)
{
Sound s = Array.Find(clips, sound => sound.name == name);
s.source.Play()
AudioSound s = Array.Find(clips, sound => sound.name == name);
s.source.Play();
}
}

View File

@ -0,0 +1,17 @@
using UnityEngine;
using UnityEngine.Audio;
[System.Serializable]
public class AudioSound
{
public string name;
public AudioClip clip;
[Range(0f, 1f)]
public float volume;
[Range(.1f, 3f)]
public float pitch;
[HideInInspector]
public AudioSource source;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cd34753127bc0c44bb22ca73177fdd60
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -9,10 +9,7 @@ EditorBuildSettings:
path: Assets/Scenes/Menu/MainMenu.unity
guid: 33d54f39f74b30b4dbb8d638a1d5c9b4
- enabled: 1
path: Assets/Scenes/Testing/Filip.unity
guid: 326dea585e0ea574389529eaae8a0ab4
- enabled: 1
path: Assets/Scenes/Testing/Vasek.unity
path: Assets/Scenes/Levels/Level 1 _ vs.unity
guid: 127deaeaf7712824f83ee4cba639e023
- enabled: 1
path: Assets/Scenes/Levels/Level 2.unity
@ -20,6 +17,9 @@ EditorBuildSettings:
- enabled: 1
path: Assets/Scenes/Levels/Level 3.unity
guid: 7d7146aedfcd48445bb0d44a485249b2
- enabled: 1
path: Assets/Scenes/Testing/Filip.unity
guid: 326dea585e0ea574389529eaae8a0ab4
- enabled: 1
path: Assets/Scenes/Menu/FinalMenu.unity
guid: e728960f94bcba84089c530dec85aa8d