Compare commits
12 Commits
197b7895e1
...
revamp_puz
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50448c5bd3 | ||
|
|
df604fbc03 | ||
|
|
47f342b9ae | ||
|
|
5e790a2438 | ||
| 3b1c977a2e | |||
| 5dd9986faa | |||
|
|
cc6e89c003 | ||
|
|
10aef4d083 | ||
|
|
3cae365b52 | ||
|
|
2b2ac9a3dd | ||
| dcd8dc63d0 | |||
| 5f46c963b5 |
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: 6f3207429a65b3e4b83935ac19791077
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
Hash: 8453796ea514a8db40e72d511ee4981c
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
|
||||
@@ -14,7 +14,17 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_GroupName: Default Local Group
|
||||
m_GUID: 6f3207429a65b3e4b83935ac19791077
|
||||
m_SerializeEntries: []
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 1a9d24004b795e147b8544845a7a9ae3
|
||||
m_Address: Puzzles/Testing
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d28c589c05c122f449a8b34e696cda53
|
||||
m_Address: Puzzles/Quarry
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 11da9bb90d9dd5848b4f7629415a6937, type: 2}
|
||||
m_SchemaSet:
|
||||
|
||||
@@ -147,12 +147,12 @@ TextureImporter:
|
||||
name: GrassPatch0083_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 115
|
||||
y: 1552
|
||||
width: 253
|
||||
height: 151
|
||||
x: 0
|
||||
y: 0
|
||||
width: 3840
|
||||
height: 2160
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -169,12 +169,12 @@ TextureImporter:
|
||||
name: GrassPatch0083_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 145
|
||||
y: 226
|
||||
width: 3335
|
||||
height: 1884
|
||||
x: 0
|
||||
y: 0
|
||||
width: 3840
|
||||
height: 2160
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -196,7 +196,7 @@ TextureImporter:
|
||||
width: 319
|
||||
height: 190
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -218,7 +218,7 @@ TextureImporter:
|
||||
width: 246
|
||||
height: 144
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -240,7 +240,7 @@ TextureImporter:
|
||||
width: 211
|
||||
height: 117
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -262,7 +262,7 @@ TextureImporter:
|
||||
width: 319
|
||||
height: 171
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -284,7 +284,7 @@ TextureImporter:
|
||||
width: 246
|
||||
height: 144
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -301,7 +301,7 @@ TextureImporter:
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
spriteID: bc86f6a2f58cad246ab3fa70c1c38032
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: GrassPatch0083
|
||||
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AlphaTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 40958ea66f211ab4ea28178684593ae4, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- PixelSnap: 0
|
||||
- _EnableExternalAlpha: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbb3ada0b3bbee04f8e0643a2a936a9b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Sprites/Spritesheets/Quarry/Van/VanHorn.png
Normal file
BIN
Assets/Art/Sprites/Spritesheets/Quarry/Van/VanHorn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
156
Assets/Art/Sprites/Spritesheets/Quarry/Van/VanHorn.png.meta
Normal file
156
Assets/Art/Sprites/Spritesheets/Quarry/Van/VanHorn.png.meta
Normal file
@@ -0,0 +1,156 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 668c87ebe73766b4db3e746ff563ad69
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 844622183060740761
|
||||
second: VanHorn_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: VanHorn_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 6
|
||||
y: 5
|
||||
width: 1014
|
||||
height: 560
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 99a10c68663b8bb00800000000000000
|
||||
internalID: 844622183060740761
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 139ed722a885930418cf53c13f07ee08
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
VanHorn_0: 844622183060740761
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Art/UI/Tutorial.meta
Normal file
8
Assets/Art/UI/Tutorial.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70d5cb65eed0ca344a20e71fd4cfa86f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Art/UI/Tutorial/Animations.meta
Normal file
8
Assets/Art/UI/Tutorial/Animations.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34b91b32be4f1614f85f8a5c88c6d660
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9124
Assets/Art/UI/Tutorial/Animations/UIANIM_Tutorial1.anim
Normal file
9124
Assets/Art/UI/Tutorial/Animations/UIANIM_Tutorial1.anim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d475a884109740d4c93f40c4d31a8875
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
4852
Assets/Art/UI/Tutorial/Animations/UIANIM_Tutorial2.anim
Normal file
4852
Assets/Art/UI/Tutorial/Animations/UIANIM_Tutorial2.anim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca8f8ac4d70cc9d49957fd0b13ffda9e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/UI/Tutorial/Arrow.png
Normal file
BIN
Assets/Art/UI/Tutorial/Arrow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
182
Assets/Art/UI/Tutorial/Arrow.png.meta
Normal file
182
Assets/Art/UI/Tutorial/Arrow.png.meta
Normal file
@@ -0,0 +1,182 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b5d036a9fa30484e911f4752e3a64c8
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -4346244404228752641
|
||||
second: Arrow_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Arrow_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 161
|
||||
height: 308
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: ffa7ae2edb90fa3c0800000000000000
|
||||
internalID: -4346244404228752641
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Arrow_0: -4346244404228752641
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/UI/Tutorial/Finger.png
Normal file
BIN
Assets/Art/UI/Tutorial/Finger.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
182
Assets/Art/UI/Tutorial/Finger.png.meta
Normal file
182
Assets/Art/UI/Tutorial/Finger.png.meta
Normal file
@@ -0,0 +1,182 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fee60c82a4f504419e535456268a19e
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -7164639588303836088
|
||||
second: Finger_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Finger_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 316
|
||||
height: 246
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 84ce27b1146129c90800000000000000
|
||||
internalID: -7164639588303836088
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Finger_0: -7164639588303836088
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/UI/Tutorial/HUD.png
Normal file
BIN
Assets/Art/UI/Tutorial/HUD.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
182
Assets/Art/UI/Tutorial/HUD.png.meta
Normal file
182
Assets/Art/UI/Tutorial/HUD.png.meta
Normal file
@@ -0,0 +1,182 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfff7425eb5869d49b7dbfbe9dab3af1
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -6869325624984279803
|
||||
second: HUD_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: HUD_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 976
|
||||
height: 650
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 505e2544db04ba0a0800000000000000
|
||||
internalID: -6869325624984279803
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
HUD_0: -6869325624984279803
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/UI/Tutorial/Impact.png
Normal file
BIN
Assets/Art/UI/Tutorial/Impact.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
203
Assets/Art/UI/Tutorial/Impact.png.meta
Normal file
203
Assets/Art/UI/Tutorial/Impact.png.meta
Normal file
@@ -0,0 +1,203 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba7c7163571103f49b86ceb15c8a1e8f
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 5838690487585382102
|
||||
second: Impact_0
|
||||
- first:
|
||||
213: 2912065134375024089
|
||||
second: Impact_1
|
||||
- first:
|
||||
213: 2149313183507242163
|
||||
second: Impact_2
|
||||
- first:
|
||||
213: -2666882680432870540
|
||||
second: Impact_3
|
||||
- first:
|
||||
213: -7769254484576812942
|
||||
second: Impact_4
|
||||
- first:
|
||||
213: -5623080056597879961
|
||||
second: Impact_5
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Impact_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 138
|
||||
height: 111
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 6de9af15012370150800000000000000
|
||||
internalID: 5838690487585382102
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 1e87fe12fda7bb140b234257fbf6f67c
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Impact_0: 5838690487585382102
|
||||
Impact_1: 2912065134375024089
|
||||
Impact_2: 2149313183507242163
|
||||
Impact_3: -2666882680432870540
|
||||
Impact_4: -7769254484576812942
|
||||
Impact_5: -5623080056597879961
|
||||
Impact_6: 499494798
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -17,4 +17,4 @@ MonoBehaviour:
|
||||
description: Avoid the gaze of the picnic lovers and steal their loot.
|
||||
icon: {fileID: 0}
|
||||
unlocks:
|
||||
- {fileID: 0}
|
||||
- {fileID: 11400000, guid: d0851a7610551104fa285c0748549d90, type: 2}
|
||||
|
||||
8
Assets/Data/Puzzles/Quarry.meta
Normal file
8
Assets/Data/Puzzles/Quarry.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a17ef190d30246143a8f7a83591f2c1f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -13,7 +13,7 @@ MonoBehaviour:
|
||||
m_Name: LureWolter
|
||||
m_EditorClassIdentifier:
|
||||
stepId: LureWolter
|
||||
displayName: Wolter Lured!
|
||||
displayName: Wolter Lured!!
|
||||
description: Place Chocolate in the luring spot.
|
||||
icon: {fileID: 0}
|
||||
unlocks:
|
||||
@@ -0,0 +1,20 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 84e39aac66cf4a10a89abc01b04b13af, type: 3}
|
||||
m_Name: PickChocolate
|
||||
m_EditorClassIdentifier:
|
||||
stepId: PickChocolate
|
||||
displayName: Picked Up Chocolate!
|
||||
description: Avoid the gaze of the picnic lovers and steal their loot.
|
||||
icon: {fileID: 0}
|
||||
unlocks:
|
||||
- {fileID: 11400000, guid: d0851a7610551104fa285c0748549d90, type: 2}
|
||||
31
Assets/Data/Puzzles/Quarry/Quarry.asset
Normal file
31
Assets/Data/Puzzles/Quarry/Quarry.asset
Normal file
@@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0a79780a5a0d498084afd737d4515e3b, type: 3}
|
||||
m_Name: Quarry
|
||||
m_EditorClassIdentifier: AppleHillsScripts::PuzzleS.PuzzleLevelDataSO
|
||||
levelId: Quarry
|
||||
displayName: Quarry
|
||||
allSteps:
|
||||
- {fileID: 11400000, guid: d0851a7610551104fa285c0748549d90, type: 2}
|
||||
- {fileID: 11400000, guid: ed967c44f3a8b914aabc1539f774efc7, type: 2}
|
||||
- {fileID: 11400000, guid: 8ac614a698631554ab8ac39aed04a189, type: 2}
|
||||
- {fileID: 11400000, guid: 6386246caab8faa40b2da221d9ab9b8a, type: 2}
|
||||
- {fileID: 11400000, guid: 0fb0ab2b55d93a24685e9f6651adcf30, type: 2}
|
||||
- {fileID: 11400000, guid: ea383d1dee861f54c9a1d4f32a2f6afc, type: 2}
|
||||
- {fileID: 11400000, guid: f9da68caaae2a244885a13cf2e2e45c0, type: 2}
|
||||
- {fileID: 11400000, guid: 28848561ff31fe24ea9f8590dee0bf8f, type: 2}
|
||||
- {fileID: 11400000, guid: 5700dd3bf16fa9e4aa9905379118d1bd, type: 2}
|
||||
- {fileID: 11400000, guid: 37409d749a15970438d761d1d658d7a6, type: 2}
|
||||
initialSteps:
|
||||
- {fileID: 11400000, guid: ed967c44f3a8b914aabc1539f774efc7, type: 2}
|
||||
- {fileID: 11400000, guid: 8ac614a698631554ab8ac39aed04a189, type: 2}
|
||||
- {fileID: 11400000, guid: ea383d1dee861f54c9a1d4f32a2f6afc, type: 2}
|
||||
8
Assets/Data/Puzzles/Quarry/Quarry.asset.meta
Normal file
8
Assets/Data/Puzzles/Quarry/Quarry.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d28c589c05c122f449a8b34e696cda53
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 84e39aac66cf4a10a89abc01b04b13af, type: 3}
|
||||
m_Name: HeadbandPickup
|
||||
m_EditorClassIdentifier:
|
||||
stepId: HeadBandPickup
|
||||
displayName: Picked up Headband!
|
||||
description: Once Wolter jumps out of the bushes, the headband is interactable.
|
||||
icon: {fileID: 0}
|
||||
unlocks:
|
||||
- {fileID: 11400000, guid: 37409d749a15970438d761d1d658d7a6, type: 2}
|
||||
@@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 84e39aac66cf4a10a89abc01b04b13af, type: 3}
|
||||
m_Name: SoundBirdDeafen
|
||||
m_EditorClassIdentifier:
|
||||
stepId: Deafen Bird
|
||||
displayName: Deaf SoundBird
|
||||
description: sds
|
||||
icon: {fileID: 0}
|
||||
unlocks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37409d749a15970438d761d1d658d7a6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -16,4 +16,5 @@ MonoBehaviour:
|
||||
displayName: Picked up Headband!
|
||||
description: Once Wolter jumps out of the bushes, the headband is interactable.
|
||||
icon: {fileID: 0}
|
||||
unlocks: []
|
||||
unlocks:
|
||||
- {fileID: 11400000, guid: 9c10f3091037ee4489cc15d0a91559f5, type: 2}
|
||||
|
||||
19
Assets/Data/Puzzles/SoundBirdPuzzle/SoundBirdDeafening.asset
Normal file
19
Assets/Data/Puzzles/SoundBirdPuzzle/SoundBirdDeafening.asset
Normal file
@@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 84e39aac66cf4a10a89abc01b04b13af, type: 3}
|
||||
m_Name: SoundBirdDeafening
|
||||
m_EditorClassIdentifier:
|
||||
stepId: SoundBirdDeaf
|
||||
displayName: Soundbird is Deaf
|
||||
description: Make sure the SoundBird Cannot hear
|
||||
icon: {fileID: 0}
|
||||
unlocks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c10f3091037ee4489cc15d0a91559f5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Data/Puzzles/Testing.meta
Normal file
8
Assets/Data/Puzzles/Testing.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9958845b52d0d7468c9c36a6969e9ea
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/Data/Puzzles/Testing/Testing.asset
Normal file
24
Assets/Data/Puzzles/Testing/Testing.asset
Normal file
@@ -0,0 +1,24 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0a79780a5a0d498084afd737d4515e3b, type: 3}
|
||||
m_Name: Testing
|
||||
m_EditorClassIdentifier: AppleHillsScripts::PuzzleS.PuzzleLevelDataSO
|
||||
levelId: Testing
|
||||
displayName: Testing
|
||||
allSteps:
|
||||
- {fileID: 11400000, guid: 0b13ff4f31443b74281b13e0eef865c2, type: 2}
|
||||
- {fileID: 11400000, guid: a84cbe9804e13f74e857c55d90cc10d1, type: 2}
|
||||
- {fileID: 11400000, guid: 13b0c411066f85a41ba40c3bbbc281ed, type: 2}
|
||||
- {fileID: 11400000, guid: 9de0c57af6191384e96e2ba7c04a3d0d, type: 2}
|
||||
initialSteps:
|
||||
- {fileID: 11400000, guid: 0b13ff4f31443b74281b13e0eef865c2, type: 2}
|
||||
- {fileID: 11400000, guid: a84cbe9804e13f74e857c55d90cc10d1, type: 2}
|
||||
8
Assets/Data/Puzzles/Testing/Testing.asset.meta
Normal file
8
Assets/Data/Puzzles/Testing/Testing.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a9d24004b795e147b8544845a7a9ae3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
321
Assets/Editor/PuzzleAssetProcessor.cs
Normal file
321
Assets/Editor/PuzzleAssetProcessor.cs
Normal file
@@ -0,0 +1,321 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEditor.AddressableAssets;
|
||||
using UnityEditor.AddressableAssets.Settings;
|
||||
|
||||
namespace PuzzleS.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles asset post-processing for puzzle step data.
|
||||
/// Automatically builds level data from folder structure.
|
||||
/// </summary>
|
||||
public class PuzzleAssetProcessor : AssetPostprocessor
|
||||
{
|
||||
// Base path for puzzle data
|
||||
private const string PuzzleDataBasePath = "Assets/Data/Puzzles";
|
||||
|
||||
/// <summary>
|
||||
/// Called after assets have been imported, deleted, or moved.
|
||||
/// </summary>
|
||||
private static void OnPostprocessAllAssets(
|
||||
string[] importedAssets,
|
||||
string[] deletedAssets,
|
||||
string[] movedAssets,
|
||||
string[] movedFromAssetPaths)
|
||||
{
|
||||
bool puzzleAssetsChanged = false;
|
||||
|
||||
// Check for changes to puzzle step assets
|
||||
foreach (string assetPath in importedAssets.Concat(movedAssets))
|
||||
{
|
||||
if (IsPuzzleAssetPath(assetPath) && Path.GetExtension(assetPath) == ".asset")
|
||||
{
|
||||
var asset = AssetDatabase.LoadAssetAtPath<ScriptableObject>(assetPath);
|
||||
|
||||
if (asset is PuzzleStepSO)
|
||||
{
|
||||
// Find which level this step belongs to
|
||||
string assetDir = Path.GetDirectoryName(assetPath);
|
||||
string levelFolderPath = FindLevelFolder(assetDir);
|
||||
|
||||
if (!string.IsNullOrEmpty(levelFolderPath))
|
||||
{
|
||||
ProcessPuzzleLevelFolder(levelFolderPath);
|
||||
puzzleAssetsChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check for changes to puzzle folder structure
|
||||
foreach (string assetPath in deletedAssets.Concat(movedFromAssetPaths))
|
||||
{
|
||||
if (IsPuzzleAssetPath(assetPath))
|
||||
{
|
||||
// Extract parent folders for processing
|
||||
string assetDir = Path.GetDirectoryName(assetPath);
|
||||
string levelFolderPath = FindLevelFolder(assetDir);
|
||||
|
||||
if (!string.IsNullOrEmpty(levelFolderPath) && Directory.Exists(levelFolderPath))
|
||||
{
|
||||
ProcessPuzzleLevelFolder(levelFolderPath);
|
||||
puzzleAssetsChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (puzzleAssetsChanged)
|
||||
{
|
||||
// Make sure changes are saved
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Debug.Log("[PuzzleProcessor] Puzzle data processing complete");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if an asset path is within the puzzle data folder structure
|
||||
/// </summary>
|
||||
private static bool IsPuzzleAssetPath(string assetPath)
|
||||
{
|
||||
// Unity's AssetDatabase always uses forward slashes, so we need to normalize for comparison
|
||||
string normalizedPath = assetPath.Replace('\\', '/');
|
||||
string normalizedBasePath = PuzzleDataBasePath;
|
||||
|
||||
return normalizedPath.StartsWith(normalizedBasePath) &&
|
||||
!normalizedPath.Contains("/.") && // Skip hidden folders
|
||||
!Path.GetExtension(normalizedPath).Equals(".meta");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find the level folder that contains this asset path
|
||||
/// Assumes level folders are direct children of PuzzleDataBasePath
|
||||
/// </summary>
|
||||
private static string FindLevelFolder(string assetPath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(assetPath)) return null;
|
||||
|
||||
// Unity's AssetDatabase always uses forward slashes
|
||||
string normalizedPath = assetPath.Replace('\\', '/');
|
||||
|
||||
if (!normalizedPath.StartsWith(PuzzleDataBasePath))
|
||||
return null;
|
||||
|
||||
// Get the relative path from the base path
|
||||
string relativePath = normalizedPath.Substring(PuzzleDataBasePath.Length);
|
||||
if (relativePath.StartsWith("/"))
|
||||
relativePath = relativePath.Substring(1);
|
||||
|
||||
// Split into path components and get the first folder (level name)
|
||||
string[] pathComponents = relativePath.Split('/');
|
||||
|
||||
// First component after PuzzleDataBasePath should be the level name
|
||||
if (pathComponents.Length > 0)
|
||||
{
|
||||
// Use proper path joining with Unity's forward slash convention
|
||||
return PuzzleDataBasePath + "/" + pathComponents[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process a level folder to build/update a PuzzleLevelDataSO with all puzzle steps
|
||||
/// </summary>
|
||||
private static void ProcessPuzzleLevelFolder(string folderPath)
|
||||
{
|
||||
if (!Directory.Exists(folderPath)) return;
|
||||
|
||||
// Get level name from folder name
|
||||
string levelName = Path.GetFileName(folderPath);
|
||||
if (string.IsNullOrEmpty(levelName)) return;
|
||||
|
||||
// Find all puzzle step assets in this level (including subfolders)
|
||||
var stepAssets = FindAssetsOfTypeRecursive<PuzzleStepSO>(folderPath);
|
||||
if (stepAssets.Count == 0) return;
|
||||
|
||||
// Get or create level data asset
|
||||
var levelDataAsset = GetOrCreateLevelDataAsset(folderPath, levelName);
|
||||
if (levelDataAsset == null) return;
|
||||
|
||||
// Update level data
|
||||
levelDataAsset.levelId = levelName;
|
||||
levelDataAsset.displayName = levelName; // Default display name matches folder name
|
||||
levelDataAsset.allSteps = stepAssets;
|
||||
|
||||
// Pre-process initial steps (those with no dependencies)
|
||||
levelDataAsset.initialSteps = FindInitialSteps(stepAssets);
|
||||
|
||||
// Pre-process dependencies (which steps are required by each step)
|
||||
PrecomputeDependencies(levelDataAsset);
|
||||
|
||||
// Mark as dirty and save
|
||||
EditorUtility.SetDirty(levelDataAsset);
|
||||
|
||||
// Setup addressables
|
||||
SetupAddressableAsset(AssetDatabase.GetAssetPath(levelDataAsset), $"Puzzles/{levelName}");
|
||||
|
||||
Debug.Log($"[PuzzleProcessor] Processed level: {levelName} with {stepAssets.Count} steps");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find all assets of a specific type in a folder and its subfolders
|
||||
/// </summary>
|
||||
private static List<T> FindAssetsOfTypeRecursive<T>(string folderPath) where T : ScriptableObject
|
||||
{
|
||||
var result = new List<T>();
|
||||
|
||||
if (!Directory.Exists(folderPath)) return result;
|
||||
|
||||
var guids = AssetDatabase.FindAssets("t:" + typeof(T).Name, new[] { folderPath });
|
||||
foreach (var guid in guids)
|
||||
{
|
||||
string assetPath = AssetDatabase.GUIDToAssetPath(guid);
|
||||
var asset = AssetDatabase.LoadAssetAtPath<T>(assetPath);
|
||||
if (asset != null)
|
||||
{
|
||||
result.Add(asset);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get existing level data asset or create a new one
|
||||
/// </summary>
|
||||
private static PuzzleLevelDataSO GetOrCreateLevelDataAsset(string folderPath, string levelName)
|
||||
{
|
||||
// Check for existing level data asset
|
||||
string levelDataAssetPath = $"{folderPath}/{levelName}.asset";
|
||||
var levelDataAsset = AssetDatabase.LoadAssetAtPath<PuzzleLevelDataSO>(levelDataAssetPath);
|
||||
|
||||
if (levelDataAsset == null)
|
||||
{
|
||||
// Create new level data asset
|
||||
levelDataAsset = ScriptableObject.CreateInstance<PuzzleLevelDataSO>();
|
||||
AssetDatabase.CreateAsset(levelDataAsset, levelDataAssetPath);
|
||||
Debug.Log($"[PuzzleProcessor] Created new level data asset: {levelDataAssetPath}");
|
||||
}
|
||||
|
||||
return levelDataAsset;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find steps that have no dependencies (initial steps)
|
||||
/// </summary>
|
||||
private static List<PuzzleStepSO> FindInitialSteps(List<PuzzleStepSO> steps)
|
||||
{
|
||||
var initialSteps = new List<PuzzleStepSO>();
|
||||
var dependentSteps = new HashSet<PuzzleStepSO>();
|
||||
|
||||
// Find all steps that are dependencies of other steps
|
||||
foreach (var step in steps)
|
||||
{
|
||||
if (step == null) continue;
|
||||
|
||||
foreach (var unlockStep in step.unlocks)
|
||||
{
|
||||
if (unlockStep != null && steps.Contains(unlockStep))
|
||||
{
|
||||
dependentSteps.Add(unlockStep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Initial steps are those not depended on by any other step
|
||||
foreach (var step in steps)
|
||||
{
|
||||
if (step != null && !dependentSteps.Contains(step))
|
||||
{
|
||||
initialSteps.Add(step);
|
||||
}
|
||||
}
|
||||
|
||||
return initialSteps;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pre-compute dependency information for a puzzle level
|
||||
/// </summary>
|
||||
private static void PrecomputeDependencies(PuzzleLevelDataSO levelDataAsset)
|
||||
{
|
||||
levelDataAsset.stepDependencies.Clear();
|
||||
|
||||
// Build reverse dependency map (which steps are required by each step)
|
||||
var reverseDependencies = new Dictionary<string, List<string>>();
|
||||
|
||||
foreach (var step in levelDataAsset.allSteps)
|
||||
{
|
||||
if (step == null) continue;
|
||||
|
||||
foreach (var unlockStep in step.unlocks)
|
||||
{
|
||||
if (unlockStep == null) continue;
|
||||
|
||||
if (!reverseDependencies.ContainsKey(unlockStep.stepId))
|
||||
{
|
||||
reverseDependencies[unlockStep.stepId] = new List<string>();
|
||||
}
|
||||
|
||||
reverseDependencies[unlockStep.stepId].Add(step.stepId);
|
||||
}
|
||||
}
|
||||
|
||||
// Convert to serialized form
|
||||
foreach (var entry in reverseDependencies)
|
||||
{
|
||||
levelDataAsset.stepDependencies[entry.Key] = entry.Value.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set up an asset as an Addressable with the specified address
|
||||
/// </summary>
|
||||
private static void SetupAddressableAsset(string assetPath, string address)
|
||||
{
|
||||
if (!File.Exists(assetPath)) return;
|
||||
|
||||
// Get Addressable settings
|
||||
var settings = AddressableAssetSettingsDefaultObject.Settings;
|
||||
if (settings == null)
|
||||
{
|
||||
Debug.LogWarning("[PuzzleProcessor] Addressable Asset Settings not found. Make sure Addressables is set up in your project.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get default group
|
||||
var defaultGroup = settings.DefaultGroup;
|
||||
if (defaultGroup == null)
|
||||
{
|
||||
Debug.LogWarning("[PuzzleProcessor] Default Addressable Asset Group not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get asset GUID
|
||||
var guid = AssetDatabase.AssetPathToGUID(assetPath);
|
||||
|
||||
// Check if entry exists
|
||||
var existingEntry = settings.FindAssetEntry(guid);
|
||||
if (existingEntry != null)
|
||||
{
|
||||
// Update existing entry
|
||||
existingEntry.SetAddress(address);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create new entry
|
||||
settings.CreateOrMoveEntry(guid, defaultGroup);
|
||||
var newEntry = settings.FindAssetEntry(guid);
|
||||
if (newEntry != null)
|
||||
{
|
||||
newEntry.SetAddress(address);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/PuzzleAssetProcessor.cs.meta
Normal file
3
Assets/Editor/PuzzleAssetProcessor.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5097566c60d341dbb6f2bf5175b048cb
|
||||
timeCreated: 1760532147
|
||||
@@ -1,116 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class PuzzleChainEditorWindow : EditorWindow
|
||||
{
|
||||
private List<PuzzleStepSO> puzzleSteps = new List<PuzzleStepSO>();
|
||||
private Dictionary<PuzzleStepSO, List<PuzzleStepSO>> dependencyGraph;
|
||||
private Vector2 scrollPos;
|
||||
private const int INDENT_SIZE = 24;
|
||||
|
||||
[MenuItem("AppleHills/Puzzle Chain Editor")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<PuzzleChainEditorWindow>("Puzzle Chain Editor");
|
||||
window.minSize = new Vector2(600, 400);
|
||||
window.maxSize = new Vector2(1200, 800);
|
||||
window.position = new Rect(100, 100, 700, 500); // Reasonable default size and position
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
LoadPuzzleSteps();
|
||||
ProcessPuzzleChains();
|
||||
}
|
||||
|
||||
private void LoadPuzzleSteps()
|
||||
{
|
||||
puzzleSteps.Clear();
|
||||
// Find all PuzzleStepSO assets in the project
|
||||
string[] guids = AssetDatabase.FindAssets("t:PuzzleStepSO");
|
||||
foreach (var guid in guids)
|
||||
{
|
||||
var path = AssetDatabase.GUIDToAssetPath(guid);
|
||||
// Only include those under Assets/Data/Puzzles (case-insensitive)
|
||||
if (path.Replace('\\', '/').StartsWith("Assets/Data/Puzzles", System.StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var step = AssetDatabase.LoadAssetAtPath<PuzzleStepSO>(path);
|
||||
if (step != null)
|
||||
puzzleSteps.Add(step);
|
||||
}
|
||||
}
|
||||
// Remove any nulls just in case
|
||||
puzzleSteps.RemoveAll(s => s == null);
|
||||
// Remove nulls from unlocks lists
|
||||
foreach (var step in puzzleSteps)
|
||||
{
|
||||
if (step.unlocks != null)
|
||||
step.unlocks.RemoveAll(u => u == null);
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessPuzzleChains()
|
||||
{
|
||||
// Defensive: ensure no nulls in puzzleSteps or unlocks
|
||||
puzzleSteps.RemoveAll(s => s == null);
|
||||
foreach (var step in puzzleSteps)
|
||||
{
|
||||
if (step.unlocks != null)
|
||||
step.unlocks.RemoveAll(u => u == null);
|
||||
}
|
||||
dependencyGraph = PuzzleGraphUtility.BuildDependencyGraph(puzzleSteps);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField("Puzzle Chain Visualization", EditorStyles.boldLabel);
|
||||
if (puzzleSteps.Count == 0)
|
||||
{
|
||||
EditorGUILayout.HelpBox("No PuzzleStepSO assets found in Assets/Data/Puzzles.", MessageType.Warning);
|
||||
return;
|
||||
}
|
||||
scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
|
||||
var initialSteps = dependencyGraph != null ? PuzzleGraphUtility.FindInitialSteps(dependencyGraph) : new List<PuzzleStepSO>();
|
||||
foreach (var step in initialSteps)
|
||||
{
|
||||
if (step == null) continue; // Defensive
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
EditorGUILayout.LabelField($"Step Path: {step.displayName} ({step.stepId})", EditorStyles.largeLabel);
|
||||
GUILayout.Space(6);
|
||||
DrawStepTree(step, 0);
|
||||
EditorGUILayout.EndVertical();
|
||||
GUILayout.Space(12); // Space between step paths
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawStepTree(PuzzleStepSO step, int indent)
|
||||
{
|
||||
if (step == null) {
|
||||
EditorGUILayout.LabelField("[Missing Step]", EditorStyles.boldLabel);
|
||||
return;
|
||||
}
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.Space(indent * INDENT_SIZE);
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
EditorGUILayout.LabelField($"{step.displayName} ({step.stepId})", EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField(step.description ?? "", EditorStyles.wordWrappedLabel);
|
||||
GUILayout.Space(4);
|
||||
if (GUILayout.Button("Open in Inspector", GUILayout.Width(150)))
|
||||
{
|
||||
Selection.activeObject = step;
|
||||
EditorGUIUtility.PingObject(step);
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.EndHorizontal();
|
||||
GUILayout.Space(6);
|
||||
if (step.unlocks != null)
|
||||
{
|
||||
foreach (var unlock in step.unlocks)
|
||||
{
|
||||
DrawStepTree(unlock, indent + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7bfaa69d42e45adaa4a44dd143efc2f
|
||||
timeCreated: 1756991142
|
||||
3
Assets/Editor/PuzzleSystem.meta
Normal file
3
Assets/Editor/PuzzleSystem.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 453e2745b86c424da42227fbc38ed6d7
|
||||
timeCreated: 1760539457
|
||||
875
Assets/Editor/PuzzleSystem/PuzzleEditorWindow.cs
Normal file
875
Assets/Editor/PuzzleSystem/PuzzleEditorWindow.cs
Normal file
@@ -0,0 +1,875 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using PuzzleS;
|
||||
|
||||
namespace AppleHills.Editor.PuzzleSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor utility for managing puzzle steps and debugging puzzle state at runtime.
|
||||
/// Provides tabs for both editing puzzle data and runtime debugging.
|
||||
/// </summary>
|
||||
public class PuzzleEditorWindow : EditorWindow
|
||||
{
|
||||
// Paths
|
||||
private const string PuzzleDataBasePath = "Assets/Data";
|
||||
private const string MenuPath = "AppleHills/Puzzle Editor";
|
||||
|
||||
// Editor state
|
||||
private List<PuzzleStepSO> _allPuzzleSteps = new List<PuzzleStepSO>();
|
||||
private Dictionary<string, List<PuzzleStepSO>> _puzzleStepsByFolder = new Dictionary<string, List<PuzzleStepSO>>();
|
||||
private PuzzleStepSO _selectedStep;
|
||||
private Dictionary<string, bool> _folderExpanded = new Dictionary<string, bool>();
|
||||
private Vector2 _puzzleListScrollPosition;
|
||||
private Vector2 _puzzleEditScrollPosition;
|
||||
private string _searchQuery = "";
|
||||
private bool _isDirty = false;
|
||||
|
||||
// Tab management
|
||||
private int _selectedTab = 0;
|
||||
private readonly string[] _tabNames = { "Edit", "Debug" };
|
||||
|
||||
// Runtime debug state
|
||||
private Dictionary<string, bool> _stepUnlockState = new Dictionary<string, bool>();
|
||||
private Dictionary<string, bool> _stepCompletedState = new Dictionary<string, bool>();
|
||||
private Vector2 _debugScrollPosition;
|
||||
private bool _isPlaying = false;
|
||||
private bool _hasRuntimeData = false;
|
||||
private PuzzleLevelDataSO _runtimeLevelData;
|
||||
|
||||
// New step creation
|
||||
private string _newStepName = "New Step";
|
||||
private string _selectedFolder = "";
|
||||
private bool _showCreateNewStepDialog = false;
|
||||
|
||||
[MenuItem(MenuPath)]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<PuzzleEditorWindow>("Puzzle Editor");
|
||||
window.minSize = new Vector2(800, 600);
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
// Load all puzzle steps
|
||||
LoadAllPuzzleSteps();
|
||||
|
||||
// Register for undo/redo
|
||||
Undo.undoRedoPerformed += OnUndoRedo;
|
||||
|
||||
// Set up update callbacks
|
||||
EditorApplication.update += OnEditorUpdate;
|
||||
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
// Unregister from undo/redo
|
||||
Undo.undoRedoPerformed -= OnUndoRedo;
|
||||
|
||||
// Unregister from update
|
||||
EditorApplication.update -= OnEditorUpdate;
|
||||
EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
|
||||
}
|
||||
|
||||
private void OnEditorUpdate()
|
||||
{
|
||||
// Check if we're in play mode
|
||||
bool currentlyPlaying = EditorApplication.isPlaying && !EditorApplication.isPaused;
|
||||
if (_isPlaying != currentlyPlaying)
|
||||
{
|
||||
_isPlaying = currentlyPlaying;
|
||||
Repaint();
|
||||
}
|
||||
|
||||
// In play mode, update runtime data periodically
|
||||
if (_isPlaying)
|
||||
{
|
||||
UpdateRuntimeData();
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUndoRedo()
|
||||
{
|
||||
_isDirty = true;
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnPlayModeStateChanged(PlayModeStateChange state)
|
||||
{
|
||||
if (state == PlayModeStateChange.EnteredPlayMode)
|
||||
{
|
||||
_isPlaying = true;
|
||||
_hasRuntimeData = false;
|
||||
_stepUnlockState.Clear();
|
||||
_stepCompletedState.Clear();
|
||||
}
|
||||
else if (state == PlayModeStateChange.ExitingPlayMode)
|
||||
{
|
||||
_isPlaying = false;
|
||||
_hasRuntimeData = false;
|
||||
_runtimeLevelData = null;
|
||||
}
|
||||
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
DrawHeader();
|
||||
|
||||
_selectedTab = GUILayout.Toolbar(_selectedTab, _tabNames);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
switch (_selectedTab)
|
||||
{
|
||||
case 0: // Edit tab
|
||||
DrawEditTab();
|
||||
break;
|
||||
case 1: // Debug tab
|
||||
DrawDebugTab();
|
||||
break;
|
||||
}
|
||||
|
||||
// Apply any pending changes
|
||||
if (_isDirty)
|
||||
{
|
||||
SaveChanges();
|
||||
_isDirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
#region Header UI
|
||||
|
||||
private void DrawHeader()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
|
||||
if (GUILayout.Button("Refresh", EditorStyles.toolbarButton, GUILayout.Width(60)))
|
||||
{
|
||||
LoadAllPuzzleSteps();
|
||||
}
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
// Tab-specific toolbar options
|
||||
if (_selectedTab == 0) // Edit tab
|
||||
{
|
||||
if (GUILayout.Button("Create New", EditorStyles.toolbarButton, GUILayout.Width(80)))
|
||||
{
|
||||
_showCreateNewStepDialog = true;
|
||||
}
|
||||
}
|
||||
else if (_selectedTab == 1) // Debug tab
|
||||
{
|
||||
EditorGUILayout.LabelField(_isPlaying ? "Runtime Active" : "Editor Mode", EditorStyles.toolbarButton, GUILayout.Width(100));
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Edit Tab
|
||||
|
||||
private void DrawEditTab()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
// Left panel - puzzle step list
|
||||
EditorGUILayout.BeginVertical(GUILayout.Width(250));
|
||||
DrawStepListPanel();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
// Separator
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Right panel - puzzle step editor
|
||||
EditorGUILayout.BeginVertical();
|
||||
DrawStepEditorPanel();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Draw create new step dialog if needed
|
||||
if (_showCreateNewStepDialog)
|
||||
{
|
||||
DrawCreateNewStepDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawStepListPanel()
|
||||
{
|
||||
// Search field
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
_searchQuery = EditorGUILayout.TextField(_searchQuery, EditorStyles.toolbarSearchField);
|
||||
if (GUILayout.Button("×", EditorStyles.toolbarButton, GUILayout.Width(20)) && !string.IsNullOrEmpty(_searchQuery))
|
||||
{
|
||||
_searchQuery = "";
|
||||
GUI.FocusControl(null);
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
_puzzleListScrollPosition = EditorGUILayout.BeginScrollView(_puzzleListScrollPosition);
|
||||
|
||||
// If search query exists, show filtered results across all folders
|
||||
if (!string.IsNullOrEmpty(_searchQuery))
|
||||
{
|
||||
var filteredSteps = _allPuzzleSteps.Where(step =>
|
||||
step.displayName.ToLower().Contains(_searchQuery.ToLower()) ||
|
||||
step.stepId.ToLower().Contains(_searchQuery.ToLower())).ToList();
|
||||
|
||||
if (filteredSteps.Any())
|
||||
{
|
||||
EditorGUILayout.LabelField($"Search Results ({filteredSteps.Count}):", EditorStyles.boldLabel);
|
||||
|
||||
foreach (var step in filteredSteps)
|
||||
{
|
||||
if (DrawStepListItem(step))
|
||||
{
|
||||
_selectedStep = step;
|
||||
GUI.FocusControl(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("No matching steps found");
|
||||
}
|
||||
}
|
||||
// Otherwise show organized by folder
|
||||
else
|
||||
{
|
||||
foreach (var folderEntry in _puzzleStepsByFolder)
|
||||
{
|
||||
string folderName = folderEntry.Key;
|
||||
List<PuzzleStepSO> steps = folderEntry.Value;
|
||||
|
||||
if (!_folderExpanded.ContainsKey(folderName))
|
||||
{
|
||||
_folderExpanded[folderName] = true; // Default to expanded
|
||||
}
|
||||
|
||||
// Folder header with toggle
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
_folderExpanded[folderName] = EditorGUILayout.Foldout(_folderExpanded[folderName], folderName, true);
|
||||
|
||||
// Show step count
|
||||
EditorGUILayout.LabelField($"({steps.Count})", GUILayout.Width(40));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Draw steps in folder if expanded
|
||||
if (_folderExpanded[folderName])
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
foreach (var step in steps)
|
||||
{
|
||||
if (DrawStepListItem(step))
|
||||
{
|
||||
_selectedStep = step;
|
||||
GUI.FocusControl(null);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private bool DrawStepListItem(PuzzleStepSO step)
|
||||
{
|
||||
if (step == null) return false;
|
||||
|
||||
bool isSelected = step == _selectedStep;
|
||||
EditorGUILayout.BeginHorizontal(isSelected ? EditorStyles.selectionRect : EditorStyles.helpBox);
|
||||
|
||||
// Icon if available
|
||||
if (step.icon != null)
|
||||
{
|
||||
GUILayout.Label(new GUIContent(step.icon.texture), GUILayout.Width(20), GUILayout.Height(20));
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Space(24);
|
||||
}
|
||||
|
||||
// Name and ID
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.LabelField(step.displayName, EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField(step.stepId, EditorStyles.miniLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Check if this item was clicked
|
||||
Rect itemRect = GUILayoutUtility.GetLastRect();
|
||||
bool wasClicked = Event.current.type == EventType.MouseDown && Event.current.button == 0
|
||||
&& itemRect.Contains(Event.current.mousePosition);
|
||||
|
||||
if (wasClicked)
|
||||
{
|
||||
Event.current.Use();
|
||||
}
|
||||
|
||||
return wasClicked;
|
||||
}
|
||||
|
||||
private void DrawStepEditorPanel()
|
||||
{
|
||||
if (_selectedStep == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Select a puzzle step to edit", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
_puzzleEditScrollPosition = EditorGUILayout.BeginScrollView(_puzzleEditScrollPosition);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
// Header with name and ID
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Editing:", EditorStyles.boldLabel, GUILayout.Width(60));
|
||||
EditorGUILayout.LabelField(_selectedStep.displayName, EditorStyles.boldLabel);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Basic properties
|
||||
EditorGUILayout.LabelField("Basic Properties", EditorStyles.boldLabel);
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
// Step ID
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Step ID:", GUILayout.Width(100));
|
||||
string newStepId = EditorGUILayout.TextField(_selectedStep.stepId);
|
||||
if (newStepId != _selectedStep.stepId)
|
||||
{
|
||||
Undo.RecordObject(_selectedStep, "Change Step ID");
|
||||
_selectedStep.stepId = newStepId;
|
||||
_isDirty = true;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Display Name
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Display Name:", GUILayout.Width(100));
|
||||
string newDisplayName = EditorGUILayout.TextField(_selectedStep.displayName);
|
||||
if (newDisplayName != _selectedStep.displayName)
|
||||
{
|
||||
Undo.RecordObject(_selectedStep, "Change Display Name");
|
||||
_selectedStep.displayName = newDisplayName;
|
||||
_isDirty = true;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Description
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Description:", GUILayout.Width(100));
|
||||
string newDescription = EditorGUILayout.TextArea(_selectedStep.description, GUILayout.Height(60));
|
||||
if (newDescription != _selectedStep.description)
|
||||
{
|
||||
Undo.RecordObject(_selectedStep, "Change Description");
|
||||
_selectedStep.description = newDescription;
|
||||
_isDirty = true;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Icon
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Icon:", GUILayout.Width(100));
|
||||
Sprite newIcon = (Sprite)EditorGUILayout.ObjectField(_selectedStep.icon, typeof(Sprite), false);
|
||||
if (newIcon != _selectedStep.icon)
|
||||
{
|
||||
Undo.RecordObject(_selectedStep, "Change Icon");
|
||||
_selectedStep.icon = newIcon;
|
||||
_isDirty = true;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Unlocks (dependencies)
|
||||
EditorGUILayout.LabelField("Unlocks", EditorStyles.boldLabel);
|
||||
EditorGUILayout.HelpBox("Steps that will be unlocked when this step is completed", MessageType.Info);
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
// Show unlocked steps list
|
||||
if (_selectedStep.unlocks.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < _selectedStep.unlocks.Count; i++)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
// Draw step selector
|
||||
PuzzleStepSO newUnlockedStep = (PuzzleStepSO)EditorGUILayout.ObjectField(
|
||||
_selectedStep.unlocks[i], typeof(PuzzleStepSO), false);
|
||||
|
||||
if (newUnlockedStep != _selectedStep.unlocks[i])
|
||||
{
|
||||
Undo.RecordObject(_selectedStep, "Change Unlocked Step");
|
||||
_selectedStep.unlocks[i] = newUnlockedStep;
|
||||
_isDirty = true;
|
||||
}
|
||||
|
||||
// Remove button
|
||||
if (GUILayout.Button("-", GUILayout.Width(20)))
|
||||
{
|
||||
Undo.RecordObject(_selectedStep, "Remove Unlocked Step");
|
||||
_selectedStep.unlocks.RemoveAt(i);
|
||||
_isDirty = true;
|
||||
i--;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.LabelField("No steps will be unlocked");
|
||||
}
|
||||
|
||||
// Add new dependency
|
||||
if (GUILayout.Button("Add Unlocked Step"))
|
||||
{
|
||||
Undo.RecordObject(_selectedStep, "Add Unlocked Step");
|
||||
_selectedStep.unlocks.Add(null);
|
||||
_isDirty = true;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Asset path info
|
||||
string assetPath = AssetDatabase.GetAssetPath(_selectedStep);
|
||||
EditorGUILayout.LabelField("Asset Path:", EditorStyles.miniLabel);
|
||||
EditorGUILayout.LabelField(assetPath, EditorStyles.miniLabel);
|
||||
|
||||
// Delete button
|
||||
EditorGUILayout.Space();
|
||||
if (GUILayout.Button("Delete Step", GUILayout.Width(100)))
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("Delete Puzzle Step",
|
||||
$"Are you sure you want to delete '{_selectedStep.displayName}'? This action cannot be undone.",
|
||||
"Delete", "Cancel"))
|
||||
{
|
||||
DeletePuzzleStep(_selectedStep);
|
||||
_selectedStep = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
EditorUtility.SetDirty(_selectedStep);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawCreateNewStepDialog()
|
||||
{
|
||||
// Create a centered window
|
||||
Rect windowRect = new Rect(
|
||||
(position.width - 400) / 2,
|
||||
(position.height - 200) / 2,
|
||||
400, 200);
|
||||
|
||||
GUI.Box(windowRect, "Create New Puzzle Step", EditorStyles.helpBox);
|
||||
GUILayout.BeginArea(new Rect(windowRect.x + 10, windowRect.y + 30, windowRect.width - 20, windowRect.height - 40));
|
||||
|
||||
// Name field
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Name:", GUILayout.Width(80));
|
||||
_newStepName = EditorGUILayout.TextField(_newStepName);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Folder selection
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Folder:", GUILayout.Width(80));
|
||||
|
||||
// Create folder dropdown
|
||||
List<string> folderNames = _puzzleStepsByFolder.Keys.ToList();
|
||||
int selectedFolderIndex = folderNames.IndexOf(_selectedFolder);
|
||||
int newSelectedFolderIndex = EditorGUILayout.Popup(selectedFolderIndex >= 0 ? selectedFolderIndex : 0, folderNames.ToArray());
|
||||
if (newSelectedFolderIndex >= 0 && newSelectedFolderIndex < folderNames.Count)
|
||||
{
|
||||
_selectedFolder = folderNames[newSelectedFolderIndex];
|
||||
}
|
||||
else if (folderNames.Count > 0)
|
||||
{
|
||||
_selectedFolder = folderNames[0];
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Buttons
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (GUILayout.Button("Cancel", GUILayout.Width(100)))
|
||||
{
|
||||
_showCreateNewStepDialog = false;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Create", GUILayout.Width(100)))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_newStepName) && !string.IsNullOrEmpty(_selectedFolder))
|
||||
{
|
||||
CreateNewPuzzleStep(_newStepName, _selectedFolder);
|
||||
_showCreateNewStepDialog = false;
|
||||
_newStepName = "New Step";
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Debug Tab
|
||||
|
||||
private void DrawDebugTab()
|
||||
{
|
||||
if (!_isPlaying)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Enter Play Mode to debug puzzles at runtime", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_hasRuntimeData || _runtimeLevelData == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Waiting for puzzle data to be loaded...", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
EditorGUILayout.LabelField($"Current Level: {_runtimeLevelData.levelId}", EditorStyles.boldLabel);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
_debugScrollPosition = EditorGUILayout.BeginScrollView(_debugScrollPosition);
|
||||
|
||||
// List all steps with their current state
|
||||
EditorGUILayout.LabelField("Puzzle Steps", EditorStyles.boldLabel);
|
||||
|
||||
// Show steps directly from the level data in a flat list
|
||||
foreach (var step in _runtimeLevelData.allSteps)
|
||||
{
|
||||
if (step == null) continue;
|
||||
|
||||
DrawRuntimeStepItem(step);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawRuntimeStepItem(PuzzleStepSO step)
|
||||
{
|
||||
bool isUnlocked = _stepUnlockState.ContainsKey(step.stepId) && _stepUnlockState[step.stepId];
|
||||
bool isCompleted = _stepCompletedState.ContainsKey(step.stepId) && _stepCompletedState[step.stepId];
|
||||
|
||||
// Set background color based on state
|
||||
Color originalColor = GUI.backgroundColor;
|
||||
|
||||
if (isCompleted)
|
||||
GUI.backgroundColor = new Color(0.5f, 1f, 0.5f); // Green for completed
|
||||
else if (isUnlocked)
|
||||
GUI.backgroundColor = new Color(1f, 1f, 0.5f); // Yellow for unlocked but not completed
|
||||
else
|
||||
GUI.backgroundColor = new Color(1f, 0.5f, 0.5f); // Red for locked
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
// Reset color
|
||||
GUI.backgroundColor = originalColor;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
// Step info
|
||||
EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true));
|
||||
EditorGUILayout.LabelField(step.displayName, EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField(step.stepId, EditorStyles.miniLabel);
|
||||
|
||||
// Status text
|
||||
string statusText = isCompleted ? "Completed" : (isUnlocked ? "Unlocked" : "Locked");
|
||||
EditorGUILayout.LabelField($"Status: {statusText}", EditorStyles.miniLabel);
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
// Action buttons
|
||||
EditorGUILayout.BeginVertical(GUILayout.Width(100));
|
||||
|
||||
EditorGUI.BeginDisabledGroup(isCompleted);
|
||||
if (GUILayout.Button(isUnlocked ? "Lock" : "Unlock"))
|
||||
{
|
||||
ToggleStepUnlocked(step);
|
||||
}
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
EditorGUI.BeginDisabledGroup(!isUnlocked || isCompleted);
|
||||
if (GUILayout.Button("Complete"))
|
||||
{
|
||||
CompleteStep(step);
|
||||
}
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Management
|
||||
|
||||
private void LoadAllPuzzleSteps()
|
||||
{
|
||||
_allPuzzleSteps.Clear();
|
||||
_puzzleStepsByFolder.Clear();
|
||||
|
||||
// Find all PuzzleStepSO assets in the project
|
||||
string[] guids = AssetDatabase.FindAssets("t:PuzzleStepSO");
|
||||
|
||||
foreach (string guid in guids)
|
||||
{
|
||||
string assetPath = AssetDatabase.GUIDToAssetPath(guid);
|
||||
|
||||
// Only include assets from the Data folder
|
||||
if (assetPath.StartsWith(PuzzleDataBasePath))
|
||||
{
|
||||
PuzzleStepSO step = AssetDatabase.LoadAssetAtPath<PuzzleStepSO>(assetPath);
|
||||
|
||||
if (step != null)
|
||||
{
|
||||
_allPuzzleSteps.Add(step);
|
||||
|
||||
// Add to folder dictionary for organization
|
||||
string folder = Path.GetDirectoryName(assetPath)?.Replace("\\", "/");
|
||||
|
||||
if (folder != null)
|
||||
{
|
||||
if (!_puzzleStepsByFolder.ContainsKey(folder))
|
||||
{
|
||||
_puzzleStepsByFolder[folder] = new List<PuzzleStepSO>();
|
||||
}
|
||||
|
||||
_puzzleStepsByFolder[folder].Add(step);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure each folder is sorted by name
|
||||
foreach (var key in _puzzleStepsByFolder.Keys.ToList())
|
||||
{
|
||||
_puzzleStepsByFolder[key] = _puzzleStepsByFolder[key]
|
||||
.OrderBy(step => step.displayName)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
_isDirty = false;
|
||||
}
|
||||
|
||||
private void SaveChanges()
|
||||
{
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
private void CreateNewPuzzleStep(string stepName, string folderPath)
|
||||
{
|
||||
// Create a new PuzzleStepSO
|
||||
PuzzleStepSO newStep = CreateInstance<PuzzleStepSO>();
|
||||
newStep.stepId = GenerateUniqueStepId(stepName);
|
||||
newStep.displayName = stepName;
|
||||
|
||||
// Create the path
|
||||
string assetPath = Path.Combine(folderPath, $"{stepName}.asset").Replace("\\", "/");
|
||||
|
||||
// Make sure the directory exists
|
||||
string directory = Path.GetDirectoryName(assetPath);
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
|
||||
// Create the asset
|
||||
AssetDatabase.CreateAsset(newStep, assetPath);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
// Reload all steps and select the new one
|
||||
LoadAllPuzzleSteps();
|
||||
_selectedStep = newStep;
|
||||
}
|
||||
|
||||
private void DeletePuzzleStep(PuzzleStepSO step)
|
||||
{
|
||||
if (step == null) return;
|
||||
|
||||
string assetPath = AssetDatabase.GetAssetPath(step);
|
||||
|
||||
if (!string.IsNullOrEmpty(assetPath))
|
||||
{
|
||||
// Also need to remove all references to this step from other steps' unlocks lists
|
||||
foreach (var otherStep in _allPuzzleSteps)
|
||||
{
|
||||
if (otherStep != null && otherStep != step)
|
||||
{
|
||||
if (otherStep.unlocks.Contains(step))
|
||||
{
|
||||
Undo.RecordObject(otherStep, "Remove Deleted Step Reference");
|
||||
otherStep.unlocks.Remove(step);
|
||||
EditorUtility.SetDirty(otherStep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AssetDatabase.DeleteAsset(assetPath);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
// Reload all steps
|
||||
LoadAllPuzzleSteps();
|
||||
}
|
||||
}
|
||||
|
||||
private string GenerateUniqueStepId(string baseName)
|
||||
{
|
||||
// Convert to lowercase and replace spaces with underscores
|
||||
string baseId = baseName.ToLower().Replace(" ", "_");
|
||||
|
||||
// Check if this ID already exists
|
||||
bool idExists = _allPuzzleSteps.Any(step => step.stepId == baseId);
|
||||
|
||||
if (!idExists)
|
||||
{
|
||||
return baseId;
|
||||
}
|
||||
|
||||
// Add a number suffix if ID already exists
|
||||
int counter = 1;
|
||||
while (_allPuzzleSteps.Any(step => step.stepId == $"{baseId}_{counter}"))
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
|
||||
return $"{baseId}_{counter}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Runtime Debug Helpers
|
||||
|
||||
private void UpdateRuntimeData()
|
||||
{
|
||||
if (!_isPlaying) return;
|
||||
|
||||
// Find PuzzleManager instance
|
||||
PuzzleManager puzzleManager = Object.FindObjectOfType<PuzzleManager>();
|
||||
|
||||
if (puzzleManager == null)
|
||||
{
|
||||
_hasRuntimeData = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Get current level data
|
||||
var levelData = puzzleManager.GetCurrentLevelData();
|
||||
if (levelData == null)
|
||||
{
|
||||
_hasRuntimeData = false;
|
||||
return;
|
||||
}
|
||||
|
||||
_hasRuntimeData = true;
|
||||
_runtimeLevelData = levelData;
|
||||
|
||||
// Update step states
|
||||
foreach (var step in _runtimeLevelData.allSteps)
|
||||
{
|
||||
if (step != null)
|
||||
{
|
||||
_stepUnlockState[step.stepId] = puzzleManager.IsStepUnlocked(step);
|
||||
_stepCompletedState[step.stepId] = puzzleManager.IsPuzzleStepCompleted(step.stepId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleStepUnlocked(PuzzleStepSO step)
|
||||
{
|
||||
if (!_isPlaying || step == null) return;
|
||||
|
||||
PuzzleManager puzzleManager = Object.FindObjectOfType<PuzzleManager>();
|
||||
if (puzzleManager == null) return;
|
||||
|
||||
// Get current unlock state
|
||||
bool isCurrentlyUnlocked = _stepUnlockState.ContainsKey(step.stepId) && _stepUnlockState[step.stepId];
|
||||
|
||||
// Call appropriate method using reflection since these might be private methods
|
||||
System.Type managerType = puzzleManager.GetType();
|
||||
|
||||
if (isCurrentlyUnlocked)
|
||||
{
|
||||
// Find the LockStep method that takes a PuzzleStepSO parameter
|
||||
System.Reflection.MethodInfo lockMethod = managerType.GetMethod("LockStep",
|
||||
System.Reflection.BindingFlags.Instance |
|
||||
System.Reflection.BindingFlags.Public |
|
||||
System.Reflection.BindingFlags.NonPublic);
|
||||
|
||||
if (lockMethod != null)
|
||||
{
|
||||
lockMethod.Invoke(puzzleManager, new object[] { step });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Find the UnlockStep method that takes a PuzzleStepSO parameter
|
||||
System.Reflection.MethodInfo unlockMethod = managerType.GetMethod("UnlockStep",
|
||||
System.Reflection.BindingFlags.Instance |
|
||||
System.Reflection.BindingFlags.Public |
|
||||
System.Reflection.BindingFlags.NonPublic);
|
||||
|
||||
if (unlockMethod != null)
|
||||
{
|
||||
unlockMethod.Invoke(puzzleManager, new object[] { step });
|
||||
}
|
||||
}
|
||||
|
||||
// Update state
|
||||
UpdateRuntimeData();
|
||||
}
|
||||
|
||||
private void CompleteStep(PuzzleStepSO step)
|
||||
{
|
||||
if (!_isPlaying || step == null) return;
|
||||
|
||||
PuzzleManager puzzleManager = Object.FindObjectOfType<PuzzleManager>();
|
||||
if (puzzleManager == null) return;
|
||||
|
||||
// Complete the step
|
||||
puzzleManager.MarkPuzzleStepCompleted(step);
|
||||
|
||||
// Update state
|
||||
UpdateRuntimeData();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/PuzzleSystem/PuzzleEditorWindow.cs.meta
Normal file
3
Assets/Editor/PuzzleSystem/PuzzleEditorWindow.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c733f3c6624e4e5486c07abfe4fab81e
|
||||
timeCreated: 1760539457
|
||||
@@ -1,5 +1,17 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-8141883812729867331
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fde0d25a170598d46a0b9dc16b4527a5, type: 3}
|
||||
m_Name: ActivationPlayableAsset
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationPlayableAsset
|
||||
--- !u!114 &-7584736085941489071
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -232,6 +244,99 @@ MonoBehaviour:
|
||||
m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_ApplyOffsets: 0
|
||||
--- !u!114 &-2306502989242081801
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 21bf7f712d84d26478ebe6a299f21738, type: 3}
|
||||
m_Name: Activation Track (2)
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationTrack
|
||||
m_Version: 3
|
||||
m_AnimClip: {fileID: 0}
|
||||
m_Locked: 0
|
||||
m_Muted: 0
|
||||
m_CustomPlayableFullTypename:
|
||||
m_Curves: {fileID: 0}
|
||||
m_Parent: {fileID: 11400000}
|
||||
m_Children: []
|
||||
m_Clips:
|
||||
- m_Version: 1
|
||||
m_Start: 1.0166666666666666
|
||||
m_ClipIn: 0
|
||||
m_Asset: {fileID: 8869473753107552233}
|
||||
m_Duration: 0.8999999999999998
|
||||
m_TimeScale: 1
|
||||
m_ParentTrack: {fileID: -2306502989242081801}
|
||||
m_EaseInDuration: 0
|
||||
m_EaseOutDuration: 0
|
||||
m_BlendInDuration: 0
|
||||
m_BlendOutDuration: 0
|
||||
m_MixInCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_MixOutCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_BlendInCurveMode: 0
|
||||
m_BlendOutCurveMode: 0
|
||||
m_ExposedParameterNames: []
|
||||
m_AnimationCurves: {fileID: 0}
|
||||
m_Recordable: 0
|
||||
m_PostExtrapolationMode: 0
|
||||
m_PreExtrapolationMode: 0
|
||||
m_PostExtrapolationTime: 0
|
||||
m_PreExtrapolationTime: 0
|
||||
m_DisplayName: Active
|
||||
m_Markers:
|
||||
m_Objects: []
|
||||
m_PostPlaybackState: 3
|
||||
--- !u!114 &-2070454477998879764
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -254,6 +359,99 @@ MonoBehaviour:
|
||||
m_Loop: 0
|
||||
m_Version: 1
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
--- !u!114 &-1942705774920494342
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 21bf7f712d84d26478ebe6a299f21738, type: 3}
|
||||
m_Name: Activation Track (1)
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationTrack
|
||||
m_Version: 3
|
||||
m_AnimClip: {fileID: 0}
|
||||
m_Locked: 0
|
||||
m_Muted: 0
|
||||
m_CustomPlayableFullTypename:
|
||||
m_Curves: {fileID: 0}
|
||||
m_Parent: {fileID: 11400000}
|
||||
m_Children: []
|
||||
m_Clips:
|
||||
- m_Version: 1
|
||||
m_Start: 1.0166666666666666
|
||||
m_ClipIn: 0
|
||||
m_Asset: {fileID: 6919411930490113052}
|
||||
m_Duration: 0.8999999999999999
|
||||
m_TimeScale: 1
|
||||
m_ParentTrack: {fileID: -1942705774920494342}
|
||||
m_EaseInDuration: 0
|
||||
m_EaseOutDuration: 0
|
||||
m_BlendInDuration: 0
|
||||
m_BlendOutDuration: 0
|
||||
m_MixInCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_MixOutCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_BlendInCurveMode: 0
|
||||
m_BlendOutCurveMode: 0
|
||||
m_ExposedParameterNames: []
|
||||
m_AnimationCurves: {fileID: 0}
|
||||
m_Recordable: 0
|
||||
m_PostExtrapolationMode: 0
|
||||
m_PreExtrapolationMode: 0
|
||||
m_PostExtrapolationTime: 0
|
||||
m_PreExtrapolationTime: 0
|
||||
m_DisplayName: Active
|
||||
m_Markers:
|
||||
m_Objects: []
|
||||
m_PostPlaybackState: 3
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -271,6 +469,10 @@ MonoBehaviour:
|
||||
- {fileID: -7584736085941489071}
|
||||
- {fileID: -2395336864975438248}
|
||||
- {fileID: 3942302933360259000}
|
||||
- {fileID: -1942705774920494342}
|
||||
- {fileID: -2306502989242081801}
|
||||
- {fileID: 5194333105783184030}
|
||||
- {fileID: 8484886637748558501}
|
||||
m_FixedDuration: 0
|
||||
m_EditorSettings:
|
||||
m_Framerate: 60
|
||||
@@ -299,6 +501,18 @@ MonoBehaviour:
|
||||
m_Loop: 0
|
||||
m_Version: 1
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
--- !u!114 &3404527565291525971
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fde0d25a170598d46a0b9dc16b4527a5, type: 3}
|
||||
m_Name: ActivationPlayableAsset
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationPlayableAsset
|
||||
--- !u!114 &3942302933360259000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -392,3 +606,213 @@ MonoBehaviour:
|
||||
m_Markers:
|
||||
m_Objects: []
|
||||
m_PostPlaybackState: 3
|
||||
--- !u!114 &5194333105783184030
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 21bf7f712d84d26478ebe6a299f21738, type: 3}
|
||||
m_Name: Activation Track (3)
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationTrack
|
||||
m_Version: 3
|
||||
m_AnimClip: {fileID: 0}
|
||||
m_Locked: 0
|
||||
m_Muted: 0
|
||||
m_CustomPlayableFullTypename:
|
||||
m_Curves: {fileID: 0}
|
||||
m_Parent: {fileID: 11400000}
|
||||
m_Children: []
|
||||
m_Clips:
|
||||
- m_Version: 1
|
||||
m_Start: 1.0166666666666666
|
||||
m_ClipIn: 0
|
||||
m_Asset: {fileID: 3404527565291525971}
|
||||
m_Duration: 0.8999999999999998
|
||||
m_TimeScale: 1
|
||||
m_ParentTrack: {fileID: 5194333105783184030}
|
||||
m_EaseInDuration: 0
|
||||
m_EaseOutDuration: 0
|
||||
m_BlendInDuration: 0
|
||||
m_BlendOutDuration: 0
|
||||
m_MixInCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_MixOutCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_BlendInCurveMode: 0
|
||||
m_BlendOutCurveMode: 0
|
||||
m_ExposedParameterNames: []
|
||||
m_AnimationCurves: {fileID: 0}
|
||||
m_Recordable: 0
|
||||
m_PostExtrapolationMode: 0
|
||||
m_PreExtrapolationMode: 0
|
||||
m_PostExtrapolationTime: 0
|
||||
m_PreExtrapolationTime: 0
|
||||
m_DisplayName: Active
|
||||
m_Markers:
|
||||
m_Objects: []
|
||||
m_PostPlaybackState: 3
|
||||
--- !u!114 &6919411930490113052
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fde0d25a170598d46a0b9dc16b4527a5, type: 3}
|
||||
m_Name: ActivationPlayableAsset
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationPlayableAsset
|
||||
--- !u!114 &8484886637748558501
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 21bf7f712d84d26478ebe6a299f21738, type: 3}
|
||||
m_Name: Activation Track (4)
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationTrack
|
||||
m_Version: 3
|
||||
m_AnimClip: {fileID: 0}
|
||||
m_Locked: 0
|
||||
m_Muted: 0
|
||||
m_CustomPlayableFullTypename:
|
||||
m_Curves: {fileID: 0}
|
||||
m_Parent: {fileID: 11400000}
|
||||
m_Children: []
|
||||
m_Clips:
|
||||
- m_Version: 1
|
||||
m_Start: 1.0166666666666666
|
||||
m_ClipIn: 0
|
||||
m_Asset: {fileID: -8141883812729867331}
|
||||
m_Duration: 0.8999999999999998
|
||||
m_TimeScale: 1
|
||||
m_ParentTrack: {fileID: 8484886637748558501}
|
||||
m_EaseInDuration: 0
|
||||
m_EaseOutDuration: 0
|
||||
m_BlendInDuration: 0
|
||||
m_BlendOutDuration: 0
|
||||
m_MixInCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_MixOutCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_BlendInCurveMode: 0
|
||||
m_BlendOutCurveMode: 0
|
||||
m_ExposedParameterNames: []
|
||||
m_AnimationCurves: {fileID: 0}
|
||||
m_Recordable: 0
|
||||
m_PostExtrapolationMode: 0
|
||||
m_PreExtrapolationMode: 0
|
||||
m_PostExtrapolationTime: 0
|
||||
m_PreExtrapolationTime: 0
|
||||
m_DisplayName: Active
|
||||
m_Markers:
|
||||
m_Objects: []
|
||||
m_PostPlaybackState: 3
|
||||
--- !u!114 &8869473753107552233
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fde0d25a170598d46a0b9dc16b4527a5, type: 3}
|
||||
m_Name: ActivationPlayableAsset
|
||||
m_EditorClassIdentifier: Unity.Timeline::UnityEngine.Timeline.ActivationPlayableAsset
|
||||
|
||||
@@ -26,7 +26,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1646387898454772943}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -4.4615383, y: 0.61538696, z: 0}
|
||||
m_LocalPosition: {x: -1.854, y: -0, z: 0}
|
||||
m_LocalScale: {x: 0.7692308, y: 0.7692308, z: 0.7692308}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -46,6 +46,38 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::Interactions.CharacterMoveToTarget
|
||||
characterType: 2
|
||||
positionOffset: {x: 0, y: 0, z: 1}
|
||||
--- !u!1 &2654542252039360806
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2084964592986606867}
|
||||
m_Layer: 10
|
||||
m_Name: AnimContainer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2084964592986606867
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2654542252039360806}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.826, y: 1.333, z: 0}
|
||||
m_LocalScale: {x: 0.1851852, y: 0.1851852, z: 0.1851852}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 305861995533261809}
|
||||
m_Father: {fileID: 4937390562043858043}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &3591802784221671576
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -72,7 +104,7 @@ Transform:
|
||||
m_GameObject: {fileID: 3591802784221671576}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0.9, y: -0.16, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
@@ -124,10 +156,10 @@ PolygonCollider2D:
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 0.69036514, y: -0.039288044}
|
||||
- {x: -0.7429288, y: 0.004180908}
|
||||
- {x: -0.73904544, y: 2.4819212}
|
||||
- {x: 0.5286481, y: 2.5456142}
|
||||
- - {x: 0.5431701, y: -0.027021673}
|
||||
- {x: -0.62026507, y: -0.020351835}
|
||||
- {x: -0.48145303, y: 1.4024833}
|
||||
- {x: 0.36918524, y: 1.3803146}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &7379304988657006554
|
||||
GameObject:
|
||||
@@ -144,7 +176,8 @@ GameObject:
|
||||
- component: {fileID: 492578671844741631}
|
||||
- component: {fileID: 8984729148657672365}
|
||||
- component: {fileID: 1569498917964935965}
|
||||
- component: {fileID: 3871210969445384207}
|
||||
- component: {fileID: 6417332830266550134}
|
||||
- component: {fileID: 4544320034237251646}
|
||||
m_Layer: 10
|
||||
m_Name: BallTree
|
||||
m_TagString: Untagged
|
||||
@@ -162,9 +195,10 @@ Transform:
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.3, y: 1.3, z: 1.3}
|
||||
m_LocalScale: {x: 2.7, y: 2.7, z: 2.7}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 2084964592986606867}
|
||||
- {fileID: 6631072601870453588}
|
||||
- {fileID: 7371967679236352629}
|
||||
m_Father: {fileID: 0}
|
||||
@@ -216,7 +250,7 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 1
|
||||
m_Sprite: {fileID: 4974115186881715698, guid: e1aa947fcf3609045ba89a6ddb609ae3, type: 3}
|
||||
m_Sprite: {fileID: 768869974157336279, guid: ab1e8f5d45ee00247af9314b56f4af91, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
@@ -261,17 +295,17 @@ BoxCollider2D:
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: -0.1844703, y: 2.8477936}
|
||||
m_Offset: {x: 0.76, y: 2.88}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.08}
|
||||
oldSize: {x: 9.23, y: 11.48}
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
oldSize: {x: 14.969999, y: 9.060193}
|
||||
newSize: {x: 9.23, y: 11.48}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 3.437712, y: 7.532383}
|
||||
m_Size: {x: 3.8, y: 7.34}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &8437452310832126615
|
||||
MonoBehaviour:
|
||||
@@ -313,7 +347,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
stepData: {fileID: 11400000, guid: 8ac614a698631554ab8ac39aed04a189, type: 2}
|
||||
puzzleIndicator: {fileID: 0}
|
||||
puzzleIndicator: {fileID: 214996082823304376}
|
||||
drawPromptRangeGizmo: 1
|
||||
--- !u!114 &8984729148657672365
|
||||
MonoBehaviour:
|
||||
@@ -327,18 +361,20 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 42e77a0c97604b6eb7674e58726c831a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::Interactions.InteractionTimelineAction
|
||||
respondToEvents: 04000000
|
||||
respondToEvents: 02000000
|
||||
pauseInteractionFlow: 1
|
||||
playableDirector: {fileID: 0}
|
||||
playableDirector: {fileID: 1569498917964935965}
|
||||
timelineMappings:
|
||||
- eventType: 4
|
||||
timelines: []
|
||||
- eventType: 2
|
||||
timelines:
|
||||
- {fileID: 11400000, guid: 1791fd5a24a3142418ed441a2a25b374, type: 2}
|
||||
- {fileID: 11400000, guid: ee609df51f47bd541a23d5425e289e30, type: 2}
|
||||
bindPlayerCharacter: 0
|
||||
bindPulverCharacter: 0
|
||||
playerTrackName:
|
||||
pulverTrackName:
|
||||
playerTrackName: Player
|
||||
pulverTrackName: Pulver
|
||||
timeoutSeconds: 30
|
||||
loopLast: 0
|
||||
loopLast: 1
|
||||
loopAll: 0
|
||||
--- !u!320 &1569498917964935965
|
||||
PlayableDirector:
|
||||
@@ -349,21 +385,43 @@ PlayableDirector:
|
||||
m_GameObject: {fileID: 7379304988657006554}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_PlayableAsset: {fileID: 11400000, guid: dd9566026364e814a8dad109e6c365ca, type: 2}
|
||||
m_PlayableAsset: {fileID: 11400000, guid: ee609df51f47bd541a23d5425e289e30, type: 2}
|
||||
m_InitialState: 0
|
||||
m_WrapMode: 2
|
||||
m_DirectorUpdateMode: 1
|
||||
m_InitialTime: 0
|
||||
m_SceneBindings:
|
||||
- key: {fileID: -7584736085941489071, guid: dd9566026364e814a8dad109e6c365ca, type: 2}
|
||||
value: {fileID: 3871210969445384207}
|
||||
value: {fileID: 0}
|
||||
- key: {fileID: -2395336864975438248, guid: dd9566026364e814a8dad109e6c365ca, type: 2}
|
||||
value: {fileID: 0}
|
||||
- key: {fileID: -7231857257271738743, guid: dd9566026364e814a8dad109e6c365ca, type: 2}
|
||||
value: {fileID: 0}
|
||||
- key: {fileID: -7584736085941489071, guid: 1791fd5a24a3142418ed441a2a25b374, type: 2}
|
||||
value: {fileID: 4544320034237251646}
|
||||
- key: {fileID: -2395336864975438248, guid: 1791fd5a24a3142418ed441a2a25b374, type: 2}
|
||||
value: {fileID: 0}
|
||||
- key: {fileID: 3942302933360259000, guid: 1791fd5a24a3142418ed441a2a25b374, type: 2}
|
||||
value: {fileID: 0}
|
||||
- key: {fileID: -2395336864975438248, guid: ee609df51f47bd541a23d5425e289e30, type: 2}
|
||||
value: {fileID: 0}
|
||||
- key: {fileID: -7584736085941489071, guid: ee609df51f47bd541a23d5425e289e30, type: 2}
|
||||
value: {fileID: 4544320034237251646}
|
||||
m_ExposedReferences:
|
||||
m_References: []
|
||||
--- !u!95 &3871210969445384207
|
||||
--- !u!114 &6417332830266550134
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7379304988657006554}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 833a4ccef651449e973e623d9107bef5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!95 &4544320034237251646
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -385,3 +443,90 @@ Animator:
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!1001 &5210361341888085501
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 2084964592986606867}
|
||||
m_Modifications:
|
||||
- target: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: NextStepIndicator
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
propertyPath: m_ConstrainProportionsScale
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
--- !u!1 &214996082823304376 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
m_PrefabInstance: {fileID: 5210361341888085501}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &305861995533261809 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
|
||||
m_PrefabInstance: {fileID: 5210361341888085501}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -30,7 +30,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7090108953567368886}
|
||||
- {fileID: 4689617562113187593}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5327225408302228741
|
||||
@@ -45,8 +45,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 360f320f4d7a48e38f5fd7cdfa28144a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
loadingScreen: {fileID: 3391437592962192360}
|
||||
--- !u!1001 &6967569849783118800
|
||||
--- !u!1001 &4881964705042195055
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
@@ -138,32 +137,13 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: LoadingScreen
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4869161796575291839, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5737877680156686392, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: minimumDisplayTime
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
--- !u!114 &3391437592962192360 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5737877680156686392, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_PrefabInstance: {fileID: 6967569849783118800}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1494b10574e74acd880f9101b4248239, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::UI.LoadingScreenController
|
||||
--- !u!224 &7090108953567368886 stripped
|
||||
--- !u!224 &4689617562113187593 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_PrefabInstance: {fileID: 6967569849783118800}
|
||||
m_PrefabInstance: {fileID: 4881964705042195055}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -108,8 +108,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 1
|
||||
m_Sprite: {fileID: 3625043607559282579, guid: 19fb86013d8c24d6cb8410c0aadf30fa, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -222,7 +222,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 2071071585578300598}
|
||||
- component: {fileID: 1454372124634854912}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 4122067414526815177}
|
||||
m_Layer: 6
|
||||
m_Name: Hidden
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -258,6 +259,52 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: eaefd3d5a2a864ca5b5d9ec5f2a7040f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: PixelplacementAssembly::Pixelplacement.State
|
||||
--- !u!61 &4122067414526815177
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1011363502278351410}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 1.05, y: -1.5}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 5.42, y: 4}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &1674229500073894281
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -460,7 +507,7 @@ SpriteRenderer:
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: -1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 1389104422143044133, guid: 88a896c19d8ef454e999af7d3b492dd9, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
@@ -868,7 +915,8 @@ GameObject:
|
||||
- component: {fileID: 3552553650332385501}
|
||||
- component: {fileID: 33904425063383983}
|
||||
- component: {fileID: 1494215563975893862}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 962877523590950341}
|
||||
m_Layer: 6
|
||||
m_Name: TakePhoto
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -941,6 +989,52 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::TakePhotoState
|
||||
playerTargetObject: {fileID: 4304786163860520790}
|
||||
--- !u!61 &962877523590950341
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7816038554732339800}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 1.05, y: -1.5}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 5.42, y: 4}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &8378940418688040866
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -229,9 +229,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::UI.LoadingScreenController
|
||||
loadingScreenContainer: {fileID: 7270617579256400696}
|
||||
progressBarImage: {fileID: 1674678211233966532}
|
||||
minimumDisplayTime: 2
|
||||
animateProgressBar: 1
|
||||
progressBarSmoothTime: 0.1
|
||||
minimumDisplayTime: 1
|
||||
progressUpdateInterval: 0.1
|
||||
--- !u!1 &6888795583318782279
|
||||
GameObject:
|
||||
|
||||
1240
Assets/Prefabs/UI/Tutorial.prefab
Normal file
1240
Assets/Prefabs/UI/Tutorial.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/UI/Tutorial.prefab.meta
Normal file
7
Assets/Prefabs/UI/Tutorial.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4dd78ff48942854ebb4c65025a8dc36
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -342,17 +342,17 @@ LineRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Positions:
|
||||
- {x: -0.15602553, y: 4.074945, z: 0}
|
||||
- {x: -0.1566351, y: 3.973638, z: 0}
|
||||
- {x: -0.1572447, y: 3.8729856, z: 0}
|
||||
- {x: -0.15602553, y: 4.0749445, z: 0}
|
||||
- {x: -0.1566351, y: 3.9736378, z: 0}
|
||||
- {x: -0.1572447, y: 3.8729858, z: 0}
|
||||
- {x: -0.15785426, y: 3.7729874, z: 0}
|
||||
- {x: -0.15846384, y: 3.6736436, z: 0}
|
||||
- {x: -0.15907341, y: 3.574954, z: 0}
|
||||
- {x: -0.15968299, y: 3.4769192, z: 0}
|
||||
- {x: -0.15846384, y: 3.6736438, z: 0}
|
||||
- {x: -0.15907341, y: 3.5749543, z: 0}
|
||||
- {x: -0.15968299, y: 3.4769194, z: 0}
|
||||
- {x: -0.16029257, y: 3.3795385, z: 0}
|
||||
- {x: -0.16090216, y: 3.2828126, z: 0}
|
||||
- {x: -0.16151173, y: 3.1867409, z: 0}
|
||||
- {x: -0.16212131, y: 3.0913236, z: 0}
|
||||
- {x: -0.16151173, y: 3.1867406, z: 0}
|
||||
- {x: -0.16212131, y: 3.0913231, z: 0}
|
||||
m_Parameters:
|
||||
serializedVersion: 3
|
||||
widthMultiplier: 1
|
||||
@@ -915,7 +915,7 @@ Transform:
|
||||
m_GameObject: {fileID: 747976396}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 3.197517, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 3.1975174, z: 0}
|
||||
m_LocalScale: {x: 0.57574, y: 0.57574, z: 0.57574}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -1367,17 +1367,17 @@ LineRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Positions:
|
||||
- {x: -0.15602553, y: 4.0749445, z: 0}
|
||||
- {x: -0.11662118, y: 3.879622, z: 0}
|
||||
- {x: -0.15602553, y: 4.074945, z: 0}
|
||||
- {x: -0.11662118, y: 3.8796225, z: 0}
|
||||
- {x: -0.07721684, y: 3.7057445, z: 0}
|
||||
- {x: -0.03781248, y: 3.5533106, z: 0}
|
||||
- {x: 0.0015918687, y: 3.4223216, z: 0}
|
||||
- {x: 0.040996216, y: 3.3127766, z: 0}
|
||||
- {x: 0.08040057, y: 3.2246761, z: 0}
|
||||
- {x: 0.11980491, y: 3.15802, z: 0}
|
||||
- {x: 0.15920927, y: 3.1128082, z: 0}
|
||||
- {x: 0.1986136, y: 3.0890405, z: 0}
|
||||
- {x: 0.23801796, y: 3.0867176, z: 0}
|
||||
- {x: 0.08040057, y: 3.2246757, z: 0}
|
||||
- {x: 0.11980491, y: 3.1580195, z: 0}
|
||||
- {x: 0.15920927, y: 3.1128078, z: 0}
|
||||
- {x: 0.1986136, y: 3.0890403, z: 0}
|
||||
- {x: 0.23801796, y: 3.0867171, z: 0}
|
||||
m_Parameters:
|
||||
serializedVersion: 3
|
||||
widthMultiplier: 1
|
||||
@@ -1910,17 +1910,17 @@ LineRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Positions:
|
||||
- {x: -0.15602553, y: 4.0749445, z: 0}
|
||||
- {x: -0.18956745, y: 3.8764973, z: 0}
|
||||
- {x: -0.15602553, y: 4.074945, z: 0}
|
||||
- {x: -0.18956745, y: 3.8764977, z: 0}
|
||||
- {x: -0.22310936, y: 3.7000232, z: 0}
|
||||
- {x: -0.25665125, y: 3.5455203, z: 0}
|
||||
- {x: -0.29019317, y: 3.412991, z: 0}
|
||||
- {x: -0.32373506, y: 3.3024335, z: 0}
|
||||
- {x: -0.35727698, y: 3.2138484, z: 0}
|
||||
- {x: -0.39081886, y: 3.1472359, z: 0}
|
||||
- {x: -0.4243608, y: 3.1025958, z: 0}
|
||||
- {x: -0.45790267, y: 3.0799282, z: 0}
|
||||
- {x: -0.4914446, y: 3.079233, z: 0}
|
||||
- {x: -0.25665125, y: 3.5455205, z: 0}
|
||||
- {x: -0.29019317, y: 3.4129908, z: 0}
|
||||
- {x: -0.32373506, y: 3.3024333, z: 0}
|
||||
- {x: -0.35727698, y: 3.213848, z: 0}
|
||||
- {x: -0.39081886, y: 3.1472356, z: 0}
|
||||
- {x: -0.4243608, y: 3.1025953, z: 0}
|
||||
- {x: -0.45790267, y: 3.0799277, z: 0}
|
||||
- {x: -0.4914446, y: 3.0792325, z: 0}
|
||||
m_Parameters:
|
||||
serializedVersion: 3
|
||||
widthMultiplier: 1
|
||||
@@ -2463,7 +2463,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2106431001}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.165, y: 2.6975174, z: 0}
|
||||
m_LocalPosition: {x: -0.165, y: 2.697517, z: 0}
|
||||
m_LocalScale: {x: 0.57574, y: 0.57574, z: 0.57574}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -2519,6 +2519,75 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::Minigames.DivingForPictures.Utilities.RockPauser
|
||||
rockReference: {fileID: 2106431003}
|
||||
rockWobbleReference: {fileID: 2106431004}
|
||||
--- !u!1001 &8347532583749285323
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.20093
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 2.44859
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3183207532655435649, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3332446944854334578, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Tutorial
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3332446944854334578, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: playTutorial
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
propertyPath: divingGameManager
|
||||
value:
|
||||
objectReference: {fileID: 424805725}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2537,3 +2606,4 @@ SceneRoots:
|
||||
- {fileID: 323864665}
|
||||
- {fileID: 424805726}
|
||||
- {fileID: 1651034646}
|
||||
- {fileID: 8347532583749285323}
|
||||
|
||||
452
Assets/Scenes/StartingScene.unity
Normal file
452
Assets/Scenes/StartingScene.unity
Normal file
@@ -0,0 +1,452 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &180679694
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 204042265062571366, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4869161796575291839, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: LoadingScreen
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 5737877680156686392, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 4869161796575291839, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 180679698}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
--- !u!1 &180679695 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4869161796575291839, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_PrefabInstance: {fileID: 180679694}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &180679696 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 1674678211233966532, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_PrefabInstance: {fileID: 180679694}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
--- !u!1 &180679697 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7270617579256400696, guid: 19fad826fce26d34ba304620216a7f47, type: 3}
|
||||
m_PrefabInstance: {fileID: 180679694}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &180679698
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 180679695}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8968b564891a474baae157792b88e75f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::Bootstrap.InitialLoadingScreen
|
||||
loadingScreenContainer: {fileID: 180679697}
|
||||
progressBarImage: {fileID: 180679696}
|
||||
minimumDisplayTime: 1
|
||||
progressUpdateInterval: 0.1
|
||||
--- !u!1 &400217123
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400217126}
|
||||
- component: {fileID: 400217125}
|
||||
- component: {fileID: 400217124}
|
||||
- component: {fileID: 400217127}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &400217124
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &400217125
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &400217126
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &400217127
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400217123}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
m_Version: 2
|
||||
--- !u!1 &1710655392
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1710655394}
|
||||
- component: {fileID: 1710655393}
|
||||
m_Layer: 0
|
||||
m_Name: BootSceneController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1710655393
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1710655392}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fdb797d6fcdc469bb9bfb9ad3c5f51b5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::Bootstrap.BootSceneController
|
||||
mainMenuSceneName: MainMenu
|
||||
minDelayAfterBoot: 0.5
|
||||
debugMode: 0
|
||||
initialLoadingScreen: {fileID: 180679698}
|
||||
bootProgressWeight: 0.5
|
||||
--- !u!4 &1710655394
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1710655392}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -39.55614, y: 4.31573, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 400217126}
|
||||
- {fileID: 1710655394}
|
||||
- {fileID: 180679694}
|
||||
7
Assets/Scenes/StartingScene.unity.meta
Normal file
7
Assets/Scenes/StartingScene.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf01e2d0135b06c4486d00ef393d0274
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
150
Assets/Scripts/Bootstrap/BootCompletionService.cs
Normal file
150
Assets/Scripts/Bootstrap/BootCompletionService.cs
Normal file
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Bootstrap
|
||||
{
|
||||
/// <summary>
|
||||
/// Service that provides notification and management of boot completion status.
|
||||
/// Allows systems to subscribe to boot completion events, register initialization actions with priorities,
|
||||
/// or await boot completion asynchronously.
|
||||
/// </summary>
|
||||
public static class BootCompletionService
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates if the boot process has completed
|
||||
/// </summary>
|
||||
public static bool IsBootComplete { get; private set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when boot completes
|
||||
/// </summary>
|
||||
public static event Action OnBootComplete;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an initialization action with priority
|
||||
/// </summary>
|
||||
private class InitializationAction
|
||||
{
|
||||
public Action Action { get; }
|
||||
public int Priority { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public InitializationAction(Action action, int priority, string name)
|
||||
{
|
||||
Action = action;
|
||||
Priority = priority;
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
|
||||
// List of initialization actions to be executed once boot completes
|
||||
private static List<InitializationAction> _initializationActions = new List<InitializationAction>();
|
||||
|
||||
// TaskCompletionSource for async await pattern
|
||||
private static TaskCompletionSource<bool> _bootCompletionTask = new TaskCompletionSource<bool>();
|
||||
|
||||
/// <summary>
|
||||
/// Called by CustomBoot when the boot process is complete
|
||||
/// </summary>
|
||||
internal static void HandleBootCompleted()
|
||||
{
|
||||
if (IsBootComplete)
|
||||
return;
|
||||
|
||||
IsBootComplete = true;
|
||||
|
||||
Debug.Log("[BootCompletionService] Boot process completed, executing initialization actions");
|
||||
|
||||
// Execute initialization actions in priority order (lower number = higher priority)
|
||||
ExecuteInitializationActions();
|
||||
|
||||
// Trigger the event
|
||||
OnBootComplete?.Invoke();
|
||||
|
||||
// Complete the task for async waiters
|
||||
_bootCompletionTask.TrySetResult(true);
|
||||
|
||||
Debug.Log("[BootCompletionService] All boot completion handlers executed");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register an action to be executed when boot completes.
|
||||
/// Lower priority numbers run first.
|
||||
/// </summary>
|
||||
/// <param name="action">The action to execute</param>
|
||||
/// <param name="priority">Priority (lower numbers run first)</param>
|
||||
/// <param name="name">Name for debugging</param>
|
||||
public static void RegisterInitAction(Action action, int priority = 100, string name = null)
|
||||
{
|
||||
if (action == null)
|
||||
return;
|
||||
|
||||
if (string.IsNullOrEmpty(name))
|
||||
name = $"Action_{_initializationActions.Count}";
|
||||
|
||||
var initAction = new InitializationAction(action, priority, name);
|
||||
|
||||
if (IsBootComplete)
|
||||
{
|
||||
// If boot is already complete, execute immediately
|
||||
Debug.Log($"[BootCompletionService] Executing late registration: {name} (Priority: {priority})");
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"[BootCompletionService] Error executing init action '{name}': {ex}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise add to the queue
|
||||
_initializationActions.Add(initAction);
|
||||
Debug.Log($"[BootCompletionService] Registered init action: {name} (Priority: {priority})");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wait asynchronously for boot completion
|
||||
/// </summary>
|
||||
/// <returns>Task that completes when boot is complete</returns>
|
||||
public static Task WaitForBootCompletionAsync()
|
||||
{
|
||||
if (IsBootComplete)
|
||||
return Task.CompletedTask;
|
||||
|
||||
return _bootCompletionTask.Task;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute all registered initialization actions in priority order
|
||||
/// </summary>
|
||||
private static void ExecuteInitializationActions()
|
||||
{
|
||||
// Sort by priority (lowest first)
|
||||
var sortedActions = _initializationActions
|
||||
.OrderBy(a => a.Priority)
|
||||
.ToList();
|
||||
|
||||
foreach (var action in sortedActions)
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.Log($"[BootCompletionService] Executing: {action.Name} (Priority: {action.Priority})");
|
||||
action.Action();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"[BootCompletionService] Error executing init action '{action.Name}': {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
// Clear the list after execution
|
||||
_initializationActions.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Bootstrap/BootCompletionService.cs.meta
Normal file
3
Assets/Scripts/Bootstrap/BootCompletionService.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa0228cf33a64515bc166b7a9bc8c0b9
|
||||
timeCreated: 1760606319
|
||||
269
Assets/Scripts/Bootstrap/BootSceneController.cs
Normal file
269
Assets/Scripts/Bootstrap/BootSceneController.cs
Normal file
@@ -0,0 +1,269 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UI;
|
||||
using Core;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Cinematics;
|
||||
|
||||
namespace Bootstrap
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller for the boot scene that coordinates bootstrap initialization with loading screen
|
||||
/// </summary>
|
||||
public class BootSceneController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private string mainMenuSceneName = "MainMenu";
|
||||
[SerializeField] private float minDelayAfterBoot = 0.5f; // Small delay after boot to ensure smooth transition
|
||||
[SerializeField] private bool debugMode = false;
|
||||
[SerializeField] private InitialLoadingScreen initialLoadingScreen; // Reference to our specialized loading screen
|
||||
|
||||
// Progress distribution between bootstrap and scene loading
|
||||
[SerializeField, Range(0.1f, 0.9f)] private float bootProgressWeight = 0.5f; // Default 50/50 split
|
||||
|
||||
private enum LoadingPhase { Bootstrap, SceneLoading }
|
||||
private LoadingPhase _currentPhase = LoadingPhase.Bootstrap;
|
||||
|
||||
private bool _bootComplete = false;
|
||||
private bool _hasStartedLoading = false;
|
||||
private float _sceneLoadingProgress = 0f;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Debug.Log("[BootSceneController] Boot scene started");
|
||||
|
||||
// Ensure the initial loading screen exists
|
||||
if (initialLoadingScreen == null)
|
||||
{
|
||||
Debug.LogError("[BootSceneController] No InitialLoadingScreen assigned! Please assign it in the inspector.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Subscribe to the loading screen completion event
|
||||
initialLoadingScreen.OnLoadingScreenFullyHidden += OnInitialLoadingComplete;
|
||||
|
||||
// Show the loading screen immediately with our combined progress provider
|
||||
initialLoadingScreen.ShowLoadingScreen(GetCombinedProgress);
|
||||
|
||||
// Subscribe to boot progress events
|
||||
CustomBoot.OnBootProgressChanged += OnBootProgressChanged;
|
||||
|
||||
// Register our boot completion handler with the BootCompletionService
|
||||
// This will execute either immediately if boot is already complete,
|
||||
// or when the boot process completes
|
||||
BootCompletionService.RegisterInitAction(
|
||||
OnBootCompleted,
|
||||
50, // Higher priority (lower number)
|
||||
"BootSceneController.OnBootCompleted"
|
||||
);
|
||||
|
||||
// In debug mode, log additional information
|
||||
if (debugMode)
|
||||
{
|
||||
InvokeRepeating(nameof(LogDebugInfo), 0.1f, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the initial loading screen is fully hidden
|
||||
/// </summary>
|
||||
private void OnInitialLoadingComplete()
|
||||
{
|
||||
Debug.Log("[BootSceneController] Initial loading screen fully hidden, boot sequence completed");
|
||||
|
||||
// Play the intro cinematic if available
|
||||
if (CinematicsManager.Instance != null)
|
||||
{
|
||||
Debug.Log("[BootSceneController] Attempting to play intro cinematic");
|
||||
|
||||
// Use LoadAndPlayCinematic to play the intro sequence
|
||||
CinematicsManager.Instance.LoadAndPlayCinematic("IntroSequence");
|
||||
|
||||
// Immediately unload the StartingScene - no need to wait for cinematic to finish
|
||||
// since CinematicsManager is bootstrapped and won't be unloaded
|
||||
UnloadStartingScene();
|
||||
}
|
||||
else
|
||||
{
|
||||
// If no cinematics manager, unload the StartingScene directly
|
||||
UnloadStartingScene();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Clean up event subscriptions
|
||||
CustomBoot.OnBootCompleted -= OnBootCompleted;
|
||||
CustomBoot.OnBootProgressChanged -= OnBootProgressChanged;
|
||||
|
||||
if (initialLoadingScreen != null)
|
||||
{
|
||||
initialLoadingScreen.OnLoadingScreenFullyHidden -= OnInitialLoadingComplete;
|
||||
}
|
||||
|
||||
if (debugMode)
|
||||
{
|
||||
CancelInvoke(nameof(LogDebugInfo));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Progress provider that combines bootstrap and scene loading progress
|
||||
/// </summary>
|
||||
private float GetCombinedProgress()
|
||||
{
|
||||
switch (_currentPhase)
|
||||
{
|
||||
case LoadingPhase.Bootstrap:
|
||||
// Scale bootstrap progress from 0 to bootProgressWeight
|
||||
return CustomBoot.CurrentProgress * bootProgressWeight;
|
||||
|
||||
case LoadingPhase.SceneLoading:
|
||||
// Scale scene loading progress from bootProgressWeight to 1.0
|
||||
return bootProgressWeight + (_sceneLoadingProgress * (1f - bootProgressWeight));
|
||||
|
||||
default:
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBootProgressChanged(float progress)
|
||||
{
|
||||
if (debugMode)
|
||||
{
|
||||
Debug.Log($"[BootSceneController] Bootstrap progress: {progress:P0}, Combined: {GetCombinedProgress():P0}");
|
||||
}
|
||||
}
|
||||
|
||||
private void LogDebugInfo()
|
||||
{
|
||||
Debug.Log($"[BootSceneController] Debug - Phase: {_currentPhase}, Bootstrap: {CustomBoot.CurrentProgress:P0}, " +
|
||||
$"Scene: {_sceneLoadingProgress:P0}, Combined: {GetCombinedProgress():P0}, Boot Complete: {_bootComplete}");
|
||||
}
|
||||
|
||||
private void OnBootCompleted()
|
||||
{
|
||||
// Unsubscribe to prevent duplicate calls
|
||||
CustomBoot.OnBootCompleted -= OnBootCompleted;
|
||||
|
||||
Debug.Log("[BootSceneController] Boot process completed");
|
||||
_bootComplete = true;
|
||||
|
||||
// After a small delay, start loading the main menu
|
||||
// This prevents jerky transitions if boot happens very quickly
|
||||
Invoke(nameof(StartLoadingMainMenu), minDelayAfterBoot);
|
||||
}
|
||||
|
||||
private void StartLoadingMainMenu()
|
||||
{
|
||||
if (_hasStartedLoading)
|
||||
return;
|
||||
|
||||
_hasStartedLoading = true;
|
||||
_currentPhase = LoadingPhase.SceneLoading;
|
||||
LoadMainMenu();
|
||||
}
|
||||
|
||||
private async void LoadMainMenu()
|
||||
{
|
||||
Debug.Log($"[BootSceneController] Loading main menu scene: {mainMenuSceneName}");
|
||||
|
||||
try
|
||||
{
|
||||
// Initialize scene loading progress to 0 to ensure proper remapping
|
||||
_sceneLoadingProgress = 0f;
|
||||
|
||||
// Create a custom progress reporter using a custom class
|
||||
var progressHandler = new ProgressHandler(value => {
|
||||
// Store the raw scene loading progress (0-1)
|
||||
_sceneLoadingProgress = value;
|
||||
|
||||
if (debugMode)
|
||||
{
|
||||
Debug.Log($"[BootSceneController] Scene loading raw: {value:P0}, Combined: {GetCombinedProgress():P0}");
|
||||
}
|
||||
});
|
||||
|
||||
// Step 1: Additively load the main menu scene - don't unload StartingScene yet
|
||||
var op = SceneManager.LoadSceneAsync(mainMenuSceneName, LoadSceneMode.Additive);
|
||||
|
||||
// Disable scene activation until we're ready to show it
|
||||
op.allowSceneActivation = true;
|
||||
|
||||
// Track progress while loading
|
||||
while (!op.isDone)
|
||||
{
|
||||
progressHandler.ReportProgress(op.progress);
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
}
|
||||
|
||||
// Update the current gameplay scene in SceneManagerService
|
||||
SceneManagerService.Instance.CurrentGameplayScene = mainMenuSceneName;
|
||||
|
||||
// Ensure progress is complete
|
||||
_sceneLoadingProgress = 1f;
|
||||
|
||||
// Step 2: Scene is fully loaded, now hide the loading screen
|
||||
// This will trigger OnInitialLoadingComplete via the event when animation completes
|
||||
initialLoadingScreen.HideLoadingScreen();
|
||||
|
||||
// Step 3: The OnInitialLoadingComplete method will handle playing the intro cinematic
|
||||
// Step 4: StartingScene will be unloaded after the cinematic completes in OnIntroCinematicFinished
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[BootSceneController] Error loading main menu: {e.Message}");
|
||||
// Still try to hide the loading screen even if there was an error
|
||||
initialLoadingScreen.HideLoadingScreen();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unloads the StartingScene, completing the transition to the main menu
|
||||
/// </summary>
|
||||
private async void UnloadStartingScene()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Get the current scene (StartingScene)
|
||||
Scene currentScene = SceneManager.GetActiveScene();
|
||||
string startingSceneName = currentScene.name;
|
||||
|
||||
Debug.Log($"[BootSceneController] Unloading StartingScene: {startingSceneName}");
|
||||
|
||||
// Unload the StartingScene
|
||||
await SceneManager.UnloadSceneAsync(startingSceneName);
|
||||
|
||||
// Set the main menu scene as the active scene
|
||||
Scene mainMenuScene = SceneManager.GetSceneByName(mainMenuSceneName);
|
||||
SceneManager.SetActiveScene(mainMenuScene);
|
||||
|
||||
Debug.Log($"[BootSceneController] Transition complete: {startingSceneName} unloaded, {mainMenuSceneName} is now active");
|
||||
|
||||
// Destroy the boot scene controller since its job is done
|
||||
Destroy(gameObject);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logging.Warning($"[BootSceneController] Error unloading StartingScene: {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper class to handle progress reporting without running into explicit interface implementation issues
|
||||
/// </summary>
|
||||
private class ProgressHandler
|
||||
{
|
||||
private Action<float> _progressAction;
|
||||
|
||||
public ProgressHandler(Action<float> progressAction)
|
||||
{
|
||||
_progressAction = progressAction;
|
||||
}
|
||||
|
||||
public void ReportProgress(float value)
|
||||
{
|
||||
_progressAction?.Invoke(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Bootstrap/BootSceneController.cs.meta
Normal file
3
Assets/Scripts/Bootstrap/BootSceneController.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdb797d6fcdc469bb9bfb9ad3c5f51b5
|
||||
timeCreated: 1760604860
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
@@ -14,9 +15,24 @@ namespace Bootstrap
|
||||
/// Current initialisation status
|
||||
/// </summary>
|
||||
public static bool Initialised { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when boot progress changes
|
||||
/// </summary>
|
||||
public static event Action<float> OnBootProgressChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when boot process completes
|
||||
/// </summary>
|
||||
public static event Action OnBootCompleted;
|
||||
|
||||
/// <summary>
|
||||
/// Current progress of the boot process (0-1)
|
||||
/// </summary>
|
||||
public static float CurrentProgress { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
// Called as soon as the game begins
|
||||
/// Called as soon as the game begins
|
||||
/// </summary>
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
|
||||
private static void Initialise()
|
||||
@@ -32,6 +48,9 @@ namespace Bootstrap
|
||||
/// </summary>
|
||||
public static void PerformInitialisation()
|
||||
{
|
||||
//Reset progress
|
||||
CurrentProgress = 0f;
|
||||
|
||||
//In editor, perform initialisation synchronously
|
||||
if (Application.isEditor)
|
||||
{
|
||||
@@ -72,6 +91,17 @@ namespace Bootstrap
|
||||
{
|
||||
await LoadCustomBootSettings();
|
||||
Initialised = true;
|
||||
CurrentProgress = 1f;
|
||||
OnBootProgressChanged?.Invoke(1f);
|
||||
OnBootCompleted?.Invoke();
|
||||
|
||||
// Notify the BootCompletionService that boot is complete
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
// Direct call to boot completion service
|
||||
Debug.Log("[CustomBoot] Calling BootCompletionService.HandleBootCompleted()");
|
||||
BootCompletionService.HandleBootCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -81,6 +111,17 @@ namespace Bootstrap
|
||||
{
|
||||
LoadCustomBootSettingsSync();
|
||||
Initialised = true;
|
||||
CurrentProgress = 1f;
|
||||
OnBootProgressChanged?.Invoke(1f);
|
||||
OnBootCompleted?.Invoke();
|
||||
|
||||
// Notify the BootCompletionService that boot is complete
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
// Direct call to boot completion service
|
||||
Debug.Log("[CustomBoot] Calling BootCompletionService.HandleBootCompleted()");
|
||||
BootCompletionService.HandleBootCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -177,5 +218,16 @@ namespace Bootstrap
|
||||
result.InitialiseSync();
|
||||
return handle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the current progress value and triggers the progress event
|
||||
/// </summary>
|
||||
/// <param name="progress">Progress value between 0-1</param>
|
||||
internal static void UpdateProgress(float progress)
|
||||
{
|
||||
CurrentProgress = Mathf.Clamp01(progress);
|
||||
OnBootProgressChanged?.Invoke(CurrentProgress);
|
||||
Debug.Log($"[CustomBoot] Progress: {CurrentProgress:P0}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,15 +31,37 @@ namespace Bootstrap
|
||||
RuntimeContainer = new GameObject($"{name}_Container");
|
||||
DontDestroyOnLoad(RuntimeContainer);
|
||||
Instances = new GameObject[BootPrefabs.Length];
|
||||
|
||||
// Calculate total prefabs for progress tracking
|
||||
int totalPrefabs = BootPrefabs.Length;
|
||||
float progressPerPrefab = totalPrefabs > 0 ? 1f / totalPrefabs : 1f;
|
||||
float currentProgress = 0f;
|
||||
|
||||
for (var i = 0; i < BootPrefabs.Length; i++)
|
||||
{
|
||||
if (!BootPrefabs[i]) continue;
|
||||
if (!BootPrefabs[i])
|
||||
{
|
||||
// Report incremental progress even for null prefabs
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
continue;
|
||||
}
|
||||
|
||||
var instance = GameObject.InstantiateAsync(BootPrefabs[i], RuntimeContainer.transform);
|
||||
while (!instance.isDone)
|
||||
{
|
||||
// Report partial progress while waiting
|
||||
float progressInStep = instance.progress * progressPerPrefab;
|
||||
float overallProgress = i * progressPerPrefab + progressInStep;
|
||||
CustomBoot.UpdateProgress(overallProgress);
|
||||
await Task.Yield();
|
||||
}
|
||||
|
||||
Instances[i] = instance.Result[0];
|
||||
|
||||
// Report completion of this step
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,12 +77,28 @@ namespace Bootstrap
|
||||
}
|
||||
|
||||
Instances = new GameObject[BootPrefabs.Length];
|
||||
|
||||
// Calculate total prefabs for progress tracking
|
||||
int totalPrefabs = BootPrefabs.Length;
|
||||
float progressPerPrefab = totalPrefabs > 0 ? 1f / totalPrefabs : 1f;
|
||||
float currentProgress = 0f;
|
||||
|
||||
for (var i = 0; i < BootPrefabs.Length; i++)
|
||||
{
|
||||
if (!BootPrefabs[i]) continue;
|
||||
if (!BootPrefabs[i])
|
||||
{
|
||||
// Report incremental progress even for null prefabs
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
continue;
|
||||
}
|
||||
|
||||
var instance = GameObject.Instantiate(BootPrefabs[i], RuntimeContainer.transform);
|
||||
Instances[i] = instance;
|
||||
|
||||
// Report completion of this step
|
||||
currentProgress = (i + 1) * progressPerPrefab;
|
||||
CustomBoot.UpdateProgress(currentProgress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
240
Assets/Scripts/Bootstrap/InitialLoadingScreen.cs
Normal file
240
Assets/Scripts/Bootstrap/InitialLoadingScreen.cs
Normal file
@@ -0,0 +1,240 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Core;
|
||||
|
||||
namespace Bootstrap
|
||||
{
|
||||
/// <summary>
|
||||
/// Specialized loading screen controller specifically for the initial boot sequence.
|
||||
/// This handles the combined progress of bootstrap initialization and main menu loading.
|
||||
/// </summary>
|
||||
public class InitialLoadingScreen : MonoBehaviour
|
||||
{
|
||||
[Header("UI References")]
|
||||
[SerializeField] private GameObject loadingScreenContainer;
|
||||
[SerializeField] private Image progressBarImage;
|
||||
|
||||
[Header("Settings")]
|
||||
[SerializeField] private float minimumDisplayTime = 1.0f;
|
||||
[SerializeField] private float progressUpdateInterval = 0.1f;
|
||||
|
||||
private float _displayStartTime;
|
||||
private Coroutine _progressCoroutine;
|
||||
private bool _loadingComplete = false;
|
||||
private bool _animationComplete = false;
|
||||
private Action _onLoadingScreenFullyHidden;
|
||||
|
||||
/// <summary>
|
||||
/// Event that fires when the loading screen is fully hidden (both loading and animation completed)
|
||||
/// </summary>
|
||||
public event Action OnLoadingScreenFullyHidden;
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for providing progress values from different sources
|
||||
/// </summary>
|
||||
public delegate float ProgressProvider();
|
||||
|
||||
/// <summary>
|
||||
/// Current progress provider being used for the loading screen
|
||||
/// </summary>
|
||||
private ProgressProvider _currentProgressProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Default progress provider that returns 0 (or 1 if loading is complete)
|
||||
/// </summary>
|
||||
private float DefaultProgressProvider() => _loadingComplete ? 1f : 0f;
|
||||
|
||||
/// <summary>
|
||||
/// Check if the loading screen is currently active
|
||||
/// </summary>
|
||||
public bool IsActive => loadingScreenContainer != null && loadingScreenContainer.activeSelf;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (loadingScreenContainer == null)
|
||||
loadingScreenContainer = gameObject;
|
||||
|
||||
// Ensure the loading screen is initially hidden
|
||||
if (loadingScreenContainer != null)
|
||||
{
|
||||
loadingScreenContainer.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the loading screen and resets the progress bar to zero
|
||||
/// </summary>
|
||||
/// <param name="progressProvider">Optional delegate to provide progress values (0-1). If null, uses default provider.</param>
|
||||
/// <param name="onComplete">Optional callback when loading screen is fully hidden</param>
|
||||
public void ShowLoadingScreen(ProgressProvider progressProvider = null, Action onComplete = null)
|
||||
{
|
||||
// Store the completion callback
|
||||
_onLoadingScreenFullyHidden = onComplete;
|
||||
|
||||
// Set the progress provider, use default if none provided
|
||||
_currentProgressProvider = progressProvider ?? DefaultProgressProvider;
|
||||
|
||||
// Stop any existing progress coroutine
|
||||
if (_progressCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_progressCoroutine);
|
||||
_progressCoroutine = null;
|
||||
}
|
||||
|
||||
_displayStartTime = Time.time;
|
||||
_loadingComplete = false;
|
||||
_animationComplete = false;
|
||||
|
||||
if (progressBarImage != null)
|
||||
{
|
||||
progressBarImage.fillAmount = 0f;
|
||||
}
|
||||
|
||||
if (loadingScreenContainer != null)
|
||||
{
|
||||
loadingScreenContainer.SetActive(true);
|
||||
}
|
||||
|
||||
// Start the progress filling coroutine
|
||||
_progressCoroutine = StartCoroutine(AnimateProgressBar());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Animates the progress bar at a steady pace over the minimum display time,
|
||||
/// while also checking actual loading progress from the current progress provider
|
||||
/// </summary>
|
||||
private IEnumerator AnimateProgressBar()
|
||||
{
|
||||
float startTime = Time.time;
|
||||
|
||||
// Continue until both animation and loading are complete
|
||||
while (!_animationComplete)
|
||||
{
|
||||
// Calculate the steady progress based on elapsed time
|
||||
float elapsedTime = Time.time - startTime;
|
||||
float steadyProgress = Mathf.Clamp01(elapsedTime / minimumDisplayTime);
|
||||
|
||||
// Get the actual loading progress from the current provider
|
||||
float actualProgress = _currentProgressProvider();
|
||||
|
||||
// If loading is complete, actualProgress should be 1.0
|
||||
if (_loadingComplete)
|
||||
{
|
||||
actualProgress = 1.0f;
|
||||
}
|
||||
|
||||
// Use the minimum of steady progress and actual progress
|
||||
// This ensures we don't show more progress than actual loading
|
||||
float displayProgress = Mathf.Min(steadyProgress, actualProgress);
|
||||
|
||||
// Log the progress values for debugging
|
||||
Debug.Log($"[InitialLoadingScreen] Progress - Default: {steadyProgress:F2}, Actual: {actualProgress:F2}, Display: {displayProgress:F2}");
|
||||
|
||||
// Directly set the progress bar fill amount without smoothing
|
||||
if (progressBarImage != null)
|
||||
{
|
||||
progressBarImage.fillAmount = displayProgress;
|
||||
}
|
||||
|
||||
// Check if the animation has completed
|
||||
// Animation is complete when we've reached the minimum display time AND we're at 100% progress
|
||||
if (steadyProgress >= 1.0f && displayProgress >= 1.0f)
|
||||
{
|
||||
_animationComplete = true;
|
||||
Debug.Log("[InitialLoadingScreen] Animation complete");
|
||||
break;
|
||||
}
|
||||
|
||||
// Wait for the configured interval before updating again
|
||||
yield return new WaitForSeconds(progressUpdateInterval);
|
||||
}
|
||||
|
||||
// Ensure we end at 100% progress
|
||||
if (progressBarImage != null)
|
||||
{
|
||||
progressBarImage.fillAmount = 1.0f;
|
||||
Debug.Log("[InitialLoadingScreen] Final progress set to 1.0");
|
||||
}
|
||||
|
||||
// Hide the screen if loading is also complete
|
||||
if (_loadingComplete)
|
||||
{
|
||||
if (loadingScreenContainer != null)
|
||||
{
|
||||
loadingScreenContainer.SetActive(false);
|
||||
Debug.Log("[InitialLoadingScreen] Animation AND loading complete, hiding screen");
|
||||
|
||||
// Invoke the callback when fully hidden
|
||||
_onLoadingScreenFullyHidden?.Invoke();
|
||||
OnLoadingScreenFullyHidden?.Invoke();
|
||||
_onLoadingScreenFullyHidden = null;
|
||||
}
|
||||
}
|
||||
|
||||
_progressCoroutine = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the actual loading process is complete
|
||||
/// </summary>
|
||||
public void HideLoadingScreen()
|
||||
{
|
||||
Debug.Log("[InitialLoadingScreen] Loading complete, marking loading as finished");
|
||||
|
||||
// Mark that loading is complete
|
||||
_loadingComplete = true;
|
||||
|
||||
// If animation is already complete, we can hide the screen now
|
||||
if (_animationComplete)
|
||||
{
|
||||
if (loadingScreenContainer != null)
|
||||
{
|
||||
loadingScreenContainer.SetActive(false);
|
||||
Debug.Log("[InitialLoadingScreen] Animation already complete, hiding screen immediately");
|
||||
|
||||
// Invoke the callback when fully hidden
|
||||
_onLoadingScreenFullyHidden?.Invoke();
|
||||
OnLoadingScreenFullyHidden?.Invoke();
|
||||
_onLoadingScreenFullyHidden = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[InitialLoadingScreen] Animation still in progress, waiting for it to complete");
|
||||
// The coroutine will handle hiding when animation completes
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Waits until the loading screen is fully hidden before continuing
|
||||
/// </summary>
|
||||
/// <returns>Task that completes when the loading screen is hidden</returns>
|
||||
public System.Threading.Tasks.Task WaitForLoadingScreenToHideAsync()
|
||||
{
|
||||
var tcs = new System.Threading.Tasks.TaskCompletionSource<bool>();
|
||||
|
||||
// If the loading screen is not active, complete immediately
|
||||
if (!IsActive)
|
||||
{
|
||||
tcs.SetResult(true);
|
||||
return tcs.Task;
|
||||
}
|
||||
|
||||
// Store existing callback to chain it
|
||||
Action existingCallback = _onLoadingScreenFullyHidden;
|
||||
|
||||
// Set new callback
|
||||
_onLoadingScreenFullyHidden = () => {
|
||||
// Call existing callback if any
|
||||
existingCallback?.Invoke();
|
||||
|
||||
// Complete the task
|
||||
tcs.SetResult(true);
|
||||
};
|
||||
|
||||
return tcs.Task;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Bootstrap/InitialLoadingScreen.cs.meta
Normal file
3
Assets/Scripts/Bootstrap/InitialLoadingScreen.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8968b564891a474baae157792b88e75f
|
||||
timeCreated: 1760613320
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
@@ -26,24 +28,27 @@ namespace Cinematics
|
||||
private Dictionary<PlayableDirector, AsyncOperationHandle<PlayableAsset>> _addressableHandles
|
||||
= new Dictionary<PlayableDirector, AsyncOperationHandle<PlayableAsset>>();
|
||||
|
||||
public static CinematicsManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<CinematicsManager>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("CinematicsManager");
|
||||
_instance = go.AddComponent<CinematicsManager>();
|
||||
// DontDestroyOnLoad(go);
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Singleton instance of the CinematicsManager. No longer creates an instance if one doesn't exist.
|
||||
/// </summary>
|
||||
public static CinematicsManager Instance => _instance;
|
||||
|
||||
public PlayableDirector playableDirector;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_instance = this;
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Initialize any dependencies that require other services to be ready
|
||||
// For example, subscribe to SceneManagerService events if needed
|
||||
Logging.Debug("[CinematicsManager] Post-boot initialization complete");
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
@@ -62,15 +67,55 @@ namespace Cinematics
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
ReleaseAllHandles();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes required components for the CinematicsManager
|
||||
/// </summary>
|
||||
private void InitializeComponents()
|
||||
{
|
||||
// Initialize PlayableDirector if not set
|
||||
if (playableDirector == null)
|
||||
{
|
||||
playableDirector = GetComponent<PlayableDirector>();
|
||||
|
||||
// If still null, try to add the component
|
||||
if (playableDirector == null)
|
||||
{
|
||||
playableDirector = gameObject.AddComponent<PlayableDirector>();
|
||||
Debug.Log("[CinematicsManager] Added missing PlayableDirector component");
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize _cinematicSprites if not set
|
||||
if (_cinematicSprites == null)
|
||||
{
|
||||
// First try to find in children
|
||||
_cinematicSprites = GetComponentInChildren<Image>(true);
|
||||
|
||||
// If still null, create a new UI Image for cinematics
|
||||
if (_cinematicSprites == null)
|
||||
{
|
||||
Debug.LogWarning("[CinematicsManager] No Image found for cinematics display. Cinematics may not display correctly.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Plays a cinematic from an object reference and returns the PlayableDirector playing the timeline
|
||||
/// </summary>
|
||||
public PlayableDirector PlayCinematic(PlayableAsset assetToPlay)
|
||||
{
|
||||
_cinematicSprites.enabled = true;
|
||||
// Ensure components are initialized before playing
|
||||
InitializeComponents();
|
||||
|
||||
if (_cinematicSprites != null)
|
||||
{
|
||||
_cinematicSprites.enabled = true;
|
||||
}
|
||||
|
||||
playableDirector.stopped += OnPlayableDirectorStopped;
|
||||
playableDirector.Play(assetToPlay);
|
||||
Logging.Debug("Playing cinematic " + assetToPlay.name);
|
||||
@@ -145,68 +190,5 @@ namespace Cinematics
|
||||
}
|
||||
_addressableHandles.Clear();
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
PlayStartCinematicOnGameLoad();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads a cinematic asynchronously while showing a loading screen, then plays it
|
||||
/// </summary>
|
||||
/// <param name="key">The addressable key of the cinematic to load</param>
|
||||
/// <returns>The PlayableDirector playing the cinematic</returns>
|
||||
public async System.Threading.Tasks.Task<PlayableDirector> PlayCinematicWithLoadingScreen(string key)
|
||||
{
|
||||
Logging.Debug($"[CinematicsManager] Preparing to load cinematic with loading screen: {key}");
|
||||
|
||||
// First, show the loading screen BEFORE creating any async operations
|
||||
UI.LoadingScreenController.Instance.ShowLoadingScreen();
|
||||
|
||||
// Give the loading screen a frame to render
|
||||
await System.Threading.Tasks.Task.Yield();
|
||||
|
||||
// Now create the load handle and track its progress
|
||||
Logging.Debug($"[CinematicsManager] Starting cinematic asset load: {key}");
|
||||
AsyncOperationHandle<PlayableAsset> handle = Addressables.LoadAssetAsync<PlayableAsset>(key);
|
||||
|
||||
// Update the loading screen with the progress provider after the handle is created
|
||||
UI.LoadingScreenController.Instance.ShowLoadingScreen(() => handle.PercentComplete);
|
||||
|
||||
// Wait for the loading to complete
|
||||
var result = await handle.Task;
|
||||
|
||||
// Store the handle for later release
|
||||
_addressableHandles[playableDirector] = handle;
|
||||
|
||||
Logging.Debug($"[CinematicsManager] Cinematic loaded: {key}");
|
||||
|
||||
// Hide the loading screen
|
||||
UI.LoadingScreenController.Instance.HideLoadingScreen();
|
||||
|
||||
// Important: Wait for the loading screen to be fully hidden before playing the cinematic
|
||||
await UI.LoadingScreenController.Instance.WaitForLoadingScreenToHideAsync();
|
||||
|
||||
Logging.Debug($"[CinematicsManager] Loading screen hidden, now playing cinematic: {key}");
|
||||
|
||||
// Play the cinematic
|
||||
return PlayCinematic(result);
|
||||
}
|
||||
|
||||
private async void PlayStartCinematicOnGameLoad()
|
||||
{
|
||||
if (!SceneManager.GetActiveScene().name.ToLower().Contains("mainmenu"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_instance = this;
|
||||
|
||||
playableDirector = GetComponent<PlayableDirector>();
|
||||
_cinematicSprites = GetComponentInChildren<Image>(true);
|
||||
|
||||
// Use the new method with loading screen instead of direct load
|
||||
await PlayCinematicWithLoadingScreen("IntroSequence");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using Input;
|
||||
using UnityEngine;
|
||||
@@ -14,7 +15,14 @@ namespace Cinematics
|
||||
private float _holdStartTime;
|
||||
private bool _isHolding;
|
||||
private bool _skipPerformed;
|
||||
private bool _initialized = false;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Reset the progress bar
|
||||
@@ -23,32 +31,76 @@ namespace Cinematics
|
||||
radialProgressBar.fillAmount = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (CinematicsManager.Instance.IsCinematicPlaying)
|
||||
HandleCinematicStarted();
|
||||
|
||||
CinematicsManager.Instance.OnCinematicStarted += HandleCinematicStarted;
|
||||
CinematicsManager.Instance.OnCinematicStopped += HandleCinematicStopped;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
CinematicsManager.Instance.OnCinematicStarted -= HandleCinematicStarted;
|
||||
CinematicsManager.Instance.OnCinematicStopped -= HandleCinematicStopped;
|
||||
// If still registered, unregister input override
|
||||
InputManager.Instance.UnregisterOverrideConsumer(this);
|
||||
// Clean up subscriptions regardless of initialization state
|
||||
UnsubscribeFromCinematicsEvents();
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Safe initialization of manager dependencies after boot is complete
|
||||
if (_initialized)
|
||||
return;
|
||||
|
||||
_initialized = true;
|
||||
|
||||
// Subscribe to CinematicsManager events now that boot is complete
|
||||
SubscribeToCinematicsEvents();
|
||||
|
||||
Logging.Debug("[SkipCinematic] Post-boot initialization complete");
|
||||
}
|
||||
|
||||
private void SubscribeToCinematicsEvents()
|
||||
{
|
||||
if (CinematicsManager.Instance == null) return;
|
||||
|
||||
// First unsubscribe to prevent duplicate subscriptions
|
||||
UnsubscribeFromCinematicsEvents();
|
||||
|
||||
// Now subscribe
|
||||
CinematicsManager.Instance.OnCinematicStarted += HandleCinematicStarted;
|
||||
CinematicsManager.Instance.OnCinematicStopped += HandleCinematicStopped;
|
||||
|
||||
// Check if a cinematic is already playing
|
||||
if (CinematicsManager.Instance.IsCinematicPlaying)
|
||||
HandleCinematicStarted();
|
||||
|
||||
Logging.Debug("[SkipCinematic] Subscribed to cinematics events");
|
||||
}
|
||||
|
||||
private void UnsubscribeFromCinematicsEvents()
|
||||
{
|
||||
if (CinematicsManager.Instance != null)
|
||||
{
|
||||
CinematicsManager.Instance.OnCinematicStarted -= HandleCinematicStarted;
|
||||
CinematicsManager.Instance.OnCinematicStopped -= HandleCinematicStopped;
|
||||
Logging.Debug("[SkipCinematic] Unsubscribed from cinematics events");
|
||||
}
|
||||
|
||||
// If still registered as an input override consumer, unregister
|
||||
if (InputManager.Instance != null)
|
||||
{
|
||||
InputManager.Instance.UnregisterOverrideConsumer(this);
|
||||
Logging.Debug("[SkipCinematic] Unregistered as input override consumer");
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleCinematicStarted()
|
||||
{
|
||||
InputManager.Instance.RegisterOverrideConsumer(this);
|
||||
if (InputManager.Instance != null)
|
||||
{
|
||||
InputManager.Instance.RegisterOverrideConsumer(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleCinematicStopped()
|
||||
{
|
||||
InputManager.Instance.UnregisterOverrideConsumer(this);
|
||||
if (InputManager.Instance != null)
|
||||
{
|
||||
InputManager.Instance.UnregisterOverrideConsumer(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using AppleHills.Core.Interfaces;
|
||||
using Core;
|
||||
using UI;
|
||||
using Bootstrap;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton manager for global game state and settings. Provides accessors for various gameplay parameters.
|
||||
@@ -15,25 +16,9 @@ public class GameManager : MonoBehaviour
|
||||
private static bool _isQuitting = false;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton instance of the GameManager.
|
||||
/// Singleton instance of the GameManager. No longer creates an instance if one doesn't exist.
|
||||
/// </summary>
|
||||
public static GameManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<GameManager>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("GameManager");
|
||||
_instance = go.AddComponent<GameManager>();
|
||||
// DontDestroyOnLoad(go);
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
public static GameManager Instance => _instance;
|
||||
|
||||
[Header("Settings Status")]
|
||||
[SerializeField] private bool _settingsLoaded = false;
|
||||
@@ -70,10 +55,13 @@ public class GameManager : MonoBehaviour
|
||||
InitializeSettings();
|
||||
InitializeDeveloperSettings();
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
|
||||
// DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Find and subscribe to PauseMenu events
|
||||
PauseMenu pauseMenu = PauseMenu.Instance;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Interactions;
|
||||
using Bootstrap;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
@@ -14,23 +15,10 @@ namespace Core
|
||||
private static ItemManager _instance;
|
||||
private static bool _isQuitting;
|
||||
|
||||
public static ItemManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<ItemManager>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("ItemManager");
|
||||
_instance = go.AddComponent<ItemManager>();
|
||||
// DontDestroyOnLoad(go);
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Singleton instance of the ItemManager. No longer creates an instance if one doesn't exist.
|
||||
/// </summary>
|
||||
public static ItemManager Instance => _instance;
|
||||
|
||||
private readonly HashSet<Pickup> _pickups = new HashSet<Pickup>();
|
||||
private readonly HashSet<ItemSlot> _itemSlots = new HashSet<ItemSlot>();
|
||||
@@ -63,13 +51,16 @@ namespace Core
|
||||
void Awake()
|
||||
{
|
||||
_instance = this;
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
void Start()
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Subscribe to scene load completed so we can clear registrations when scenes change
|
||||
// Access Instance directly to ensure the service is initialized and we get the event hookup.
|
||||
SceneManagerService.Instance.SceneLoadStarted += OnSceneLoadStarted;
|
||||
Logging.Debug("[ItemManager] Subscribed to SceneManagerService events");
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
|
||||
@@ -18,23 +18,11 @@ namespace AppleHills.Core
|
||||
private static QuickAccess _instance;
|
||||
private static bool _isQuitting = false;
|
||||
|
||||
public static QuickAccess Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<QuickAccess>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("QuickAccess");
|
||||
_instance = go.AddComponent<QuickAccess>();
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Singleton instance of QuickAccess. No longer creates an instance if one doesn't exist.
|
||||
/// </summary>
|
||||
public static QuickAccess Instance => _instance;
|
||||
|
||||
void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
@@ -146,6 +134,8 @@ namespace AppleHills.Core
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_instance = this;
|
||||
|
||||
if (!_initialized)
|
||||
{
|
||||
// Subscribe to scene changes
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Threading.Tasks;
|
||||
using UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Bootstrap;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
@@ -15,26 +16,11 @@ namespace Core
|
||||
private LoadingScreenController _loadingScreen;
|
||||
private static SceneManagerService _instance;
|
||||
private static bool _isQuitting = false;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton instance of the SceneManagerService.
|
||||
/// Singleton instance of the SceneManagerService. No longer creates an instance if one doesn't exist.
|
||||
/// </summary>
|
||||
public static SceneManagerService Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<SceneManagerService>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("SceneManagerService");
|
||||
_instance = go.AddComponent<SceneManagerService>();
|
||||
// DontDestroyOnLoad(go);
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
public static SceneManagerService Instance => _instance;
|
||||
|
||||
// Events for scene lifecycle
|
||||
public event Action<string> SceneLoadStarted;
|
||||
@@ -48,30 +34,17 @@ namespace Core
|
||||
private readonly Dictionary<string, AsyncOperation> _activeUnloads = new();
|
||||
private const string BootstrapSceneName = "BootstrapScene";
|
||||
|
||||
void Start()
|
||||
{
|
||||
_loadingScreen = LoadingScreenController.Instance;
|
||||
|
||||
// Set up loading screen event handlers
|
||||
SetupLoadingScreenEvents();
|
||||
}
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_instance = this;
|
||||
// DontDestroyOnLoad(gameObject);
|
||||
#if UNITY_EDITOR
|
||||
// In Editor, set CurrentGameplayScene to the currently open scene at play start
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
var activeScene = SceneManager.GetActiveScene();
|
||||
if (activeScene.IsValid())
|
||||
{
|
||||
CurrentGameplayScene = activeScene.name;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Initialize current scene tracking immediately in Awake
|
||||
InitializeCurrentSceneTracking();
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
|
||||
// Ensure BootstrapScene is loaded at startup
|
||||
var bootstrap = SceneManager.GetSceneByName(BootstrapSceneName);
|
||||
if (!bootstrap.isLoaded)
|
||||
@@ -79,6 +52,48 @@ namespace Core
|
||||
SceneManager.LoadScene(BootstrapSceneName, LoadSceneMode.Additive);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize current scene tracking immediately in Awake
|
||||
/// This ensures scene management works correctly regardless of boot timing
|
||||
/// </summary>
|
||||
private void InitializeCurrentSceneTracking()
|
||||
{
|
||||
// Get the active scene and use it as the current gameplay scene
|
||||
Scene activeScene = SceneManager.GetActiveScene();
|
||||
|
||||
if (activeScene.IsValid())
|
||||
{
|
||||
// If this is the MainMenu or another gameplay scene, track it
|
||||
if (activeScene.name != BootstrapSceneName)
|
||||
{
|
||||
CurrentGameplayScene = activeScene.name;
|
||||
Logging.Debug($"[SceneManagerService] Initialized with current scene: {CurrentGameplayScene}");
|
||||
}
|
||||
// Otherwise default to MainMenu
|
||||
else
|
||||
{
|
||||
CurrentGameplayScene = "MainMenu";
|
||||
Logging.Debug($"[SceneManagerService] Initialized with default scene: {CurrentGameplayScene}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentGameplayScene = "MainMenu";
|
||||
Logging.Debug($"[SceneManagerService] No valid active scene, defaulting to: {CurrentGameplayScene}");
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Set up loading screen reference and events after boot is complete
|
||||
_loadingScreen = LoadingScreenController.Instance;
|
||||
|
||||
// Set up loading screen event handlers if available
|
||||
SetupLoadingScreenEvents();
|
||||
|
||||
Logging.Debug($"[SceneManagerService] Post-boot initialization complete, current scene is: {CurrentGameplayScene}");
|
||||
}
|
||||
|
||||
private void SetupLoadingScreenEvents()
|
||||
{
|
||||
@@ -262,16 +277,27 @@ namespace Core
|
||||
}
|
||||
|
||||
// Tracks the currently loaded gameplay scene (not persistent/bootstrapper)
|
||||
public string CurrentGameplayScene { get; private set; } = "MainMenu";
|
||||
public string CurrentGameplayScene { get; set; } = "MainMenu";
|
||||
|
||||
public async Task ReloadCurrentScene(IProgress<float> progress = null)
|
||||
public async Task ReloadCurrentScene(IProgress<float> progress = null, bool autoHideLoadingScreen = true)
|
||||
{
|
||||
await SwitchSceneAsync(CurrentGameplayScene, progress);
|
||||
await SwitchSceneAsync(CurrentGameplayScene, progress, autoHideLoadingScreen);
|
||||
}
|
||||
|
||||
// Switches from current gameplay scene to a new one
|
||||
public async Task SwitchSceneAsync(string newSceneName, IProgress<float> progress = null)
|
||||
/// <summary>
|
||||
/// Switches from current gameplay scene to a new one
|
||||
/// </summary>
|
||||
/// <param name="newSceneName">Name of the scene to load</param>
|
||||
/// <param name="progress">Optional progress reporter</param>
|
||||
/// <param name="autoHideLoadingScreen">Whether to automatically hide the loading screen when complete. If false, caller must hide it manually.</param>
|
||||
public async Task SwitchSceneAsync(string newSceneName, IProgress<float> progress = null, bool autoHideLoadingScreen = true)
|
||||
{
|
||||
// Show loading screen at the start (whether using auto-hide or not)
|
||||
if (_loadingScreen != null && !_loadingScreen.IsActive)
|
||||
{
|
||||
_loadingScreen.ShowLoadingScreen();
|
||||
}
|
||||
|
||||
// Remove all AstarPath (A* Pathfinder) singletons before loading the new scene
|
||||
var astarPaths = FindObjectsByType<AstarPath>(FindObjectsSortMode.None);
|
||||
foreach (var astar in astarPaths)
|
||||
@@ -304,6 +330,12 @@ namespace Core
|
||||
await LoadSceneAsync(newSceneName, progress);
|
||||
// Update tracker
|
||||
CurrentGameplayScene = newSceneName;
|
||||
|
||||
// Only hide the loading screen if autoHideLoadingScreen is true
|
||||
if (autoHideLoadingScreen && _loadingScreen != null)
|
||||
{
|
||||
_loadingScreen.HideLoadingScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ using Input;
|
||||
using Settings;
|
||||
using System.Collections;
|
||||
using Minigames.DivingForPictures;
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
|
||||
namespace Utility
|
||||
{
|
||||
@@ -12,23 +14,11 @@ namespace Utility
|
||||
{
|
||||
private static SceneOrientationEnforcer _instance;
|
||||
private static bool _isQuitting;
|
||||
public static SceneOrientationEnforcer Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<SceneOrientationEnforcer>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("SceneOrientationEnforcer");
|
||||
_instance = go.AddComponent<SceneOrientationEnforcer>();
|
||||
// DontDestroyOnLoad(go); // Uncomment if you want persistence
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Singleton instance of the SceneOrientationEnforcer. No longer creates an instance if one doesn't exist.
|
||||
/// </summary>
|
||||
public static SceneOrientationEnforcer Instance => _instance;
|
||||
|
||||
[Header("Config")]
|
||||
public SceneOrientationConfig orientationConfig;
|
||||
@@ -48,10 +38,16 @@ namespace Utility
|
||||
{
|
||||
_instance = this;
|
||||
OnOrientationCorrect += HandleOrientationCorrect;
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
void Start()
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Initialize any dependencies that require other services to be ready
|
||||
Logging.Debug("[SceneOrientationEnforcer] Post-boot initialization complete");
|
||||
|
||||
// Subscribe to sceneLoaded event
|
||||
SceneManager.sceneLoaded += OnSceneLoaded;
|
||||
// Manually invoke for the first scene (unless it's Main Menu)
|
||||
@@ -74,6 +70,8 @@ namespace Utility
|
||||
return Screen.orientation == ScreenOrientation.Portrait || Screen.orientation == ScreenOrientation.PortraitUpsideDown;
|
||||
case ScreenOrientationRequirement.Landscape:
|
||||
return Screen.orientation == ScreenOrientation.LandscapeLeft || Screen.orientation == ScreenOrientation.LandscapeRight;
|
||||
case ScreenOrientationRequirement.NotApplicable:
|
||||
return true;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
@@ -98,7 +96,7 @@ namespace Utility
|
||||
|
||||
_isDivingMinigame = IsDivingMinigameScene(scene);
|
||||
|
||||
_requiredOrientation = orientationConfig != null ? orientationConfig.GetRequirementForScene(scene.name) : ScreenOrientationRequirement.Portrait;
|
||||
_requiredOrientation = orientationConfig != null ? orientationConfig.GetRequirementForScene(scene.name) : ScreenOrientationRequirement.NotApplicable;
|
||||
_orientationCorrect = IsOrientationCorrect();
|
||||
|
||||
if (!_orientationCorrect)
|
||||
@@ -186,7 +184,7 @@ namespace Utility
|
||||
_orientationCheckCoroutine = null;
|
||||
}
|
||||
|
||||
InputManager.Instance.SetInputMode(InputMode.Game);
|
||||
InputManager.Instance.SetInputMode(InputMode.GameAndUI);
|
||||
}
|
||||
|
||||
private void CleanupPromptAndCoroutine()
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace AppleHills.Core.Settings
|
||||
if (_instance == null && Application.isPlaying)
|
||||
{
|
||||
_instance = FindFirstObjectByType<DeveloperSettingsProvider>();
|
||||
|
||||
|
||||
if (_instance == null)
|
||||
{
|
||||
GameObject go = new GameObject("DeveloperSettingsProvider");
|
||||
@@ -33,7 +33,7 @@ namespace AppleHills.Core.Settings
|
||||
DontDestroyOnLoad(go);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -61,6 +62,15 @@ namespace Data.CardSystem
|
||||
|
||||
// Build lookup dictionary
|
||||
BuildDefinitionLookup();
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Initialize any dependencies that require other services to be ready
|
||||
Logging.Debug("[CardSystemManager] Post-boot initialization complete");
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
|
||||
@@ -5,6 +5,7 @@ using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
using AppleHills.Core.Settings;
|
||||
using Bootstrap;
|
||||
using Core; // Added for IInteractionSettings
|
||||
|
||||
namespace Input
|
||||
@@ -35,22 +36,10 @@ namespace Input
|
||||
// Track which consumer is handling the current hold operation
|
||||
private ITouchInputConsumer _activeHoldConsumer;
|
||||
|
||||
public static InputManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null && Application.isPlaying && !_isQuitting)
|
||||
{
|
||||
_instance = FindAnyObjectByType<InputManager>();
|
||||
if (_instance == null)
|
||||
{
|
||||
var go = new GameObject("InputManager");
|
||||
_instance = go.AddComponent<InputManager>();
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Singleton instance of the InputManager. No longer creates an instance if one doesn't exist.
|
||||
/// </summary>
|
||||
public static InputManager Instance => _instance;
|
||||
|
||||
// Settings reference
|
||||
private IInteractionSettings _interactionSettings;
|
||||
@@ -66,6 +55,15 @@ namespace Input
|
||||
{
|
||||
_instance = this;
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Subscribe to scene load completed events now that boot is complete
|
||||
SceneManagerService.Instance.SceneLoadCompleted += SwitchInputOnSceneLoaded;
|
||||
|
||||
// Initialize settings reference
|
||||
_interactionSettings = GameManager.GetSettingsObject<IInteractionSettings>();
|
||||
|
||||
@@ -78,12 +76,25 @@ namespace Input
|
||||
tapMoveAction = playerInput.actions.FindAction("TapMove", false);
|
||||
holdMoveAction = playerInput.actions.FindAction("HoldMove", false);
|
||||
positionAction = playerInput.actions.FindAction("TouchPosition", false);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// SceneManagerService.Instance.SceneLoadCompleted += SwitchInputOnSceneLoaded;
|
||||
|
||||
if (tapMoveAction != null)
|
||||
tapMoveAction.performed += OnTapMovePerformed;
|
||||
if (holdMoveAction != null)
|
||||
{
|
||||
holdMoveAction.performed += OnHoldMoveStarted;
|
||||
holdMoveAction.canceled += OnHoldMoveCanceled;
|
||||
}
|
||||
|
||||
SwitchInputOnSceneLoaded(SceneManager.GetActiveScene().name);
|
||||
|
||||
Logging.Debug("[InputManager] Subscribed to SceneManagerService events");
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Unsubscribe from SceneManagerService
|
||||
if (SceneManagerService.Instance != null)
|
||||
SceneManagerService.Instance.SceneLoadCompleted -= SwitchInputOnSceneLoaded;
|
||||
}
|
||||
|
||||
private void SwitchInputOnSceneLoaded(string sceneName)
|
||||
@@ -122,17 +133,6 @@ namespace Input
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (tapMoveAction != null)
|
||||
tapMoveAction.performed += OnTapMovePerformed;
|
||||
if (holdMoveAction != null)
|
||||
{
|
||||
holdMoveAction.performed += OnHoldMoveStarted;
|
||||
holdMoveAction.canceled += OnHoldMoveCanceled;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
@@ -149,7 +149,7 @@ namespace Input
|
||||
{
|
||||
_isQuitting = true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sets the default ITouchInputConsumer to receive input events.
|
||||
/// </summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user