com.puzzlescapegames.services 1.0.2 → 1.0.5

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.
Files changed (75) hide show
  1. package/Editor/PuzzlescapeGames.Services.Editor.asmdef +3 -1
  2. package/README.md +5 -1
  3. package/Runtime/Common/AudioMixer.mixer +146 -0
  4. package/Runtime/Common/AudioMixer.mixer.meta +8 -0
  5. package/Runtime/Common.meta +8 -0
  6. package/Runtime/Plugins/SlicedFilledImage.cs +730 -0
  7. package/Runtime/Plugins/SlicedFilledImage.cs.meta +11 -0
  8. package/Runtime/Plugins/UIGradient/Editor/UIGradientEditor.cs +220 -0
  9. package/Runtime/Plugins/UIGradient/Editor/UIGradientEditor.cs.meta +11 -0
  10. package/Runtime/Plugins/UIGradient/Editor/uigradient_inspector_icon.png +0 -0
  11. package/Runtime/Plugins/UIGradient/Editor/uigradient_inspector_icon.png.meta +110 -0
  12. package/Runtime/Plugins/UIGradient/Editor.meta +8 -0
  13. package/Runtime/Plugins/UIGradient/Scripts/UIGradient.cs +511 -0
  14. package/Runtime/Plugins/UIGradient/Scripts/UIGradient.cs.meta +11 -0
  15. package/Runtime/Plugins/UIGradient/Scripts/Vector2Extension.cs +24 -0
  16. package/Runtime/Plugins/UIGradient/Scripts/Vector2Extension.cs.meta +11 -0
  17. package/Runtime/Plugins/UIGradient/Scripts.meta +8 -0
  18. package/Runtime/Plugins/UIGradient.meta +8 -0
  19. package/Runtime/Plugins/Vibration/Vibration/Example/VibrationExample.cs +82 -0
  20. package/Runtime/Plugins/Vibration/Vibration/Example/VibrationExample.cs.meta +11 -0
  21. package/Runtime/Plugins/Vibration/Vibration/Example.meta +8 -0
  22. package/Runtime/Plugins/Vibration/Vibration/Vibration.cs +263 -0
  23. package/Runtime/Plugins/Vibration/Vibration/Vibration.cs.meta +12 -0
  24. package/Runtime/Plugins/Vibration/Vibration.asmdef +18 -0
  25. package/Runtime/Plugins/Vibration/Vibration.asmdef.meta +7 -0
  26. package/Runtime/Plugins/Vibration/Vibration.meta +8 -0
  27. package/Runtime/Plugins/Vibration/iOS/HapticFeedback.mm +64 -0
  28. package/Runtime/Plugins/Vibration/iOS/HapticFeedback.mm.meta +37 -0
  29. package/Runtime/Plugins/Vibration/iOS/Vibration.h +26 -0
  30. package/Runtime/Plugins/Vibration/iOS/Vibration.h.meta +27 -0
  31. package/Runtime/Plugins/Vibration/iOS/Vibration.mm +73 -0
  32. package/Runtime/Plugins/Vibration/iOS/Vibration.mm.meta +37 -0
  33. package/Runtime/Plugins/Vibration/iOS.meta +8 -0
  34. package/Runtime/Plugins/Vibration.meta +8 -0
  35. package/Runtime/Plugins.meta +8 -0
  36. package/Runtime/PuzzlescapeGames.Services.asmdef +19 -2
  37. package/Runtime/Services/AudioService/AudioService.cs +82 -0
  38. package/Runtime/Services/AudioService/AudioService.cs.meta +3 -0
  39. package/Runtime/Services/AudioService/AudioServiceCustomInstaller.cs +29 -0
  40. package/Runtime/Services/AudioService/AudioServiceCustomInstaller.cs.meta +3 -0
  41. package/Runtime/Services/AudioService/AudioSource.cs +87 -0
  42. package/Runtime/Services/AudioService/AudioSource.cs.meta +3 -0
  43. package/Runtime/Services/AudioService/AudioSourceFactory.cs +6 -0
  44. package/Runtime/Services/AudioService/AudioSourceFactory.cs.meta +3 -0
  45. package/Runtime/Services/AudioService/IAudioService.cs +16 -0
  46. package/Runtime/Services/AudioService/IAudioService.cs.meta +3 -0
  47. package/Runtime/Services/AudioService.meta +8 -0
  48. package/Runtime/Services/NTPService/INTPService.cs +13 -0
  49. package/Runtime/Services/NTPService/INTPService.cs.meta +3 -0
  50. package/Runtime/Services/NTPService/NTPService.cs +153 -0
  51. package/Runtime/Services/NTPService/NTPService.cs.meta +3 -0
  52. package/Runtime/Services/NTPService/NTPServiceInstaller.cs +12 -0
  53. package/Runtime/Services/NTPService/NTPServiceInstaller.cs.meta +3 -0
  54. package/Runtime/Services/NTPService.meta +8 -0
  55. package/Runtime/Services/TickableService/TickableService.cs +29 -0
  56. package/Runtime/Services/TickableService/TickableService.cs.meta +3 -0
  57. package/Runtime/Services/TickableService/TickableServiceInstaller.cs +12 -0
  58. package/Runtime/Services/TickableService/TickableServiceInstaller.cs.meta +3 -0
  59. package/Runtime/Services/TickableService.meta +8 -0
  60. package/Runtime/Services/UIBlockingService/UIBlocker.cs +15 -0
  61. package/Runtime/Services/UIBlockingService/UIBlocker.cs.meta +3 -0
  62. package/Runtime/Services/UIBlockingService/UIBlockingService.cs +36 -0
  63. package/Runtime/Services/UIBlockingService/UIBlockingService.cs.meta +3 -0
  64. package/Runtime/Services/UIBlockingService/UIBlockingServiceInstaller.cs +17 -0
  65. package/Runtime/Services/UIBlockingService/UIBlockingServiceInstaller.cs.meta +3 -0
  66. package/Runtime/Services/UIBlockingService.meta +8 -0
  67. package/Runtime/Services/VibrationService/IVibrationService.cs +7 -0
  68. package/Runtime/Services/VibrationService/IVibrationService.cs.meta +3 -0
  69. package/Runtime/Services/VibrationService/VibrationService.cs +19 -0
  70. package/Runtime/Services/VibrationService/VibrationService.cs.meta +3 -0
  71. package/Runtime/Services/VibrationService/VibrationServiceInstaller.cs +12 -0
  72. package/Runtime/Services/VibrationService/VibrationServiceInstaller.cs.meta +3 -0
  73. package/Runtime/Services/VibrationService.meta +8 -0
  74. package/Runtime/Services.meta +8 -0
  75. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: c4c3c8536a0c4444097c5ec05c7a051f
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,220 @@
1
+ #if UNITY_EDITOR
2
+ using UnityEditor;
3
+ using UnityEditor.AnimatedValues;
4
+ using UnityEngine;
5
+
6
+ /// <summary>
7
+ /// Author: Josh H.
8
+ /// Support: assetstore.joshh@gmail.com
9
+ /// </summary>
10
+
11
+ namespace JoshH.UI
12
+ {
13
+ [CustomEditor(typeof(UIGradient))]
14
+ [CanEditMultipleObjects]
15
+ public class UIGradientEditor : Editor
16
+ {
17
+
18
+ private SerializedProperty _blendMode;
19
+ private SerializedProperty _intensity;
20
+ private SerializedProperty _gradientType;
21
+
22
+ private SerializedProperty _linearColor1;
23
+ private SerializedProperty _linearColor2;
24
+
25
+ private SerializedProperty _cornerColorUpperLeft;
26
+ private SerializedProperty _cornerColorUpperRight;
27
+ private SerializedProperty _cornerColorLowerRight;
28
+ private SerializedProperty _cornerColorLowerLeft;
29
+
30
+ private SerializedProperty _linearGradient;
31
+
32
+ private SerializedProperty _angle;
33
+
34
+ private AnimBool[] animTypeBools;
35
+
36
+ private static readonly string[] typeLabels = new string[] { "Linear", "Corner", "ComplexLinear" };
37
+
38
+ private void OnEnable()
39
+ {
40
+ _blendMode = serializedObject.FindProperty("blendMode");
41
+ _intensity = serializedObject.FindProperty("intensity");
42
+ _gradientType = serializedObject.FindProperty("gradientType");
43
+
44
+ _linearColor1 = serializedObject.FindProperty("linearColor1");
45
+ _linearColor2 = serializedObject.FindProperty("linearColor2");
46
+
47
+ _cornerColorUpperLeft = serializedObject.FindProperty("cornerColorUpperLeft");
48
+ _cornerColorUpperRight = serializedObject.FindProperty("cornerColorUpperRight");
49
+ _cornerColorLowerRight = serializedObject.FindProperty("cornerColorLowerRight");
50
+ _cornerColorLowerLeft = serializedObject.FindProperty("cornerColorLowerLeft");
51
+
52
+ _linearGradient = serializedObject.FindProperty("linearGradient");
53
+
54
+ _angle = serializedObject.FindProperty("angle");
55
+
56
+ animTypeBools = new AnimBool[typeLabels.Length];
57
+ SetAnimTypeBools(_gradientType.enumValueIndex);
58
+ }
59
+
60
+ protected void SetAnimTypeBools(int choosen)
61
+ {
62
+ for (int i = 0; i < animTypeBools.Length; i++)
63
+ {
64
+ if (animTypeBools[i] == null)
65
+ {
66
+ animTypeBools[i] = new AnimBool(choosen == i);
67
+ animTypeBools[i].valueChanged.AddListener(Repaint);
68
+ }
69
+ animTypeBools[i].target = choosen == i;
70
+ }
71
+ }
72
+
73
+ public override void OnInspectorGUI()
74
+ {
75
+ serializedObject.Update();
76
+
77
+ EditorGUILayout.Space();
78
+
79
+ EditorGUILayout.PropertyField(_blendMode);
80
+
81
+ EditorGUILayout.PropertyField(_intensity);
82
+
83
+ GradientTypeGUI();
84
+
85
+ EditorGUILayout.Space();
86
+ EditorGUILayout.PropertyField(_angle);
87
+
88
+ serializedObject.ApplyModifiedProperties();
89
+ }
90
+
91
+ void GradientTypeGUI()
92
+ {
93
+ if (_gradientType.hasMultipleDifferentValues)
94
+ {
95
+ int idx = GUILayout.Toolbar(-1, typeLabels);
96
+ if (idx != -1)
97
+ {
98
+ _gradientType.enumValueIndex = idx;
99
+ }
100
+ }
101
+ else
102
+ {
103
+ _gradientType.enumValueIndex = GUILayout.Toolbar(_gradientType.enumValueIndex, typeLabels);
104
+ SetAnimTypeBools(_gradientType.enumValueIndex);
105
+ ColorFields();
106
+ }
107
+ }
108
+
109
+ private void ColorFields()
110
+ {
111
+ EditorGUILayout.Space();
112
+ LinearColorGUI();
113
+ CornerColorGUI();
114
+ ComplexLinearGUI();
115
+ }
116
+
117
+ private void LinearColorGUI()
118
+ {
119
+ if (EditorGUILayout.BeginFadeGroup(animTypeBools[0].faded))
120
+ {
121
+ EditorGUILayout.BeginHorizontal();
122
+ {
123
+ EditorGUILayout.BeginVertical();
124
+ {
125
+ EditorGUILayout.PropertyField(_linearColor1);
126
+ EditorGUILayout.PropertyField(_linearColor2);
127
+ }
128
+ EditorGUILayout.EndVertical();
129
+
130
+ EditorGUILayout.BeginVertical(GUILayout.Width(40));
131
+ {
132
+ GUILayout.Space(8);
133
+ if (GUILayout.Button('\u2191'.ToString() + '\u2193'.ToString())) // Swap "icon"
134
+ {
135
+ SwapLinearColors();
136
+ }
137
+ }
138
+ EditorGUILayout.EndVertical();
139
+ }
140
+ EditorGUILayout.EndHorizontal();
141
+ }
142
+ EditorGUILayout.EndFadeGroup();
143
+ }
144
+
145
+ private void ComplexLinearGUI()
146
+ {
147
+ if (EditorGUILayout.BeginFadeGroup(animTypeBools[2].faded))
148
+ {
149
+ EditorGUILayout.PropertyField(_linearGradient);
150
+ }
151
+ EditorGUILayout.EndFadeGroup();
152
+ }
153
+
154
+ private void SwapLinearColors()
155
+ {
156
+ if (!_linearColor1.hasMultipleDifferentValues && !_linearColor2.hasMultipleDifferentValues)
157
+ {
158
+ Color c = _linearColor1.colorValue;
159
+ _linearColor1.colorValue = _linearColor2.colorValue;
160
+ _linearColor2.colorValue = c;
161
+ }
162
+ else
163
+ {
164
+ foreach (UIGradient item in this.targets)
165
+ {
166
+ Color c = item.LinearColor1;
167
+ item.LinearColor1 = item.LinearColor2;
168
+ item.LinearColor2 = c;
169
+
170
+ //Mesh Modification is not triggered without this -> changes not visible
171
+ item.ForceUpdateGraphic();
172
+ }
173
+ }
174
+ }
175
+
176
+ private void CornerColorGUI()
177
+ {
178
+ if (EditorGUILayout.BeginFadeGroup(animTypeBools[1].faded))
179
+ {
180
+ EditorGUI.indentLevel++;
181
+ EditorGUILayout.BeginHorizontal();
182
+ {
183
+ EditorGUILayout.BeginVertical();
184
+ {
185
+ EditorGUILayout.LabelField("Upper Left", GUILayout.MaxWidth(90));
186
+ _cornerColorUpperLeft.colorValue = EditorGUILayout.ColorField(_cornerColorUpperLeft.colorValue);
187
+ }
188
+ EditorGUILayout.EndVertical();
189
+ EditorGUILayout.BeginVertical();
190
+ {
191
+ EditorGUILayout.LabelField("Upper Right", GUILayout.MaxWidth(90));
192
+ _cornerColorUpperRight.colorValue = EditorGUILayout.ColorField(_cornerColorUpperRight.colorValue);
193
+ }
194
+ EditorGUILayout.EndVertical();
195
+ }
196
+ EditorGUILayout.EndHorizontal();
197
+ EditorGUILayout.Space();
198
+ EditorGUILayout.BeginHorizontal();
199
+ {
200
+ EditorGUILayout.BeginVertical();
201
+ {
202
+ EditorGUILayout.LabelField("Lower Left", GUILayout.MaxWidth(90));
203
+ _cornerColorLowerLeft.colorValue = EditorGUILayout.ColorField(_cornerColorLowerLeft.colorValue);
204
+ }
205
+ EditorGUILayout.EndVertical();
206
+ EditorGUILayout.BeginVertical();
207
+ {
208
+ EditorGUILayout.LabelField("Lower Right", GUILayout.MaxWidth(90));
209
+ _cornerColorLowerRight.colorValue = EditorGUILayout.ColorField(_cornerColorLowerRight.colorValue);
210
+ }
211
+ EditorGUILayout.EndVertical();
212
+ }
213
+ EditorGUILayout.EndHorizontal();
214
+ EditorGUI.indentLevel--;
215
+ }
216
+ EditorGUILayout.EndFadeGroup();
217
+ }
218
+ }
219
+ }
220
+ #endif
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 1c0a015f43f83604ab64d0179dbde855
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,110 @@
1
+ fileFormatVersion: 2
2
+ guid: 8ee3c2bc119f3b9488972e189bdcd023
3
+ TextureImporter:
4
+ fileIDToRecycleName: {}
5
+ externalObjects: {}
6
+ serializedVersion: 7
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 0
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ grayScaleToAlpha: 0
27
+ generateCubemap: 6
28
+ cubemapConvolution: 0
29
+ seamlessCubemap: 0
30
+ textureFormat: 1
31
+ maxTextureSize: 2048
32
+ textureSettings:
33
+ serializedVersion: 2
34
+ filterMode: -1
35
+ aniso: 1
36
+ mipBias: -100
37
+ wrapU: 1
38
+ wrapV: 1
39
+ wrapW: -1
40
+ nPOTScale: 0
41
+ lightmap: 0
42
+ compressionQuality: 50
43
+ spriteMode: 0
44
+ spriteExtrude: 1
45
+ spriteMeshType: 1
46
+ alignment: 0
47
+ spritePivot: {x: 0.5, y: 0.5}
48
+ spritePixelsToUnits: 100
49
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50
+ spriteGenerateFallbackPhysicsShape: 1
51
+ alphaUsage: 0
52
+ alphaIsTransparency: 1
53
+ spriteTessellationDetail: -1
54
+ textureType: 2
55
+ textureShape: 1
56
+ singleChannelComponent: 0
57
+ maxTextureSizeSet: 0
58
+ compressionQualitySet: 0
59
+ textureFormatSet: 0
60
+ platformSettings:
61
+ - serializedVersion: 2
62
+ buildTarget: DefaultTexturePlatform
63
+ maxTextureSize: 32
64
+ resizeAlgorithm: 0
65
+ textureFormat: -1
66
+ textureCompression: 0
67
+ compressionQuality: 50
68
+ crunchedCompression: 0
69
+ allowsAlphaSplitting: 0
70
+ overridden: 0
71
+ androidETC2FallbackOverride: 0
72
+ - serializedVersion: 2
73
+ buildTarget: Standalone
74
+ maxTextureSize: 32
75
+ resizeAlgorithm: 0
76
+ textureFormat: -1
77
+ textureCompression: 0
78
+ compressionQuality: 50
79
+ crunchedCompression: 0
80
+ allowsAlphaSplitting: 0
81
+ overridden: 0
82
+ androidETC2FallbackOverride: 0
83
+ - serializedVersion: 2
84
+ buildTarget: Android
85
+ maxTextureSize: 32
86
+ resizeAlgorithm: 0
87
+ textureFormat: -1
88
+ textureCompression: 0
89
+ compressionQuality: 50
90
+ crunchedCompression: 0
91
+ allowsAlphaSplitting: 0
92
+ overridden: 0
93
+ androidETC2FallbackOverride: 0
94
+ spriteSheet:
95
+ serializedVersion: 2
96
+ sprites: []
97
+ outline: []
98
+ physicsShape: []
99
+ bones: []
100
+ spriteID:
101
+ vertices: []
102
+ indices:
103
+ edges: []
104
+ weights: []
105
+ spritePackingTag:
106
+ pSDRemoveMatte: 0
107
+ pSDShowRemoveMatteOption: 0
108
+ userData:
109
+ assetBundleName:
110
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: 564dae3c463256c4eb42a79a7466dcd9
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant: