예제 #1
0
 public FadeMusicSource(double seconds, int source, MusicFadeType type, double maxVolume = 1.0)
 {
     Seconds   = seconds;
     Source    = source;
     FadeType  = type;
     MaxVolume = maxVolume;
 }
예제 #2
0
    public void EndMusicWithFadeAndStartNewSong(MusicFadeType _fadeType, MusicSong _newSong, float _delay)
    {
        MusicFadeType fadeType = _fadeType;

        curFadeSpeed = GetFadeSpeedByType(fadeType);

        queuedSong = _newSong;

        newSongStartDelay = _delay;

        SetStatus(MusicPlayingStatus.FadingToNewMusic);
    }
예제 #3
0
    public void EndMusicWithFade(MusicFadeType _fadeType)
    {
        if (IsStatus(MusicPlayingStatus.Idle))
        {
            return;
        }

        MusicFadeType fadeType = _fadeType;

        curFadeSpeed = GetFadeSpeedByType(fadeType);

        SetStatus(MusicPlayingStatus.FadingToNone);
    }
예제 #4
0
    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);
    }
예제 #5
0
 public MusicFadeInfo(MusicFadeType fadeType, float fadeEndVolume)
 {
     this._fadeEndVolume = fadeEndVolume;
     this._fadeType      = fadeType;
     this._fadeSpeed     = 1;
 }