com.tunnelsnakes.audiosystem 1.1.0 → 1.1.2

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.
@@ -93,6 +93,7 @@ public class AudioPresenter : MonoBehaviour {
93
93
  }
94
94
 
95
95
  private void UpdateVolume() {
96
- _audioSource.volume = Volume * _audioGlobalVolume.Value * ((_isAudioEnable != null && _isAudioEnable.Value) ? 1f : 0f);
96
+ float volume = Volume * _audioGlobalVolume.Value * ((_isAudioEnable != null && _isAudioEnable.Value) ? 1f : 0f);
97
+ _audioSource.volume = Mathf.Clamp01(volume);
97
98
  }
98
99
  }
@@ -1,15 +1,26 @@
1
1
  using System.Collections;
2
2
  using System.Collections.Generic;
3
3
  using UnityEngine;
4
+ #if MOREMOUNTAINS_NICEVIBRATIONS
4
5
  using MoreMountains.NiceVibrations;
6
+ #endif
5
7
 
6
8
  [CreateAssetMenu(fileName = nameof(HapticVibration), menuName = MENU_FOLDER + nameof(HapticVibration))]
7
9
  public class HapticVibration : Vibration {
10
+
11
+ #if MOREMOUNTAINS_NICEVIBRATIONS
8
12
  [SerializeField] private HapticTypes _type = HapticTypes.None;
13
+ #endif
9
14
 
10
15
  public override void Vibrate() {
11
16
  if (CanVibrate) {
17
+ #if MOREMOUNTAINS_NICEVIBRATIONS
12
18
  MMVibrationManager.Haptic(_type, false, true, null);
19
+ #else
20
+ #if UNITY_EDITOR
21
+ Debug.LogWarning("Vibrations are disabled!");
22
+ #endif
23
+ #endif
13
24
  }
14
25
  }
15
26
  }
@@ -1,18 +1,18 @@
1
- {
2
- "name": "com.tunnelsnakes.audiosystem.Runtime",
3
- "references": [
4
- "GUID:ec99747e8eb95ee488f6cfa3a8e647b9",
5
- "GUID:041029188fa88c54f9efffc039b6a1c9",
6
- "GUID:865b414a121ed594e91db2e09f65d38c",
7
- "GUID:c5c32a628b9233446bcce7f67a49d1f4"
8
- ],
9
- "includePlatforms": [],
10
- "excludePlatforms": [],
11
- "allowUnsafeCode": false,
12
- "overrideReferences": false,
13
- "precompiledReferences": [],
14
- "autoReferenced": true,
15
- "defineConstraints": [],
16
- "versionDefines": [],
17
- "noEngineReferences": false
1
+ {
2
+ "name": "com.tunnelsnakes.audiosystem.Runtime",
3
+ "references": [
4
+ "GUID:ec99747e8eb95ee488f6cfa3a8e647b9",
5
+ "GUID:041029188fa88c54f9efffc039b6a1c9",
6
+ "GUID:865b414a121ed594e91db2e09f65d38c",
7
+ "GUID:c5c32a628b9233446bcce7f67a49d1f4"
8
+ ],
9
+ "includePlatforms": [],
10
+ "excludePlatforms": [],
11
+ "allowUnsafeCode": false,
12
+ "overrideReferences": false,
13
+ "precompiledReferences": [],
14
+ "autoReferenced": true,
15
+ "defineConstraints": [],
16
+ "versionDefines": [],
17
+ "noEngineReferences": false
18
18
  }
packages/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "com.tunnelsnakes.audiosystem",
3
- "version": "1.1.0",
4
- "displayName": "AudioSystem",
3
+ "version": "1.1.2",
4
+ "displayName": "TS AudioSystem",
5
5
  "description": "Audio and vibrations",
6
6
  "license": "proprietary",
7
7
  "publishConfig": {