com.puzzlescapegames.services 1.0.1 → 1.0.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.
Files changed (75) hide show
  1. package/README.md +5 -1
  2. package/Runtime/Common/AudioMixer.mixer +146 -0
  3. package/Runtime/Common/AudioMixer.mixer.meta +8 -0
  4. package/Runtime/Common.meta +8 -0
  5. package/Runtime/Plugins/SlicedFilledImage.cs +730 -0
  6. package/Runtime/Plugins/SlicedFilledImage.cs.meta +11 -0
  7. package/Runtime/Plugins/UIGradient/Editor/UIGradientEditor.cs +218 -0
  8. package/Runtime/Plugins/UIGradient/Editor/UIGradientEditor.cs.meta +11 -0
  9. package/Runtime/Plugins/UIGradient/Editor/uigradient_inspector_icon.png +0 -0
  10. package/Runtime/Plugins/UIGradient/Editor/uigradient_inspector_icon.png.meta +110 -0
  11. package/Runtime/Plugins/UIGradient/Editor.meta +8 -0
  12. package/Runtime/Plugins/UIGradient/Scripts/UIGradient.cs +511 -0
  13. package/Runtime/Plugins/UIGradient/Scripts/UIGradient.cs.meta +11 -0
  14. package/Runtime/Plugins/UIGradient/Scripts/Vector2Extension.cs +24 -0
  15. package/Runtime/Plugins/UIGradient/Scripts/Vector2Extension.cs.meta +11 -0
  16. package/Runtime/Plugins/UIGradient/Scripts.meta +8 -0
  17. package/Runtime/Plugins/UIGradient.meta +8 -0
  18. package/Runtime/Plugins/Vibration/Vibration/Example/VibrationExample.cs +82 -0
  19. package/Runtime/Plugins/Vibration/Vibration/Example/VibrationExample.cs.meta +11 -0
  20. package/Runtime/Plugins/Vibration/Vibration/Example.meta +8 -0
  21. package/Runtime/Plugins/Vibration/Vibration/Vibration.cs +263 -0
  22. package/Runtime/Plugins/Vibration/Vibration/Vibration.cs.meta +12 -0
  23. package/Runtime/Plugins/Vibration/Vibration.asmdef +18 -0
  24. package/Runtime/Plugins/Vibration/Vibration.asmdef.meta +7 -0
  25. package/Runtime/Plugins/Vibration/Vibration.meta +8 -0
  26. package/Runtime/Plugins/Vibration/iOS/HapticFeedback.mm +64 -0
  27. package/Runtime/Plugins/Vibration/iOS/HapticFeedback.mm.meta +37 -0
  28. package/Runtime/Plugins/Vibration/iOS/Vibration.h +26 -0
  29. package/Runtime/Plugins/Vibration/iOS/Vibration.h.meta +27 -0
  30. package/Runtime/Plugins/Vibration/iOS/Vibration.mm +73 -0
  31. package/Runtime/Plugins/Vibration/iOS/Vibration.mm.meta +37 -0
  32. package/Runtime/Plugins/Vibration/iOS.meta +8 -0
  33. package/Runtime/Plugins/Vibration.meta +8 -0
  34. package/Runtime/Plugins.meta +8 -0
  35. package/Runtime/PuzzlescapeGames.Services.asmdef +20 -0
  36. package/Runtime/PuzzlescapeGames.Services.asmdef.meta +7 -0
  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,218 @@
