Class SoundCueGate
- Namespace
- SurvivorsMaker.Presentation
- Assembly
- SurvivorsMaker.Presentation.dll
Per-cue cooldown and concurrency limit, so hundreds of hits in one tick do not stack into noise. Times are any monotonic clock in seconds.
public sealed class SoundCueGate
- Inheritance
-
SoundCueGate
- Inherited Members
Constructors
SoundCueGate()
public SoundCueGate()
Methods
CanStart(string, float, float, int)
False while the cue is in its cooldown or already has maxConcurrent voices (0 = no limit).
public bool CanStart(string key, float now, float cooldown, int maxConcurrent)
Parameters
Returns
Clear()
public void Clear()
Playing(string, float)
public int Playing(string key, float now)
Parameters
Returns
Started(string, float, float)
Records a voice of key that started at now and lasts duration seconds.
public void Started(string key, float now, float duration)
Parameters
TryStart(string, float, float, int, float)
public bool TryStart(string key, float now, float cooldown, int maxConcurrent, float duration)