com.puzzlescapegames.services 1.1.6 → 1.1.8

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.
@@ -64,6 +64,16 @@ namespace PuzzlescapeGames.Services.AudioService
64
64
  CreateMusic().Pause( trigger );
65
65
  }
66
66
 
67
+ public void SetMusicVolume( float value )
68
+ {
69
+ CreateMusic().Source.volume = value;
70
+ }
71
+
72
+ public Tween DoMusicVolume( float target, float duration )
73
+ {
74
+ return CreateMusic().DoVolume( target, duration );
75
+ }
76
+
67
77
  public AudioSource PlaySound( AudioClip clip, bool isLoop = false )
68
78
  {
69
79
  var source = CreateSound();
@@ -80,17 +90,17 @@ namespace PuzzlescapeGames.Services.AudioService
80
90
  return source;
81
91
  }
82
92
 
83
- public void SetMasterVolume( float value )
93
+ public void SetMixerMasterVolume( float value )
84
94
  {
85
95
  _audioMixer.SetFloat( MIXER_MASTER, value );
86
96
  }
87
97
 
88
- public void SetMusicVolume( float value )
98
+ public void SetMixerMusicVolume( float value )
89
99
  {
90
100
  _audioMixer.SetFloat( MIXER_MUSIC, value );
91
101
  }
92
102
 
93
- public void SetSoundVolume( float value )
103
+ public void SetMixerSoundVolume( float value )
94
104
  {
95
105
  _audioMixer.SetFloat( MIXER_SFX, value );
96
106
  }
@@ -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 )
@@ -1,3 +1,4 @@
1
+ using DG.Tweening;
1
2
  using UnityEngine;
2
3
 
3
4
  namespace PuzzlescapeGames.Services.AudioService
@@ -8,9 +9,12 @@ namespace PuzzlescapeGames.Services.AudioService
8
9
  void ChangedMusic( AudioClip clip, float fadeOut = 0.33f, float fadeIn = 0.33f );
9
10
  AudioSource PlaySound( AudioClip clip, bool isLoop = false );
10
11
 
11
- void SetMasterVolume( float value );
12
12
  void SetMusicVolume( float value );
13
- void SetSoundVolume( float value );
13
+ Tween DoMusicVolume( float target, float duration );
14
+
15
+ void SetMixerMasterVolume( float value );
16
+ void SetMixerMusicVolume( float value );
17
+ void SetMixerSoundVolume( float value );
14
18
 
15
19
  void MuteMusic( bool trigger );
16
20
  void PauseMusic( bool trigger );
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.6",
4
+ "version" : "1.1.8",
5
5
  "author" : "Puzzlescape Games",
6
6
  "description" : "Common services.",
7
7
  "repository": {