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>
33 lines
859 B
C#
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;
|
|
}
|
|
}
|