com.puzzlescapegames.services 1.1.1 → 1.1.3

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,6 +1,8 @@
1
+ using System;
2
+
1
3
  namespace PuzzlescapeGames.Services.VibrationService
2
4
  {
3
- internal sealed class VibrationService : IVibrationService
5
+ public sealed class VibrationService : IVibrationService
4
6
  {
5
7
  public VibrationService()
6
8
  {
@@ -15,5 +17,27 @@ namespace PuzzlescapeGames.Services.VibrationService
15
17
  Vibration.VibratePop();
16
18
  #endif
17
19
  }
20
+
21
+ public void VibrateIOS( ImpactFeedbackStyle style )
22
+ {
23
+ #if UNITY_EDITOR
24
+ return;
25
+ #endif
26
+ Vibration.VibrateIOS( style );
27
+ }
28
+
29
+ public void VibrateAndroid( VibrationType type )
30
+ {
31
+ #if UNITY_EDITOR
32
+ return;
33
+ #endif
34
+ switch(type)
35
+ {
36
+ case VibrationType.Pop: Vibration.VibratePop(); break;
37
+ case VibrationType.Peek: Vibration.VibratePeek(); break;
38
+ case VibrationType.Nope: Vibration.VibrateNope(); break;
39
+ default: throw new ArgumentOutOfRangeException( nameof(type), type, null );
40
+ }
41
+ }
18
42
  }
19
43
  }
@@ -0,0 +1,9 @@
1
+ namespace PuzzlescapeGames.Services.VibrationService
2
+ {
3
+ public enum VibrationType
4
+ {
5
+ Pop,
6
+ Peek,
7
+ Nope,
8
+ }
9
+ }
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: a68e10bc43f74ad8ae81a39c2791fadf
3
+ timeCreated: 1731901859
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.1",
4
+ "version" : "1.1.3",
5
5
  "author" : "Puzzlescape Games",
6
6
  "description" : "Common services.",
7
7
  "repository": {