Files
chameleon/Assets/Scripts/Audio/SoundEffectOptions.cs
T
adminandClaude Fable 5 0172a1e834 Radar ping taunt sound + per-SoundEffect spatialize opt-in
MatchManager: new Radar Ping Sound property; MsgRadarPing now goes to
all clients (spawnBlips flag keeps blips hunter-only), sound plays 3D
at each pinged hider. Distance-based stagger (speed of sound + 35 ms
min gap) prevents phase cancellation when multiple hiders ping.

SoundEffect: new spatialize toggle (per asset, applied only to 3D
instances -> Steam Audio HRTF); removed unused fade field.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 23:11:39 +02:00

33 lines
859 B
C#

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 bool? destroyOnLoad;
public bool ShouldDestroyOnLoad() => destroyOnLoad ?? true;
public float? delay;
public float GetDelay() => delay ?? 0;
public bool? spatialize;
public bool GetSpatialize() => spatialize ?? false;
}
}