16 lines
405 B
C#
16 lines
405 B
C#
// Assets/_Project/Scripts/Audio/SoundConfig.cs
|
|
using UnityEngine;
|
|
|
|
namespace TD.Audio
|
|
{
|
|
[System.Serializable]
|
|
public struct SoundConfig
|
|
{
|
|
public AudioClip clip;
|
|
[Range(0f, 1f)] public float volume;
|
|
[Range(0f, 3f)] public float minPitch;
|
|
[Range(0f, 3f)] public float maxPitch;
|
|
|
|
public float RandomPitch() => Random.Range(minPitch, maxPitch);
|
|
}
|
|
}
|