This commit is contained in:
haitem 2021-01-31 11:29:00 +01:00
commit 01d82755f2
4 changed files with 9445 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 127deaeaf7712824f83ee4cba639e023
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

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