Class MusicRules
- Namespace
- SurvivorsMaker.Presentation
- Assembly
- SurvivorsMaker.Presentation.dll
Pure selection of music context from the current run phase.
public static class MusicRules
- Inheritance
-
MusicRules
- Inherited Members
Methods
Approach(float, float, float, float)
Moves current toward target so a full 0–1 change takes seconds.
public static float Approach(float current, float target, float deltaTime, float seconds)
Parameters
Returns
Choose(bool, RunPhase, RunMode, bool, bool, bool)
Music for the session state. No run: menu. Won/lost: menu. Shop: shop. Level-up between waves: shop
(during a wave only when levelUpInWaveUsesShop). Waves: boss while one is alive, else the mode's track.
public static MusicContext Choose(bool hasRun, RunPhase phase, RunMode mode, bool waveActive, bool bossAlive, bool levelUpInWaveUsesShop = false)
Parameters
Returns
DuckStep(float, bool, float, float, float, float)
Music gain from ducking: falls to duckLevel over attack while ducked, recovers over release.
public static float DuckStep(float current, bool ducked, float duckLevel, float attack, float release, float deltaTime)
Parameters
Returns
Fallback(MusicContext, RunMode)
The context to try when context has no track: boss → mode's wave → arena, shop → menu.
public static MusicContext Fallback(MusicContext context, RunMode mode)
Parameters
contextMusicContextmodeRunMode