using System.Collections; using System.Collections.Generic; using UnityEngine; using Sirenix.OdinInspector; namespace KairoEngine.CharacterSystem { [CreateAssetMenu(fileName = "footsteps", menuName = "KairoEngine/Footsteps Library", order = 2)] public class FootstepsLibrary : ScriptableObject { [ShowInInspector] public List dirtSounds = new List(); [ShowInInspector] public List concreteSounds = new List(); public List GetSounds(string key) { //Debug.Log(key); if(key == "Dirt") return dirtSounds; if(key == "Concrete") return concreteSounds; else return new List(); } public AudioClip GetRandomSound(string key) { //Debug.Log(key); if(key == "Dirt") return dirtSounds[Random.Range(0, dirtSounds.Count)]; if(key == "Concrete") return concreteSounds[Random.Range(0, concreteSounds.Count)]; else return null; } } }