public FadeMusicSource(double seconds, int source, MusicFadeType type, double maxVolume = 1.0) { Seconds = seconds; Source = source; FadeType = type; MaxVolume = maxVolume; }
public void EndMusicWithFadeAndStartNewSong(MusicFadeType _fadeType, MusicSong _newSong, float _delay) { MusicFadeType fadeType = _fadeType; curFadeSpeed = GetFadeSpeedByType(fadeType); queuedSong = _newSong; newSongStartDelay = _delay; SetStatus(MusicPlayingStatus.FadingToNewMusic); }
public void EndMusicWithFade(MusicFadeType _fadeType) { if (IsStatus(MusicPlayingStatus.Idle)) { return; } MusicFadeType fadeType = _fadeType; curFadeSpeed = GetFadeSpeedByType(fadeType); SetStatus(MusicPlayingStatus.FadingToNone); }
float GetFadeSpeedByType(MusicFadeType _fadeType) { MusicFadeType fadeType = _fadeType; switch (fadeType) { case MusicFadeType.Slow: return(0.10f); case MusicFadeType.Normal: return(0.15f); case MusicFadeType.Fast: return(0.3f); case MusicFadeType.VeryFast: return(0.6f); } return(1); }
public MusicFadeInfo(MusicFadeType fadeType, float fadeEndVolume) { this._fadeEndVolume = fadeEndVolume; this._fadeType = fadeType; this._fadeSpeed = 1; }