Add SoundEffect audio system (ScriptableObject-based) with test assets

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Fable 5 committed 2026-07-10 13:25:56 +02:00
1 parent 75f5704ab8
commit 0be503c927
22 files changed
+741

No files matched your search

@@ -0,0 +1,32 @@
using UnityEngine;
using UnityEngine.Audio;
namespace Prototype
{
public struct SoundEffectOptions
{
public AudioMixerGroup audioMixerGroup;
public float? volume;
public float? volumeMultiplier;
public float GetVolume() => (volume ?? 1) * (volumeMultiplier ?? 1);
public float? pitch;
public float GetPitch() => pitch ?? 1;
public bool? loop;
public bool GetLoop() => loop ?? false;
public Vector2? distanceRange;
public Vector2 GetDistanceRange() => distanceRange ?? new(30, 200);
public Vector2? fade;
public Vector2 GetFade() => fade ?? new();
public bool? destroyOnLoad;
public bool ShouldDestroyOnLoad() => destroyOnLoad ?? true;
public float? delay;
public float GetDelay() => delay ?? 0;
}
}