Example #1
0
        public BGMState Stop(ISoundPlayable playable, float fadeOutTime, float delayedStop)
        {
            if (fadeOutTime < 0.0f)
            {
                // フェードアウトなし
                return(new BGMStateNoFadeOut(delayedStop));
            }

            return(new BGMStateFadeOut(fadeOutTime));
        }
Example #2
0
        public BGMState Play(ISoundPlayable playable, String bgm, float fadeInTime, float delayedIn, float delayedOut, bool isLoop)
        {
            playable.Play(bgm, delayedIn, delayedOut, isLoop);

            if (fadeInTime > 0.0f)
            {
                playable.SetVolume(0.0f);
                return(new BGMStateFadeIn(fadeInTime));
            }
            playable.SetVolume(0.75f);
            return(new BGMStatePlaying());
        }
Example #3
0
        public BGMState Update(ISoundPlayable playable, float deltaTime)
        {
            elapsedTime += deltaTime;

            if (elapsedTime >= delayedStop)
            {
                playable.SetVolume(0.0f);
                playable.Stop();
                return(new BGMStateWait());
            }

            return(this);
        }
Example #4
0
        public BGMState Update(ISoundPlayable playable, float deltaTime)
        {
            elapsedTime += deltaTime;

            if (elapsedTime >= fadeInTime)
            {
                playable.SetVolume(0.75f);

                return(new BGMStatePlaying());
            }
            else
            {
                playable.SetVolume(elapsedTime / fadeInTime * 0.75f);
            }

            return(this);
        }
Example #5
0
 public SoundEffecter(ISoundPlayable _single, ISoundPlayable _multi, ISoundPlayable _worldSingle)
 {
     single      = _single;
     multi       = _multi;
     worldSingle = _worldSingle;
 }
Example #6
0
 public BGMPlayer(ISoundPlayable playable1, ISoundPlayable playable2)
 {
     front = new BGMDevice(playable1);
     back  = new BGMDevice(playable2);
 }
Example #7
0
 public BGMDevice(ISoundPlayable _playable)
 {
     playable = _playable;
 }
Example #8
0
        public BGMState Stop(ISoundPlayable playable, float fadeOutTime, float delayedStop)
        {
            playable.Stop();

            return(new BGMStateWait());
        }
Example #9
0
 public BGMState Play(ISoundPlayable playable, String bgm, float fadeInTime, float delayedIn, float delayedOut, bool isLoop)
 {
     return(this);
 }
Example #10
0
 public BGMState Pause(ISoundPlayable playable)
 {
     playable.Pause();
     return(new BGMStatePause(this));
 }
Example #11
0
 public BGMState Update(ISoundPlayable playable, float deltaTime)
 {
     return(this);
 }
Example #12
0
 public BGMState Stop(ISoundPlayable playable, float fadeOutTime, float delayedStop)
 {
     return(this);
 }
Example #13
0
 public BGMState Pause(ISoundPlayable playable)
 {
     return(this);
 }
Example #14
0
 public BGMState Play(ISoundPlayable playable, String bgm, float fadeInTime, float delayedIn, float delayedOut, bool isLoop)
 {
     playable.Play(bgm, delayedIn, delayedOut, isLoop);
     return(beforeState);
 }
Example #15
0
 public void Update(ISoundPlayable playable, float deltaTime)
 {
     nowState = nowState.Update(playable, deltaTime);
 }
Example #16
0
 public void Stop(ISoundPlayable playable, float fadeOutTime)
 {
     nowState = nowState.Stop(playable, fadeOutTime, 0.0f);
 }
Example #17
0
 public void Stop(ISoundPlayable playable, float fadeOutTime, float delayedStop)
 {
     nowState = nowState.Stop(playable, fadeOutTime, delayedStop);
 }
Example #18
0
 public void Pause(ISoundPlayable playable)
 {
     nowState = nowState.Pause(playable);
 }
Example #19
0
 public void Play(ISoundPlayable playable, float fadeInTime, float delayedIn, float delayedOut, bool isLoop)
 {
     nowState = nowState.Play(playable, bgm, fadeInTime, delayedIn, delayedOut, isLoop);
 }