1
+ using UnityEditor;
2
+ using UnityEditor.AnimatedValues;
3
+ using UnityEngine;
4
+
5
+ /// <summary>
6
+ /// Author: Josh H.
7
+ /// Support: assetstore.joshh@gmail.com
8
+ /// </summary>
9
+
10
+ namespace JoshH.UI
11
+ {
12
+ [CustomEditor(typeof(UIGradient))]
13
+ [CanEditMultipleObjects]
14
+ public class UIGradientEditor : Editor
15
+ {
16
+
17
+ private SerializedProperty _blendMode;
18
+ private SerializedProperty _intensity;
19
+ private SerializedProperty _gradientType;
20
+
21
+ private SerializedProperty _linearColor1;
22
+ private SerializedProperty _linearColor2;
23
+
24
+ private SerializedProperty _cornerColorUpperLeft;
25
+ private SerializedProperty _cornerColorUpperRight;
26
+ private SerializedProperty _cornerColorLowerRight;
27
+ private SerializedProperty _cornerColorLowerLeft;
28
+
29
+ private SerializedProperty _linearGradient;
30
+
31
+ private SerializedProperty _angle;
32
+
33
+ private AnimBool[] animTypeBools;
34
+
35
+ private static readonly string[] typeLabels = new string[] { "Linear", "Corner", "ComplexLinear" };
36
+
37
+ private void OnEnable()
38
+ {
39
+ _blendMode = serializedObject.FindProperty("blendMode");
40
+ _intensity = serializedObject.FindProperty("intensity");
41
+ _gradientType = serializedObject.FindProperty("gradientType");
42
+
43
+ _linearColor1 = serializedObject.FindProperty("linearColor1");
44
+ _linearColor2 = serializedObject.FindProperty("linearColor2");
45
+
46
+ _cornerColorUpperLeft = serializedObject.FindProperty("cornerColorUpperLeft");
47
+ _cornerColorUpperRight = serializedObject.FindProperty("cornerColorUpperRight");
48
+ _cornerColorLowerRight = serializedObject.FindProperty("cornerColorLowerRight");
49
+ _cornerColorLowerLeft = serializedObject.FindProperty("cornerColorLowerLeft");
50
+
51
+ _linearGradient = serializedObject.FindProperty("linearGradient");
52
+
53
+ _angle = serializedObject.FindProperty("angle");
54
+
55
+ animTypeBools = new AnimBool[typeLabels.Length];
56
+ SetAnimTypeBools(_gradientType.enumValueIndex);
57
+ }
58
+
59
+ protected void SetAnimTypeBools(int choosen)
60
+ {
61
+ for (int i = 0; i < animTypeBools.Length; i++)
62
+ {
63
+ if (animTypeBools[i] == null)
64
+ {
65
+ animTypeBools[i] = new AnimBool(choosen == i);
66
+ animTypeBools[i].valueChanged.AddListener(Repaint);
67
+ }
68
+ animTypeBools[i].target = choosen == i;
69
+ }
70
+ }
71
+
72
+ public override void OnInspectorGUI()
73
+ {
74
+ serializedObject.Update();
75
+
76
+ EditorGUILayout.Space();
77
+
78
+ EditorGUILayout.PropertyField(_blendMode);
79
+
80
+ EditorGUILayout.PropertyField(_intensity);
81
+
82
+ GradientTypeGUI();
83
+
84
+ EditorGUILayout.Space();
85
+ EditorGUILayout.PropertyField(_angle);
86
+
87
+ serializedObject.ApplyModifiedProperties();
88
+ }
89
+
90
+ void GradientTypeGUI()
91
+ {
92
+ if (_gradientType.hasMultipleDifferentValues)
93
+ {
94
+ int idx = GUILayout.Toolbar(-1, typeLabels);
95
+ if (idx != -1)
96
+ {
97
+ _gradientType.enumValueIndex = idx;
98
+ }
99
+ }
100
+ else
101
+ {
102
+ _gradientType.enumValueIndex = GUILayout.Toolbar(_gradientType.enumValueIndex, typeLabels);
103
+ SetAnimTypeBools(_gradientType.enumValueIndex);
104
+ ColorFields();
105
+ }
106
+ }
107
+
108
+ private void ColorFields()
109
+ {
110
+ EditorGUILayout.Space();
111
+ LinearColorGUI();
112
+ CornerColorGUI();
113
+ ComplexLinearGUI();
114
+ }
115
+
116
+ private void LinearColorGUI()
117
+ {
118
+ if (EditorGUILayout.BeginFadeGroup(animTypeBools[0].faded))
119
+ {
120
+ EditorGUILayout.BeginHorizontal();
121
+ {
122
+ EditorGUILayout.BeginVertical();
123
+ {
124
+ EditorGUILayout.PropertyField(_linearColor1);
125
+ EditorGUILayout.PropertyField(_linearColor2);
126
+ }
127
+ EditorGUILayout.EndVertical();
128
+
129
+ EditorGUILayout.BeginVertical(GUILayout.Width(40));
130
+ {
131
+ GUILayout.Space(8);
132
+ if (GUILayout.Button('\u2191'.ToString() + '\u2193'.ToString())) // Swap "icon"
133
+ {
134
+ SwapLinearColors();
135
+ }
136
+ }
137
+ EditorGUILayout.EndVertical();
138
+ }
139
+ EditorGUILayout.EndHorizontal();
140
+ }
141
+ EditorGUILayout.EndFadeGroup();
142
+ }
143
+
144
+ private void ComplexLinearGUI()
145
+ {
146
+ if (EditorGUILayout.BeginFadeGroup(animTypeBools[2].faded))
147
+ {
148
+ EditorGUILayout.PropertyField(_linearGradient);
149
+ }
150
+ EditorGUILayout.EndFadeGroup();
151
+ }
152
+
153
+ private void SwapLinearColors()
154
+ {
155
+ if (!_linearColor1.hasMultipleDifferentValues && !_linearColor2.hasMultipleDifferentValues)
156
+ {
157
+ Color c = _linearColor1.colorValue;
158
+ _linearColor1.colorValue = _linearColor2.colorValue;
159
+ _linearColor2.colorValue = c;
160
+ }
161
+ else
162
+ {
163
+ foreach (UIGradient item in this.targets)
164
+ {
165
+ Color c = item.LinearColor1;
166
+ item.LinearColor1 = item.LinearColor2;
167
+ item.LinearColor2 = c;
168
+
169
+ //Mesh Modification is not triggered without this -> changes not visible
170
+ item.ForceUpdateGraphic();
171
+ }
172
+ }
173
+ }
174
+
175
+ private void CornerColorGUI()
176
+ {
177
+ if (EditorGUILayout.BeginFadeGroup(animTypeBools[1].faded))
178
+ {
179
+ EditorGUI.indentLevel++;
180
+ EditorGUILayout.BeginHorizontal();
181
+ {
182
+ EditorGUILayout.BeginVertical();
183
+ {
184
+ EditorGUILayout.LabelField("Upper Left", GUILayout.MaxWidth(90));
185
+ _cornerColorUpperLeft.colorValue = EditorGUILayout.ColorField(_cornerColorUpperLeft.colorValue);
186
+ }
187
+ EditorGUILayout.EndVertical();
188
+ EditorGUILayout.BeginVertical();
189
+ {
190
+ EditorGUILayout.LabelField("Upper Right", GUILayout.MaxWidth(90));
191
+ _cornerColorUpperRight.colorValue = EditorGUILayout.ColorField(_cornerColorUpperRight.colorValue);
192
+ }
193
+ EditorGUILayout.EndVertical();
194
+ }
195
+ EditorGUILayout.EndHorizontal();
196
+ EditorGUILayout.Space();
197
+ EditorGUILayout.BeginHorizontal();
198
+ {
199
+ EditorGUILayout.BeginVertical();
200
+ {
201
+ EditorGUILayout.LabelField("Lower Left", GUILayout.MaxWidth(90));
202
+ _cornerColorLowerLeft.colorValue = EditorGUILayout.ColorField(_cornerColorLowerLeft.colorValue);
203
+ }
204
+ EditorGUILayout.EndVertical();
205
+ EditorGUILayout.BeginVertical();
206
+ {
207
+ EditorGUILayout.LabelField("Lower Right", GUILayout.MaxWidth(90));
208
+ _cornerColorLowerRight.colorValue = EditorGUILayout.ColorField(_cornerColorLowerRight.colorValue);
209
+ }
210
+ EditorGUILayout.EndVertical();
211
+ }
212
+ EditorGUILayout.EndHorizontal();
213
+ EditorGUI.indentLevel--;
214
+ }
215
+ EditorGUILayout.EndFadeGroup();
216
+ }
217
+ }
218
+ }
@@ -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: