app.hypergames.hypersdk 1.3.4 → 1.4.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.
- package/CHANGELOG.md +8 -0
- package/Editor/{HyperSDK.Editor.asmdef → Hyper.Editor.asmdef} +1 -1
- package/Editor/Resources/ControlBarPreviews/Dark/Default.png +0 -0
- package/Editor/Resources/ControlBarPreviews/Dark/Default.png.meta +143 -0
- package/Editor/Resources/ControlBarPreviews/Dark/HealthBarLeft.png +0 -0
- package/Editor/Resources/ControlBarPreviews/Dark/HealthBarLeft.png.meta +143 -0
- package/Editor/Resources/ControlBarPreviews/Dark/HeartsLeft.png +0 -0
- package/Editor/Resources/ControlBarPreviews/Dark/HeartsLeft.png.meta +169 -0
- package/Editor/Resources/ControlBarPreviews/Dark.meta +8 -0
- package/Editor/Resources/ControlBarPreviews/Light/Default.png +0 -0
- package/Editor/Resources/ControlBarPreviews/Light/Default.png.meta +143 -0
- package/Editor/Resources/ControlBarPreviews/Light/HealthBarLeft.png +0 -0
- package/Editor/Resources/ControlBarPreviews/Light/HealthBarLeft.png.meta +143 -0
- package/Editor/Resources/ControlBarPreviews/Light/HeartsLeft.png +0 -0
- package/Editor/Resources/ControlBarPreviews/Light/HeartsLeft.png.meta +143 -0
- package/Editor/Resources/ControlBarPreviews/Light.meta +8 -0
- package/Editor/Resources/ControlBarPreviews.meta +8 -0
- package/Editor/Scripts/Inspectors/HyperSDKSettingsEditor.cs +206 -0
- package/Editor/Scripts/Inspectors/HyperSDKSettingsEditor.cs.meta +2 -0
- package/Editor/Scripts/Inspectors.meta +8 -0
- package/Editor/Scripts/Windows/HyperCoreSettingsWindow.cs +0 -8
- package/Editor/Scripts/Windows/HyperGameContentWindow.cs +0 -8
- package/Editor/Scripts/Windows/HyperSettingsWindow.cs +3 -3
- package/HyperLoader.unity +4 -49
- package/Runtime/Internal/AssemblyInfo.cs +1 -1
- package/Runtime/Internal/Managers/EventManager.cs +4 -0
- package/Runtime/Internal/Managers/GameManager.cs +135 -2
- package/Runtime/Internal/ScriptableObjects/HyperSDKSettings.cs +16 -10
- package/Runtime/Internal/UI/Animation/BlinkingText.cs +1 -1
- package/Runtime/Internal/UI/Animation/HyperTween.cs +88 -0
- package/Runtime/Internal/UI/Components/ControlBar.cs +220 -40
- package/Runtime/Internal/UI/Components/HealthBarDisplay.cs +269 -0
- package/Runtime/Internal/UI/Components/HealthBarDisplay.cs.meta +2 -0
- package/Runtime/Internal/UI/Components/LivesDisplay.cs +327 -0
- package/Runtime/Internal/UI/Components/LivesDisplay.cs.meta +2 -0
- package/Runtime/Internal/UI/Modals/StartingInstructionModal.cs +202 -3
- package/Runtime/Internal/Utils/HyperConstants.cs +27 -0
- package/Runtime/Public/Core/HyperSDK.cs +68 -0
- package/Runtime/Resources/Fonts/Wonder Boys/Wonder Boys + Hyper BIG.mat +1 -1
- package/Runtime/Resources/HyperSDKSettings.asset +3 -2
- package/Runtime/Resources/Sprites/Control Bar/Ellipse 3.png +0 -0
- package/Runtime/Resources/Sprites/Control Bar/Ellipse 3.png.meta +169 -0
- package/Runtime/Resources/Sprites/Control Bar/Health Bar - Green Fill.png +0 -0
- package/Runtime/Resources/Sprites/Control Bar/Health Bar - Green Fill.png.meta +169 -0
- package/Runtime/Resources/Sprites/Control Bar/Health Bar - Underlay.png +0 -0
- package/Runtime/Resources/Sprites/Control Bar/Health Bar - Underlay.png.meta +169 -0
- package/Runtime/Resources/Sprites/Control Bar/Health Bar.png +0 -0
- package/Runtime/Resources/Sprites/Control Bar/Health Bar.png.meta +169 -0
- package/Runtime/Resources/Sprites/Control Bar/heart.empty.png +0 -0
- package/Runtime/Resources/Sprites/Control Bar/heart.empty.png.meta +169 -0
- package/Runtime/Resources/Sprites/Control Bar/heart.fill.png +0 -0
- package/Runtime/Resources/Sprites/Control Bar/heart.fill.png.meta +169 -0
- package/Runtime/Resources/Sprites/Frames/{Game Over P.png.meta → Game Over.png.meta } +4 -4
- package/Runtime/Resources/Sprites/HYPERGAMES_Logo.png.meta +3 -3
- package/Runtime/Resources/Sprites/Hyper Atlas.spriteatlasv2 +6 -0
- package/Runtime/Resources/Sprites/Start CTAs/Hand.PNG +0 -0
- package/Runtime/Resources/Sprites/Start CTAs/Hand.PNG.meta +169 -0
- package/Runtime/Resources/Sprites/Start CTAs/Line .PNG +0 -0
- package/Runtime/Resources/Sprites/Start CTAs/Line .PNG.meta +169 -0
- package/Runtime/Resources/Sprites/Start CTAs/Swipe Gesture GIF.controller +130 -0
- package/Runtime/Resources/Sprites/Start CTAs/Swipe Gesture GIF.controller.meta +8 -0
- package/Runtime/Resources/Sprites/Start CTAs/Swipe Gesture.anim +158 -0
- package/Runtime/Resources/Sprites/Start CTAs/Swipe Gesture.anim.meta +8 -0
- package/Runtime/Resources/Sprites/Start CTAs.meta +8 -0
- package/Runtime/Resources/UIPrefabs/Control Bar Objects/Health Bar Display.prefab +361 -0
- package/Runtime/Resources/UIPrefabs/Control Bar Objects/Health Bar Display.prefab.meta +7 -0
- package/Runtime/Resources/UIPrefabs/Control Bar Objects/Lives Display .prefab +246 -0
- package/Runtime/Resources/UIPrefabs/Control Bar Objects/Lives Display .prefab.meta +7 -0
- package/Runtime/Resources/UIPrefabs/Control Bar Objects.meta +8 -0
- package/Runtime/Resources/UIPrefabs/ControlBar.prefab +131 -17
- package/Runtime/Resources/UIPrefabs/StartingInstructionModal.prefab +271 -57
- package/Runtime/Resources/UIPrefabs/TutorialLandscapeModal.prefab +1 -1
- package/Runtime/Resources/UIPrefabs/TutorialPortraitModal.prefab +1 -1
- package/Runtime/Shared/DTOs/Enums.cs +22 -6
- package/package.json +1 -1
- /package/Editor/{HyperSDK.Editor.asmdef.meta → Hyper.Editor.asmdef.meta} +0 -0
- /package/Runtime/Resources/Sprites/Frames/{Game Over P.png → Game Over.png} +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 53932163501089d4998e1c09f0667321
|
|
3
|
+
TextureImporter:
|
|
4
|
+
internalIDToNameTable: []
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
serializedVersion: 13
|
|
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
|
+
flipGreenChannel: 0
|
|
24
|
+
isReadable: 0
|
|
25
|
+
streamingMipmaps: 0
|
|
26
|
+
streamingMipmapsPriority: 0
|
|
27
|
+
vTOnly: 0
|
|
28
|
+
ignoreMipmapLimit: 0
|
|
29
|
+
grayScaleToAlpha: 0
|
|
30
|
+
generateCubemap: 6
|
|
31
|
+
cubemapConvolution: 0
|
|
32
|
+
seamlessCubemap: 0
|
|
33
|
+
textureFormat: 1
|
|
34
|
+
maxTextureSize: 2048
|
|
35
|
+
textureSettings:
|
|
36
|
+
serializedVersion: 2
|
|
37
|
+
filterMode: 1
|
|
38
|
+
aniso: 1
|
|
39
|
+
mipBias: 0
|
|
40
|
+
wrapU: 1
|
|
41
|
+
wrapV: 1
|
|
42
|
+
wrapW: 1
|
|
43
|
+
nPOTScale: 0
|
|
44
|
+
lightmap: 0
|
|
45
|
+
compressionQuality: 50
|
|
46
|
+
spriteMode: 1
|
|
47
|
+
spriteExtrude: 1
|
|
48
|
+
spriteMeshType: 1
|
|
49
|
+
alignment: 0
|
|
50
|
+
spritePivot: {x: 0.5, y: 0.5}
|
|
51
|
+
spritePixelsToUnits: 100
|
|
52
|
+
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
53
|
+
spriteGenerateFallbackPhysicsShape: 1
|
|
54
|
+
alphaUsage: 1
|
|
55
|
+
alphaIsTransparency: 1
|
|
56
|
+
spriteTessellationDetail: -1
|
|
57
|
+
textureType: 8
|
|
58
|
+
textureShape: 1
|
|
59
|
+
singleChannelComponent: 0
|
|
60
|
+
flipbookRows: 1
|
|
61
|
+
flipbookColumns: 1
|
|
62
|
+
maxTextureSizeSet: 0
|
|
63
|
+
compressionQualitySet: 0
|
|
64
|
+
textureFormatSet: 0
|
|
65
|
+
ignorePngGamma: 0
|
|
66
|
+
applyGammaDecoding: 0
|
|
67
|
+
swizzle: 50462976
|
|
68
|
+
cookieLightType: 0
|
|
69
|
+
platformSettings:
|
|
70
|
+
- serializedVersion: 4
|
|
71
|
+
buildTarget: DefaultTexturePlatform
|
|
72
|
+
maxTextureSize: 512
|
|
73
|
+
resizeAlgorithm: 0
|
|
74
|
+
textureFormat: -1
|
|
75
|
+
textureCompression: 1
|
|
76
|
+
compressionQuality: 45
|
|
77
|
+
crunchedCompression: 1
|
|
78
|
+
allowsAlphaSplitting: 0
|
|
79
|
+
overridden: 0
|
|
80
|
+
ignorePlatformSupport: 0
|
|
81
|
+
androidETC2FallbackOverride: 0
|
|
82
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
83
|
+
- serializedVersion: 4
|
|
84
|
+
buildTarget: Standalone
|
|
85
|
+
maxTextureSize: 2048
|
|
86
|
+
resizeAlgorithm: 0
|
|
87
|
+
textureFormat: 12
|
|
88
|
+
textureCompression: 1
|
|
89
|
+
compressionQuality: 50
|
|
90
|
+
crunchedCompression: 0
|
|
91
|
+
allowsAlphaSplitting: 0
|
|
92
|
+
overridden: 0
|
|
93
|
+
ignorePlatformSupport: 0
|
|
94
|
+
androidETC2FallbackOverride: 0
|
|
95
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
96
|
+
- serializedVersion: 4
|
|
97
|
+
buildTarget: WebGL
|
|
98
|
+
maxTextureSize: 2048
|
|
99
|
+
resizeAlgorithm: 0
|
|
100
|
+
textureFormat: 12
|
|
101
|
+
textureCompression: 1
|
|
102
|
+
compressionQuality: 50
|
|
103
|
+
crunchedCompression: 0
|
|
104
|
+
allowsAlphaSplitting: 0
|
|
105
|
+
overridden: 0
|
|
106
|
+
ignorePlatformSupport: 0
|
|
107
|
+
androidETC2FallbackOverride: 0
|
|
108
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
109
|
+
- serializedVersion: 4
|
|
110
|
+
buildTarget: Android
|
|
111
|
+
maxTextureSize: 256
|
|
112
|
+
resizeAlgorithm: 0
|
|
113
|
+
textureFormat: -1
|
|
114
|
+
textureCompression: 0
|
|
115
|
+
compressionQuality: 50
|
|
116
|
+
crunchedCompression: 0
|
|
117
|
+
allowsAlphaSplitting: 0
|
|
118
|
+
overridden: 0
|
|
119
|
+
ignorePlatformSupport: 0
|
|
120
|
+
androidETC2FallbackOverride: 0
|
|
121
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
122
|
+
spriteSheet:
|
|
123
|
+
serializedVersion: 2
|
|
124
|
+
sprites: []
|
|
125
|
+
outline: []
|
|
126
|
+
customData:
|
|
127
|
+
physicsShape: []
|
|
128
|
+
bones: []
|
|
129
|
+
spriteID: 5e97eb03825dee720800000000000000
|
|
130
|
+
internalID: 0
|
|
131
|
+
vertices: []
|
|
132
|
+
indices:
|
|
133
|
+
edges: []
|
|
134
|
+
weights: []
|
|
135
|
+
secondaryTextures: []
|
|
136
|
+
spriteCustomMetadata:
|
|
137
|
+
entries: []
|
|
138
|
+
nameFileIdTable: {}
|
|
139
|
+
mipmapLimitGroupName:
|
|
140
|
+
pSDRemoveMatte: 0
|
|
141
|
+
userData:
|
|
142
|
+
assetBundleName:
|
|
143
|
+
assetBundleVariant:
|
|
Binary file
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 3ba286450aea7ab4cb3566b5dc136bdd
|
|
3
|
+
TextureImporter:
|
|
4
|
+
internalIDToNameTable: []
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
serializedVersion: 13
|
|
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
|
+
flipGreenChannel: 0
|
|
24
|
+
isReadable: 0
|
|
25
|
+
streamingMipmaps: 0
|
|
26
|
+
streamingMipmapsPriority: 0
|
|
27
|
+
vTOnly: 0
|
|
28
|
+
ignoreMipmapLimit: 0
|
|
29
|
+
grayScaleToAlpha: 0
|
|
30
|
+
generateCubemap: 6
|
|
31
|
+
cubemapConvolution: 0
|
|
32
|
+
seamlessCubemap: 0
|
|
33
|
+
textureFormat: 1
|
|
34
|
+
maxTextureSize: 2048
|
|
35
|
+
textureSettings:
|
|
36
|
+
serializedVersion: 2
|
|
37
|
+
filterMode: 1
|
|
38
|
+
aniso: 1
|
|
39
|
+
mipBias: 0
|
|
40
|
+
wrapU: 1
|
|
41
|
+
wrapV: 1
|
|
42
|
+
wrapW: 1
|
|
43
|
+
nPOTScale: 0
|
|
44
|
+
lightmap: 0
|
|
45
|
+
compressionQuality: 50
|
|
46
|
+
spriteMode: 1
|
|
47
|
+
spriteExtrude: 1
|
|
48
|
+
spriteMeshType: 1
|
|
49
|
+
alignment: 0
|
|
50
|
+
spritePivot: {x: 0.5, y: 0.5}
|
|
51
|
+
spritePixelsToUnits: 100
|
|
52
|
+
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
53
|
+
spriteGenerateFallbackPhysicsShape: 1
|
|
54
|
+
alphaUsage: 1
|
|
55
|
+
alphaIsTransparency: 1
|
|
56
|
+
spriteTessellationDetail: -1
|
|
57
|
+
textureType: 8
|
|
58
|
+
textureShape: 1
|
|
59
|
+
singleChannelComponent: 0
|
|
60
|
+
flipbookRows: 1
|
|
61
|
+
flipbookColumns: 1
|
|
62
|
+
maxTextureSizeSet: 0
|
|
63
|
+
compressionQualitySet: 0
|
|
64
|
+
textureFormatSet: 0
|
|
65
|
+
ignorePngGamma: 0
|
|
66
|
+
applyGammaDecoding: 0
|
|
67
|
+
swizzle: 50462976
|
|
68
|
+
cookieLightType: 0
|
|
69
|
+
platformSettings:
|
|
70
|
+
- serializedVersion: 4
|
|
71
|
+
buildTarget: DefaultTexturePlatform
|
|
72
|
+
maxTextureSize: 512
|
|
73
|
+
resizeAlgorithm: 0
|
|
74
|
+
textureFormat: -1
|
|
75
|
+
textureCompression: 1
|
|
76
|
+
compressionQuality: 45
|
|
77
|
+
crunchedCompression: 1
|
|
78
|
+
allowsAlphaSplitting: 0
|
|
79
|
+
overridden: 0
|
|
80
|
+
ignorePlatformSupport: 0
|
|
81
|
+
androidETC2FallbackOverride: 0
|
|
82
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
83
|
+
- serializedVersion: 4
|
|
84
|
+
buildTarget: Standalone
|
|
85
|
+
maxTextureSize: 2048
|
|
86
|
+
resizeAlgorithm: 0
|
|
87
|
+
textureFormat: 12
|
|
88
|
+
textureCompression: 1
|
|
89
|
+
compressionQuality: 50
|
|
90
|
+
crunchedCompression: 0
|
|
91
|
+
allowsAlphaSplitting: 0
|
|
92
|
+
overridden: 0
|
|
93
|
+
ignorePlatformSupport: 0
|
|
94
|
+
androidETC2FallbackOverride: 0
|
|
95
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
96
|
+
- serializedVersion: 4
|
|
97
|
+
buildTarget: WebGL
|
|
98
|
+
maxTextureSize: 2048
|
|
99
|
+
resizeAlgorithm: 0
|
|
100
|
+
textureFormat: 12
|
|
101
|
+
textureCompression: 1
|
|
102
|
+
compressionQuality: 50
|
|
103
|
+
crunchedCompression: 0
|
|
104
|
+
allowsAlphaSplitting: 0
|
|
105
|
+
overridden: 0
|
|
106
|
+
ignorePlatformSupport: 0
|
|
107
|
+
androidETC2FallbackOverride: 0
|
|
108
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
109
|
+
- serializedVersion: 4
|
|
110
|
+
buildTarget: Android
|
|
111
|
+
maxTextureSize: 256
|
|
112
|
+
resizeAlgorithm: 0
|
|
113
|
+
textureFormat: -1
|
|
114
|
+
textureCompression: 0
|
|
115
|
+
compressionQuality: 50
|
|
116
|
+
crunchedCompression: 0
|
|
117
|
+
allowsAlphaSplitting: 0
|
|
118
|
+
overridden: 0
|
|
119
|
+
ignorePlatformSupport: 0
|
|
120
|
+
androidETC2FallbackOverride: 0
|
|
121
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
122
|
+
spriteSheet:
|
|
123
|
+
serializedVersion: 2
|
|
124
|
+
sprites: []
|
|
125
|
+
outline: []
|
|
126
|
+
customData:
|
|
127
|
+
physicsShape: []
|
|
128
|
+
bones: []
|
|
129
|
+
spriteID: 5e97eb03825dee720800000000000000
|
|
130
|
+
internalID: 0
|
|
131
|
+
vertices: []
|
|
132
|
+
indices:
|
|
133
|
+
edges: []
|
|
134
|
+
weights: []
|
|
135
|
+
secondaryTextures: []
|
|
136
|
+
spriteCustomMetadata:
|
|
137
|
+
entries: []
|
|
138
|
+
nameFileIdTable: {}
|
|
139
|
+
mipmapLimitGroupName:
|
|
140
|
+
pSDRemoveMatte: 0
|
|
141
|
+
userData:
|
|
142
|
+
assetBundleName:
|
|
143
|
+
assetBundleVariant:
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#if UNITY_EDITOR
|
|
2
|
+
using UnityEditor;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using Hyper.Internal;
|
|
5
|
+
using Hyper.Shared;
|
|
6
|
+
|
|
7
|
+
namespace Hyper.Editor
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
/// Custom editor for HyperSDKSettings that displays a preview image based on the selected layout and theme.
|
|
11
|
+
/// </summary>
|
|
12
|
+
[CustomEditor(typeof(HyperSDKSettings))]
|
|
13
|
+
internal class HyperSDKSettingsEditor : UnityEditor.Editor
|
|
14
|
+
{
|
|
15
|
+
private Texture2D _previewTexture;
|
|
16
|
+
private string _lastLayout;
|
|
17
|
+
private string _lastTheme;
|
|
18
|
+
private GUIStyle _blandLabelStyle;
|
|
19
|
+
|
|
20
|
+
private void OnEnable()
|
|
21
|
+
{
|
|
22
|
+
UpdatePreview();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private void InitializeStyles()
|
|
26
|
+
{
|
|
27
|
+
_blandLabelStyle = new GUIStyle(EditorStyles.label) { margin = new RectOffset(0, 0, 0, 0), padding = new RectOffset(0, 0, 0, 0) };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public override void OnInspectorGUI()
|
|
31
|
+
{
|
|
32
|
+
InitializeStyles();
|
|
33
|
+
|
|
34
|
+
serializedObject.Update();
|
|
35
|
+
|
|
36
|
+
HyperSDKSettings settings = (HyperSDKSettings)target;
|
|
37
|
+
|
|
38
|
+
EditorGUILayout.BeginVertical(EditorStyles.label);
|
|
39
|
+
{
|
|
40
|
+
|
|
41
|
+
// Draw Supported Orientations
|
|
42
|
+
EditorGUILayout.LabelField("Supported Orientations", EditorStyles.boldLabel);
|
|
43
|
+
|
|
44
|
+
settings.portrait = EditorGUILayout.Toggle("Portrait", settings.portrait);
|
|
45
|
+
settings.landscape = EditorGUILayout.Toggle("Landscape", settings.landscape);
|
|
46
|
+
|
|
47
|
+
// Draw Supported Platforms
|
|
48
|
+
EditorGUILayout.Space(12);
|
|
49
|
+
EditorGUILayout.LabelField("Supported Platforms", EditorStyles.boldLabel);
|
|
50
|
+
|
|
51
|
+
settings.pc = EditorGUILayout.Toggle("PC", settings.pc);
|
|
52
|
+
settings.mobile = EditorGUILayout.Toggle("Mobile", settings.mobile);
|
|
53
|
+
|
|
54
|
+
// Draw Start CTA
|
|
55
|
+
EditorGUILayout.Space(12);
|
|
56
|
+
EditorGUILayout.LabelField("Start CTA Overlay", EditorStyles.boldLabel);
|
|
57
|
+
|
|
58
|
+
settings.startCTA = (StartCTA)EditorGUILayout.EnumPopup(
|
|
59
|
+
new GUIContent("Start CTA", "Choose how players start the game. Hyper requires one of these overlays - do not add your own start buttons."),
|
|
60
|
+
settings.startCTA);
|
|
61
|
+
|
|
62
|
+
// Draw Control Bar Settings
|
|
63
|
+
EditorGUILayout.Space(12);
|
|
64
|
+
EditorGUILayout.LabelField("Control Bar Settings", EditorStyles.boldLabel);
|
|
65
|
+
|
|
66
|
+
EditorGUILayout.Space(2);
|
|
67
|
+
|
|
68
|
+
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
|
69
|
+
{
|
|
70
|
+
EditorGUILayout.LabelField("Hearts and Health Bar require calling HyperSDK.Game.InitializeLives(..) or HyperSDK.Game.InitializeHealth(..) at runtime.",
|
|
71
|
+
EditorStyles.wordWrappedMiniLabel);
|
|
72
|
+
|
|
73
|
+
var linkStyle = new GUIStyle(EditorStyles.linkLabel)
|
|
74
|
+
{
|
|
75
|
+
fontSize = 10,
|
|
76
|
+
margin = new RectOffset(0, 0, 0, 0),
|
|
77
|
+
padding = new RectOffset(2, 2, 0, 0)
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// Link-style button
|
|
81
|
+
if (GUILayout.Button("Learn more", linkStyle))
|
|
82
|
+
{
|
|
83
|
+
Application.OpenURL("https://docs-getting-started-updates.hyper-sdk-documentation.pages.dev/sdk/modules/game.html#control-bar-lives-api-hearts-layout");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Optional: make cursor look like a link when hovering
|
|
87
|
+
var rect = GUILayoutUtility.GetLastRect();
|
|
88
|
+
EditorGUIUtility.AddCursorRect(rect, MouseCursor.Link);
|
|
89
|
+
}
|
|
90
|
+
EditorGUILayout.EndVertical();
|
|
91
|
+
|
|
92
|
+
EditorGUILayout.Space(2);
|
|
93
|
+
|
|
94
|
+
settings.controlBarLayout = (ControlBarLayout)EditorGUILayout.EnumPopup(
|
|
95
|
+
new GUIContent("Control Bar Layout", "Select the layout type for the in-game control bar."),
|
|
96
|
+
settings.controlBarLayout);
|
|
97
|
+
|
|
98
|
+
// Check if layout or theme changed and update preview
|
|
99
|
+
string currentLayout = settings.controlBarLayout.ToString();
|
|
100
|
+
string currentTheme = settings.controlBarTheme.ToString();
|
|
101
|
+
|
|
102
|
+
if (currentLayout != _lastLayout || currentTheme != _lastTheme)
|
|
103
|
+
{
|
|
104
|
+
_lastLayout = currentLayout;
|
|
105
|
+
_lastTheme = currentTheme;
|
|
106
|
+
UpdatePreview();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Draw preview image right after Control Bar Settings
|
|
110
|
+
EditorGUILayout.Space(-1f);
|
|
111
|
+
DrawPreviewImage();
|
|
112
|
+
|
|
113
|
+
EditorGUILayout.Space(12);
|
|
114
|
+
// Draw Editor Testing
|
|
115
|
+
SerializedProperty settingsProp = serializedObject.FindProperty("_settings");
|
|
116
|
+
if (settingsProp != null)
|
|
117
|
+
{
|
|
118
|
+
EditorGUILayout.PropertyField(settingsProp, new GUIContent("Settings", "Configuration settings for testing within the Unity Editor."), true);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
EditorGUILayout.EndVertical();
|
|
122
|
+
|
|
123
|
+
serializedObject.ApplyModifiedProperties();
|
|
124
|
+
|
|
125
|
+
// Mark object as dirty if any changes were made
|
|
126
|
+
if (GUI.changed)
|
|
127
|
+
{
|
|
128
|
+
EditorUtility.SetDirty(settings);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
private void UpdatePreview()
|
|
133
|
+
{
|
|
134
|
+
HyperSDKSettings settings = (HyperSDKSettings)target;
|
|
135
|
+
if (settings == null) return;
|
|
136
|
+
|
|
137
|
+
// Get the preview image path based on layout and theme
|
|
138
|
+
string imageName = GetPreviewImageName(settings.controlBarLayout);
|
|
139
|
+
string themeFolder = settings.controlBarTheme == ControlBarTheme.Dark ? "Dark" : "Light";
|
|
140
|
+
string imagePath = $"{HyperConstants.CONTROL_BAR_PREVIEW_FOLDER_PATH}/{themeFolder}/{imageName}.png";
|
|
141
|
+
|
|
142
|
+
// Load the texture
|
|
143
|
+
_previewTexture = AssetDatabase.LoadAssetAtPath<Texture2D>(imagePath);
|
|
144
|
+
|
|
145
|
+
if (_previewTexture == null)
|
|
146
|
+
{
|
|
147
|
+
Debug.LogWarning($"[HyperSDKSettingsEditor] Preview image not found at: {imagePath}");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
private string GetPreviewImageName(ControlBarLayout layout)
|
|
152
|
+
{
|
|
153
|
+
switch (layout)
|
|
154
|
+
{
|
|
155
|
+
case ControlBarLayout.Default:
|
|
156
|
+
return "Default";
|
|
157
|
+
case ControlBarLayout.HeartsLeft:
|
|
158
|
+
return "HeartsLeft";
|
|
159
|
+
case ControlBarLayout.HealthBarLeft:
|
|
160
|
+
return "HealthBarLeft";
|
|
161
|
+
default:
|
|
162
|
+
return "Default";
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
private void DrawPreviewImage()
|
|
167
|
+
{
|
|
168
|
+
if (_previewTexture == null) return;
|
|
169
|
+
|
|
170
|
+
// Draw label and preview image
|
|
171
|
+
EditorGUILayout.BeginHorizontal(_blandLabelStyle);
|
|
172
|
+
{
|
|
173
|
+
EditorGUILayout.LabelField("Control Bar Preview", _blandLabelStyle);
|
|
174
|
+
|
|
175
|
+
// Calculate preview size (maintain aspect ratio, max width 500)
|
|
176
|
+
float containterPadding = 10f;
|
|
177
|
+
float maxWidth = 320f;
|
|
178
|
+
float aspectRatio = (float)_previewTexture.height / _previewTexture.width;
|
|
179
|
+
float previewWidth = maxWidth;
|
|
180
|
+
float previewHeight = previewWidth * aspectRatio;
|
|
181
|
+
|
|
182
|
+
// Center the preview
|
|
183
|
+
Rect rect = GUILayoutUtility.GetRect(previewWidth, previewHeight, GUILayout.ExpandWidth(false));
|
|
184
|
+
rect.x = previewWidth * 0.5125f;
|
|
185
|
+
rect.y += 7.5f;
|
|
186
|
+
|
|
187
|
+
GUI.color = Color.white;
|
|
188
|
+
|
|
189
|
+
// Subtle background container
|
|
190
|
+
Color containerColor = EditorGUIUtility.isProSkin
|
|
191
|
+
? new Color(0.15f, 0.15f, 0.15f, 0.4f)
|
|
192
|
+
: new Color(0.95f, 0.95f, 0.95f, 0.6f);
|
|
193
|
+
EditorGUI.DrawRect(new Rect(rect.x - containterPadding / 2, rect.y - containterPadding / 2, rect.width + containterPadding, rect.height + containterPadding), containerColor);
|
|
194
|
+
|
|
195
|
+
GUI.color = new Color(1, 1, 1, 0.9f); // Set the color to semi-transparent white
|
|
196
|
+
|
|
197
|
+
// Draw the preview
|
|
198
|
+
GUI.DrawTexture(rect, _previewTexture, ScaleMode.ScaleToFit);
|
|
199
|
+
GUI.color = Color.white; // Reset the color
|
|
200
|
+
}
|
|
201
|
+
EditorGUILayout.EndHorizontal();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
#endif
|
|
206
|
+
|
|
@@ -21,14 +21,6 @@ namespace Hyper.Editor
|
|
|
21
21
|
|
|
22
22
|
#endregion
|
|
23
23
|
|
|
24
|
-
#region Window Configuration
|
|
25
|
-
|
|
26
|
-
private const string WINDOW_TITLE = "Core Settings";
|
|
27
|
-
private static readonly Vector2 MIN_WINDOW_SIZE = new Vector2(550, 490);
|
|
28
|
-
private static readonly Vector2 MAX_WINDOW_SIZE = new Vector2(550, 500);
|
|
29
|
-
|
|
30
|
-
#endregion
|
|
31
|
-
|
|
32
24
|
#region Menu Items
|
|
33
25
|
|
|
34
26
|
[MenuItem("Hyper/Settings/Core", false, 400)]
|
|
@@ -19,14 +19,6 @@ namespace Hyper.Editor
|
|
|
19
19
|
|
|
20
20
|
#endregion
|
|
21
21
|
|
|
22
|
-
#region Window Configuration
|
|
23
|
-
|
|
24
|
-
private const string WINDOW_TITLE = "Game Content";
|
|
25
|
-
private static readonly Vector2 MIN_WINDOW_SIZE = new Vector2(550, 320);
|
|
26
|
-
private static readonly Vector2 MAX_WINDOW_SIZE = new Vector2(550, 350);
|
|
27
|
-
|
|
28
|
-
#endregion
|
|
29
|
-
|
|
30
22
|
#region Menu Item
|
|
31
23
|
|
|
32
24
|
[MenuItem("Hyper/Settings/Game Content" , false, 401)]
|
|
@@ -35,8 +35,8 @@ namespace Hyper.Editor
|
|
|
35
35
|
#region Window Configuration
|
|
36
36
|
|
|
37
37
|
private const string WINDOW_TITLE = "HyperSDK Settings";
|
|
38
|
-
private static readonly Vector2 MIN_WINDOW_SIZE = new Vector2(600,
|
|
39
|
-
private static readonly Vector2 MAX_WINDOW_SIZE = new Vector2(
|
|
38
|
+
private static readonly Vector2 MIN_WINDOW_SIZE = new Vector2(600, 660);
|
|
39
|
+
private static readonly Vector2 MAX_WINDOW_SIZE = new Vector2(601, 700);
|
|
40
40
|
|
|
41
41
|
#endregion
|
|
42
42
|
|
|
@@ -205,7 +205,7 @@ namespace Hyper.Editor
|
|
|
205
205
|
EditorGUILayout.Space(4);
|
|
206
206
|
|
|
207
207
|
EditorGUILayout.HelpBox(
|
|
208
|
-
"Configure
|
|
208
|
+
"Configure platforms, orientations, start CTA, control bar layout, and editor simulation settings.",
|
|
209
209
|
MessageType.Info);
|
|
210
210
|
|
|
211
211
|
EditorGUILayout.Space(8);
|
package/HyperLoader.unity
CHANGED
|
@@ -304,7 +304,7 @@ RectTransform:
|
|
|
304
304
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
305
305
|
m_AnchorMin: {x: 0, y: 1}
|
|
306
306
|
m_AnchorMax: {x: 0, y: 1}
|
|
307
|
-
m_AnchoredPosition: {x:
|
|
307
|
+
m_AnchoredPosition: {x: 509.1169, y: -280.1698}
|
|
308
308
|
m_SizeDelta: {x: 1044.9, y: 239.347}
|
|
309
309
|
m_Pivot: {x: 0.5, y: 0.5}
|
|
310
310
|
--- !u!114 &751153944
|
|
@@ -461,7 +461,6 @@ GameObject:
|
|
|
461
461
|
m_Component:
|
|
462
462
|
- component: {fileID: 894728866}
|
|
463
463
|
- component: {fileID: 894728865}
|
|
464
|
-
- component: {fileID: 894728867}
|
|
465
464
|
m_Layer: 0
|
|
466
465
|
m_Name: Main Camera
|
|
467
466
|
m_TagString: MainCamera
|
|
@@ -513,8 +512,8 @@ Camera:
|
|
|
513
512
|
m_TargetTexture: {fileID: 0}
|
|
514
513
|
m_TargetDisplay: 0
|
|
515
514
|
m_TargetEye: 3
|
|
516
|
-
m_HDR:
|
|
517
|
-
m_AllowMSAA:
|
|
515
|
+
m_HDR: 0
|
|
516
|
+
m_AllowMSAA: 0
|
|
518
517
|
m_AllowDynamicResolution: 0
|
|
519
518
|
m_ForceIntoRT: 0
|
|
520
519
|
m_OcclusionCulling: 1
|
|
@@ -536,50 +535,6 @@ Transform:
|
|
|
536
535
|
- {fileID: 1064166296}
|
|
537
536
|
m_Father: {fileID: 446519529}
|
|
538
537
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
539
|
-
--- !u!114 &894728867
|
|
540
|
-
MonoBehaviour:
|
|
541
|
-
m_ObjectHideFlags: 0
|
|
542
|
-
m_CorrespondingSourceObject: {fileID: 0}
|
|
543
|
-
m_PrefabInstance: {fileID: 0}
|
|
544
|
-
m_PrefabAsset: {fileID: 0}
|
|
545
|
-
m_GameObject: {fileID: 894728863}
|
|
546
|
-
m_Enabled: 1
|
|
547
|
-
m_EditorHideFlags: 0
|
|
548
|
-
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
|
549
|
-
m_Name:
|
|
550
|
-
m_EditorClassIdentifier:
|
|
551
|
-
m_RenderShadows: 1
|
|
552
|
-
m_RequiresDepthTextureOption: 2
|
|
553
|
-
m_RequiresOpaqueTextureOption: 2
|
|
554
|
-
m_CameraType: 0
|
|
555
|
-
m_Cameras: []
|
|
556
|
-
m_RendererIndex: -1
|
|
557
|
-
m_VolumeLayerMask:
|
|
558
|
-
serializedVersion: 2
|
|
559
|
-
m_Bits: 1
|
|
560
|
-
m_VolumeTrigger: {fileID: 0}
|
|
561
|
-
m_VolumeFrameworkUpdateModeOption: 2
|
|
562
|
-
m_RenderPostProcessing: 0
|
|
563
|
-
m_Antialiasing: 0
|
|
564
|
-
m_AntialiasingQuality: 2
|
|
565
|
-
m_StopNaN: 0
|
|
566
|
-
m_Dithering: 0
|
|
567
|
-
m_ClearDepth: 1
|
|
568
|
-
m_AllowXRRendering: 1
|
|
569
|
-
m_AllowHDROutput: 1
|
|
570
|
-
m_UseScreenCoordOverride: 0
|
|
571
|
-
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
|
572
|
-
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
|
573
|
-
m_RequiresDepthTexture: 0
|
|
574
|
-
m_RequiresColorTexture: 0
|
|
575
|
-
m_Version: 2
|
|
576
|
-
m_TaaSettings:
|
|
577
|
-
m_Quality: 3
|
|
578
|
-
m_FrameInfluence: 0.1
|
|
579
|
-
m_JitterScale: 1
|
|
580
|
-
m_MipBias: 0
|
|
581
|
-
m_VarianceClampScale: 0.9
|
|
582
|
-
m_ContrastAdaptiveSharpening: 0
|
|
583
538
|
--- !u!1 &928973802
|
|
584
539
|
GameObject:
|
|
585
540
|
m_ObjectHideFlags: 0
|
|
@@ -1137,7 +1092,7 @@ RectTransform:
|
|
|
1137
1092
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
1138
1093
|
m_AnchorMin: {x: 0, y: 1}
|
|
1139
1094
|
m_AnchorMax: {x: 0, y: 1}
|
|
1140
|
-
m_AnchoredPosition: {x:
|
|
1095
|
+
m_AnchoredPosition: {x: 509.1169, y: -133.2274}
|
|
1141
1096
|
m_SizeDelta: {x: 875, y: 54.5378}
|
|
1142
1097
|
m_Pivot: {x: 0.5, y: 0.5}
|
|
1143
1098
|
--- !u!1 &2874543288936963705
|
|
@@ -27,6 +27,8 @@ namespace Hyper.Internal.Managers
|
|
|
27
27
|
public event Action OnTimeUp;
|
|
28
28
|
public event Action OnGameStart;
|
|
29
29
|
public event Action OnGameEnded;
|
|
30
|
+
public event Action OnLivesExhausted;
|
|
31
|
+
public event Action OnHealthExhausted;
|
|
30
32
|
|
|
31
33
|
#endregion
|
|
32
34
|
|
|
@@ -56,6 +58,8 @@ namespace Hyper.Internal.Managers
|
|
|
56
58
|
internal void InvokeStartDeadlineReachedEvent() => OnStartDeadlineReached?.Invoke();
|
|
57
59
|
internal void InvokeGameStartEvent() => OnGameStart?.Invoke();
|
|
58
60
|
internal void InvokeGameEndedEvent() => OnGameEnded?.Invoke();
|
|
61
|
+
internal void InvokeLivesExhaustedEvent() => OnLivesExhausted?.Invoke();
|
|
62
|
+
internal void InvokeHealthExhaustedEvent() => OnHealthExhausted?.Invoke();
|
|
59
63
|
internal void InvokeConnectionLostEvent() => OnInternetConnectionLost?.Invoke();
|
|
60
64
|
internal void InvokeConnectionFoundEvent() => OnInternetConnectionFound?.Invoke();
|
|
61
65
|
internal void InvokeTutorialLoadingCompleteEvent() => OnTutorialLoadingComplete?.Invoke();
|