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.
- package/README.md +5 -1
- package/Runtime/Common/AudioMixer.mixer +146 -0
- package/Runtime/Common/AudioMixer.mixer.meta +8 -0
- package/Runtime/Common.meta +8 -0
- package/Runtime/Plugins/SlicedFilledImage.cs +730 -0
- package/Runtime/Plugins/SlicedFilledImage.cs.meta +11 -0
- package/Runtime/Plugins/UIGradient/Editor/UIGradientEditor.cs +218 -0
- package/Runtime/Plugins/UIGradient/Editor/UIGradientEditor.cs.meta +11 -0
- package/Runtime/Plugins/UIGradient/Editor/uigradient_inspector_icon.png +0 -0
- package/Runtime/Plugins/UIGradient/Editor/uigradient_inspector_icon.png.meta +110 -0
- package/Runtime/Plugins/UIGradient/Editor.meta +8 -0
- package/Runtime/Plugins/UIGradient/Scripts/UIGradient.cs +511 -0
- package/Runtime/Plugins/UIGradient/Scripts/UIGradient.cs.meta +11 -0
- package/Runtime/Plugins/UIGradient/Scripts/Vector2Extension.cs +24 -0
- package/Runtime/Plugins/UIGradient/Scripts/Vector2Extension.cs.meta +11 -0
- package/Runtime/Plugins/UIGradient/Scripts.meta +8 -0
- package/Runtime/Plugins/UIGradient.meta +8 -0
- package/Runtime/Plugins/Vibration/Vibration/Example/VibrationExample.cs +82 -0
- package/Runtime/Plugins/Vibration/Vibration/Example/VibrationExample.cs.meta +11 -0
- package/Runtime/Plugins/Vibration/Vibration/Example.meta +8 -0
- package/Runtime/Plugins/Vibration/Vibration/Vibration.cs +263 -0
- package/Runtime/Plugins/Vibration/Vibration/Vibration.cs.meta +12 -0
- package/Runtime/Plugins/Vibration/Vibration.asmdef +18 -0
- package/Runtime/Plugins/Vibration/Vibration.asmdef.meta +7 -0
- package/Runtime/Plugins/Vibration/Vibration.meta +8 -0
- package/Runtime/Plugins/Vibration/iOS/HapticFeedback.mm +64 -0
- package/Runtime/Plugins/Vibration/iOS/HapticFeedback.mm.meta +37 -0
- package/Runtime/Plugins/Vibration/iOS/Vibration.h +26 -0
- package/Runtime/Plugins/Vibration/iOS/Vibration.h.meta +27 -0
- package/Runtime/Plugins/Vibration/iOS/Vibration.mm +73 -0
- package/Runtime/Plugins/Vibration/iOS/Vibration.mm.meta +37 -0
- package/Runtime/Plugins/Vibration/iOS.meta +8 -0
- package/Runtime/Plugins/Vibration.meta +8 -0
- package/Runtime/Plugins.meta +8 -0
- package/Runtime/PuzzlescapeGames.Services.asmdef +20 -0
- package/Runtime/PuzzlescapeGames.Services.asmdef.meta +7 -0
- package/Runtime/Services/AudioService/AudioService.cs +82 -0
- package/Runtime/Services/AudioService/AudioService.cs.meta +3 -0
- package/Runtime/Services/AudioService/AudioServiceCustomInstaller.cs +29 -0
- package/Runtime/Services/AudioService/AudioServiceCustomInstaller.cs.meta +3 -0
- package/Runtime/Services/AudioService/AudioSource.cs +87 -0
- package/Runtime/Services/AudioService/AudioSource.cs.meta +3 -0
- package/Runtime/Services/AudioService/AudioSourceFactory.cs +6 -0
- package/Runtime/Services/AudioService/AudioSourceFactory.cs.meta +3 -0
- package/Runtime/Services/AudioService/IAudioService.cs +16 -0
- package/Runtime/Services/AudioService/IAudioService.cs.meta +3 -0
- package/Runtime/Services/AudioService.meta +8 -0
- package/Runtime/Services/NTPService/INTPService.cs +13 -0
- package/Runtime/Services/NTPService/INTPService.cs.meta +3 -0
- package/Runtime/Services/NTPService/NTPService.cs +153 -0
- package/Runtime/Services/NTPService/NTPService.cs.meta +3 -0
- package/Runtime/Services/NTPService/NTPServiceInstaller.cs +12 -0
- package/Runtime/Services/NTPService/NTPServiceInstaller.cs.meta +3 -0
- package/Runtime/Services/NTPService.meta +8 -0
- package/Runtime/Services/TickableService/TickableService.cs +29 -0
- package/Runtime/Services/TickableService/TickableService.cs.meta +3 -0
- package/Runtime/Services/TickableService/TickableServiceInstaller.cs +12 -0
- package/Runtime/Services/TickableService/TickableServiceInstaller.cs.meta +3 -0
- package/Runtime/Services/TickableService.meta +8 -0
- package/Runtime/Services/UIBlockingService/UIBlocker.cs +15 -0
- package/Runtime/Services/UIBlockingService/UIBlocker.cs.meta +3 -0
- package/Runtime/Services/UIBlockingService/UIBlockingService.cs +36 -0
- package/Runtime/Services/UIBlockingService/UIBlockingService.cs.meta +3 -0
- package/Runtime/Services/UIBlockingService/UIBlockingServiceInstaller.cs +17 -0
- package/Runtime/Services/UIBlockingService/UIBlockingServiceInstaller.cs.meta +3 -0
- package/Runtime/Services/UIBlockingService.meta +8 -0
- package/Runtime/Services/VibrationService/IVibrationService.cs +7 -0
- package/Runtime/Services/VibrationService/IVibrationService.cs.meta +3 -0
- package/Runtime/Services/VibrationService/VibrationService.cs +19 -0
- package/Runtime/Services/VibrationService/VibrationService.cs.meta +3 -0
- package/Runtime/Services/VibrationService/VibrationServiceInstaller.cs +12 -0
- package/Runtime/Services/VibrationService/VibrationServiceInstaller.cs.meta +3 -0
- package/Runtime/Services/VibrationService.meta +8 -0
- package/Runtime/Services.meta +8 -0
- package/package.json +1 -1
|
@@ -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
|
+
}
|
|
Binary file
|
|
@@ -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:
|