com.puzzlescapegames.services 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,13 +32,16 @@ namespace PuzzlescapeGames.Services.AudioService
32
32
 
33
33
  public void ChangedMusic( AudioClip clip, float fadeOut = 0.33f, float fadeIn = 0.33f )
34
34
  {
35
+ _musicFade?.Kill();
36
+
35
37
  if ( _musicSource == null )
36
38
  {
37
39
  PlayMusic( clip );
40
+ _musicSource.Source.volume = 0f;
41
+ _musicFade = _musicSource.DoVolume( 1f, fadeIn );
38
42
  }
39
43
  else
40
44
  {
41
- _musicFade?.Kill();
42
45
  _musicFade = _musicSource
43
46
  .DoVolume( 0f, fadeOut )
44
47
  .OnComplete( VolumeCompleted );
@@ -57,6 +57,7 @@ namespace PuzzlescapeGames.Services.AudioService
57
57
  public void Stop()
58
58
  {
59
59
  IsPlaying = false;
60
+ Source.clip = null;
60
61
  }
61
62
 
62
63
  public Tween DoVolume( float target, float duration )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name" : "com.puzzlescapegames.services",
3
3
  "displayName" : "Puzzlescape Games Services",
4
- "version" : "1.1.5",
4
+ "version" : "1.1.7",
5
5
  "author" : "Puzzlescape Games",
6
6
  "description" : "Common services.",
7
7
  "repository": {