com.tunnelsnakes.audiosystem 1.1.3 → 2.0.0

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.
@@ -1,20 +1,28 @@
1
+ //#undef MOREMOUNTAINS_NICEVIBRATIONS_INSTALLED
2
+ //#define MOREMOUNTAINS_NICEVIBRATIONS
1
3
  using System.Collections;
2
4
  using System.Collections.Generic;
3
5
  using UnityEngine;
4
- #if MOREMOUNTAINS_NICEVIBRATIONS
6
+ #if MOREMOUNTAINS_NICEVIBRATIONS_INSTALLED
7
+ using Lofelt.NiceVibrations;
8
+ #elif MOREMOUNTAINS_NICEVIBRATIONS
5
9
  using MoreMountains.NiceVibrations;
6
10
  #endif
7
11
 
8
- [CreateAssetMenu(fileName = nameof(HapticVibration), menuName = MENU_FOLDER + nameof(HapticVibration))]
9
- public class HapticVibration : Vibration {
12
+ [CreateAssetMenu(fileName = nameof(HapticPresetVibration), menuName = MENU_FOLDER + nameof(HapticPresetVibration))]
13
+ public class HapticPresetVibration : Vibration {
10
14
 
11
- #if MOREMOUNTAINS_NICEVIBRATIONS
15
+ #if MOREMOUNTAINS_NICEVIBRATIONS_INSTALLED
16
+ [SerializeField] private HapticPatterns.PresetType _type = HapticPatterns.PresetType.None;
17
+ #elif MOREMOUNTAINS_NICEVIBRATIONS
12
18
  [SerializeField] private HapticTypes _type = HapticTypes.None;
13
19
  #endif
14
20
 
15
21
  public override void Vibrate() {
16
22
  if (CanVibrate) {
17
- #if MOREMOUNTAINS_NICEVIBRATIONS
23
+ #if MOREMOUNTAINS_NICEVIBRATIONS_INSTALLED
24
+ HapticPatterns.PlayPreset(_type);
25
+ #elif MOREMOUNTAINS_NICEVIBRATIONS
18
26
  MMVibrationManager.Haptic(_type, false, true, null);
19
27
  #else
20
28
  #if UNITY_EDITOR
@@ -1,18 +1,20 @@
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
+ "rootNamespace": "",
4
+ "references": [
5
+ "GUID:ec99747e8eb95ee488f6cfa3a8e647b9",
6
+ "GUID:041029188fa88c54f9efffc039b6a1c9",
7
+ "GUID:865b414a121ed594e91db2e09f65d38c",
8
+ "GUID:c5c32a628b9233446bcce7f67a49d1f4",
9
+ "GUID:57a0b9bc628ab4740af4b6f1f0b2e134"
10
+ ],
11
+ "includePlatforms": [],
12
+ "excludePlatforms": [],
13
+ "allowUnsafeCode": false,
14
+ "overrideReferences": false,
15
+ "precompiledReferences": [],
16
+ "autoReferenced": true,
17
+ "defineConstraints": [],
18
+ "versionDefines": [],
19
+ "noEngineReferences": false
18
20
  }
packages/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.tunnelsnakes.audiosystem",
3
- "version": "1.1.3",
3
+ "version": "2.0.0",
4
4
  "displayName": "TS AudioSystem",
5
5
  "description": "Audio and vibrations",
6
6
  "license": "proprietary",