Merge branch 'main' into DamianBranch

This commit is contained in:
2025-09-29 12:10:55 +00:00
73 changed files with 6588 additions and 174 deletions

View File

@@ -0,0 +1,48 @@
%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: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Settings_BundledAssetGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
m_Group: {fileID: 11400000, guid: e25c7672a65b5974bb354fcfb2a8400c, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: c258e2bcd3e8ac742ba98f152c0e6322
m_LoadPath:
m_Id: 88323bf0b2ef98446961cedd6232bd47
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 49b3dee5fdd389a46be70ffe35d73d2c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
%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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Settings_ContentUpdateGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
m_Group: {fileID: 11400000, guid: e25c7672a65b5974bb354fcfb2a8400c, type: 2}
m_StaticContent: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4349a1d3bc46eeb438cd86ad8997152d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -38,4 +38,6 @@ MonoBehaviour:
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 11da9bb90d9dd5848b4f7629415a6937, type: 2}
m_SchemaSet:
m_Schemas: []
m_Schemas:
- {fileID: 11400000, guid: 49b3dee5fdd389a46be70ffe35d73d2c, type: 2}
- {fileID: 11400000, guid: 4349a1d3bc46eeb438cd86ad8997152d, type: 2}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,195 @@
fileFormatVersion: 2
guid: 5710afcaa2eca3d41b7fc78d09652325
TextureImporter:
internalIDToNameTable:
- first:
213: -904705141413079607
second: speech-bubble_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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 150
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: 0
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: WebGL
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: speech-bubble_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 512
height: 448
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 226, y: 214, z: 108, w: 113}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 9c59a9b9777d173f0800000000000000
internalID: -904705141413079607
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 2849bb51a2d7abc429687074167fe10b
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
speech-bubble_0: -904705141413079607
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,199 @@
fileFormatVersion: 2
guid: 3cfebe1146602564a9463576fe6733c7
TextureImporter:
internalIDToNameTable:
- first:
213: -6459633687583972061
second: speech-bubble_center_0
- first:
213: -5995225428019282101
second: speech-bubble_center_1
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: WebGL
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: speech-bubble_center_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 180
height: 448
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: 3252960c265ca56a0800000000000000
internalID: -6459633687583972061
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 838ff140a9428f340b4e308347f87ae8
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
speech-bubble_center_0: -6459633687583972061
speech-bubble_center_1: -5995225428019282101
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -0,0 +1,195 @@
fileFormatVersion: 2
guid: 83d5897ff7c9116418dce90c851b4461
TextureImporter:
internalIDToNameTable:
- first:
213: 2143206892153291730
second: speech-bubble_left_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: WebGL
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: speech-bubble_left_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 215
height: 448
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2d347fe20533ebd10800000000000000
internalID: 2143206892153291730
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
speech-bubble_left_0: 2143206892153291730
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,195 @@
fileFormatVersion: 2
guid: ac12e46a3dca59a41b6360ee8f6a3436
TextureImporter:
internalIDToNameTable:
- first:
213: -4795152594095387184
second: speech-bubble_right_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: WebGL
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: speech-bubble_right_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 117
height: 448
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: 0ddc6291f12347db0800000000000000
internalID: -4795152594095387184
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 810a25e6bcfa09a4faa2e3e1189eb926
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
speech-bubble_right_0: -4795152594095387184
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -19,3 +19,4 @@ MonoBehaviour:
- {fileID: 552225285624929822, guid: e39992796d5459442be9967c77e27066, type: 3}
- {fileID: 7644433920135100480, guid: 12d242e44fe80ab44af852254b7cab0f, type: 3}
- {fileID: 1794231825201849485, guid: 6fb0d7fc6faad154b8c3e3cb7abb7c15, type: 3}
- {fileID: 6399527186463168339, guid: ac41583865245bc4bb3de6c15929b9fc, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Chocolate
m_EditorClassIdentifier:
_itemId: chocolate_4f2011c6
itemName: Chocolate
description: sweet nectar of gods that lures the beasts from bushes
mapSprite: {fileID: -509776585262497855, guid: c648336c825f7d7479582bbe4d95d0bc, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: LureSpotB
m_EditorClassIdentifier:
_itemId: lurespotb_92c24cf9
itemName: LureSpotB
description: Place where we atract the chocobird
mapSprite: {fileID: 2640071299338251634, guid: 7c4c9881382767047aac78ca51b82923, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Ass
m_EditorClassIdentifier:
_itemId: ass_41f5d715
itemName: TestAss
description: Well... how do you like 'em?
mapSprite: {fileID: -5471482676633547895, guid: 77ab3d770c92d5344b36eee3293a0f94, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Ass1
m_EditorClassIdentifier:
itemName: TestAss
_itemId: ass1_5469eaae
itemName: TestAss1
description: Well... how do you like 'em?
mapSprite: {fileID: -5471482676633547895, guid: 77ab3d770c92d5344b36eee3293a0f94, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Ass2
m_EditorClassIdentifier:
itemName: TestAss
_itemId: ass2_c4e69d34
itemName: TestAss2
description: Well... how do you like 'em?
mapSprite: {fileID: 4013237533433454447, guid: 77ab3d770c92d5344b36eee3293a0f94, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Ass3
m_EditorClassIdentifier:
itemName: TestAss
_itemId: ass3_cb8f9cfb
itemName: TestAss3
description: Well... how do you like 'em?
mapSprite: {fileID: -8109988653212156562, guid: 77ab3d770c92d5344b36eee3293a0f94, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Axe
m_EditorClassIdentifier:
_itemId: axe_bf031e9e
itemName: Axe
description: Well... how do you like 'em?
mapSprite: {fileID: 6674386295937086461, guid: 3bd1c178a78fcd144965cd1731dc309b, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Bonfire
m_EditorClassIdentifier:
_itemId: bonfire_818563eb
itemName: Bonfire
description: Well... how do you like 'em?
mapSprite: {fileID: 6277786745957211492, guid: 016288f704d38e747a8eac9795051717, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Head
m_EditorClassIdentifier:
_itemId: head_c827d69b
itemName: Axe
description: Well... how do you like 'em?
mapSprite: {fileID: -1693247529382600072, guid: 77ab3d770c92d5344b36eee3293a0f94, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Meat
m_EditorClassIdentifier:
_itemId: meat_6500cc13
itemName: Meat
description: Well... how do you like 'em?
mapSprite: {fileID: 6282751622250221668, guid: 204325ac88be74d4d882a078c64cf5e1, type: 3}

View File

@@ -0,0 +1,18 @@
%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: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: PickupItemData
m_EditorClassIdentifier: AppleHillsScripts::PickupItemData
_itemId: pickupitemdata_10de237f
itemName:
description:
mapSprite: {fileID: 0}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b1cd8267212dd2349ad7e2b91ec5be11
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: FootballBall
m_EditorClassIdentifier:
_itemId: footballball_b37968c2
itemName: FootballBall
description: Ball that is used to attract the football bird.
mapSprite: {fileID: -6720685004267932717, guid: 88acd207b6a9e114ca3d3e59ac3aa550, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: LureSpotA
m_EditorClassIdentifier:
_itemId: lurespota_19a6cf7c
itemName: LureSpotA
description: Place where we atract the footballbird
mapSprite: {fileID: -8438005379329254897, guid: fe735eb4f8856904caec179520dcb92f, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: LureSpotC
m_EditorClassIdentifier:
_itemId: lurespotc_559f54b7
itemName: LureSpotC
description: Place where we atract the hammerbird
mapSprite: {fileID: 3009302558630513478, guid: 3aefb78ee1b7f6e4685d0fff00e24e3d, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Nails
m_EditorClassIdentifier:
_itemId: nails_2ecaef33
itemName: Nails
description: Nails used to lure the hammer bird out.
mapSprite: {fileID: 21300000, guid: 34b9ddb77aae2df4ab489b7bb8f16cff, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Bunfflers
m_EditorClassIdentifier:
_itemId: bunfflers_07f2a135
itemName: Bunfflers
description: Ear Mufflers made to put on the soundbird so it doesn't fly away.
mapSprite: {fileID: -8848419083337551572, guid: b285cfb6530624a44a95ec99a59d7215, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: BurgerBuns
m_EditorClassIdentifier:
_itemId: burgerbuns_4ccd8772
itemName: BurgerBuns
description: A pack of Burguer Buns, they need to be combined with the headband
to get "Bunfflers"

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: Headband
m_EditorClassIdentifier:
_itemId: headband_9a56f411
itemName: Headband
description: Item dropped by Uncle Kunt!
mapSprite: {fileID: 743298078511449570, guid: 6f463983177b1404ca39fa222f03a3b2, type: 3}

View File

@@ -12,6 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 951b5c8af5114086a865d4bb7eae4548, type: 3}
m_Name: SoundBird
m_EditorClassIdentifier:
_itemId: soundbird_16b17ba9
itemName: SoundBird
description: Objective Bird, escapes if player makes sound when close to it, stays
quiet if earmufflers are applied.

8
Assets/Dialogue.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dcec43b1a5d809b4187eb91cabd6b657
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 032495bac2b5aca4396a0a07774c8a57
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: a2334d3ee5254a2bbcb316035c681b27, type: 3}

View File

@@ -0,0 +1,819 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 61
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: 790b4d75d92f4b0984310a268dbd952f, type: 3}
m_Name: TestDialogue
m_EditorClassIdentifier: Unity.GraphToolkit.Editor::Unity.GraphToolkit.Editor.Implementation.GraphObjectImp
m_GraphModel:
rid: 1219994508087787734
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 1219994508087787734
type: {class: GraphModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 12720528336768607292
m_Value1: 4541789886294233460
m_HashGuid:
serializedVersion: 2
Hash: 3c246244206588b074910791d6ad073f
m_Name:
m_GraphNodeModels:
- rid: 1219994508087787747
- rid: 1219994508087787749
- rid: 1219994508087787751
- rid: 1219994508087787764
- rid: 1219994508087787770
- rid: 1219994508087787776
- rid: 1226592702090706949
m_GraphWireModels:
- rid: 1219994508087787755
- rid: 1219994508087787773
- rid: 1219994508087787779
- rid: 1219994508087787813
- rid: 1226592702090706955
- rid: 1226592702090706956
m_GraphStickyNoteModels: []
m_GraphPlacematModels: []
m_GraphVariableModels:
- rid: 1219994508087787760
m_GraphPortalModels: []
m_SectionModels:
- rid: 1219994508087787735
m_LocalSubgraphs: []
m_LastKnownBounds:
serializedVersion: 2
x: 128
y: -65
width: 2055
height: 243
m_GraphElementMetaData:
- m_Guid:
m_Value0: 13346176596883742728
m_Value1: 18083586785705260694
m_HashGuid:
serializedVersion: 2
Hash: 0820e35ee72437b996f6e8e25ecef5fa
m_Category: 0
m_Index: 0
- m_Guid:
m_Value0: 356371523793864382
m_Value1: 4751895819492649258
m_HashGuid:
serializedVersion: 2
Hash: be46cc430316f2042ae9853a1220f241
m_Category: 0
m_Index: 1
- m_Guid:
m_Value0: 8593691416048532199
m_Value1: 6890539440515769320
m_HashGuid:
serializedVersion: 2
Hash: e77ae5c2cfec4277e8e3c20e1d1da05f
m_Category: 0
m_Index: 2
- m_Guid:
m_Value0: 7709580528075638554
m_Value1: 12466507236153719696
m_HashGuid:
serializedVersion: 2
Hash: 1a8737a7a4eefd6a907bc7e847ee01ad
m_Category: 2
m_Index: 0
- m_Guid:
m_Value0: 13887651235662800591
m_Value1: 935957084791214113
m_HashGuid:
serializedVersion: 2
Hash: cf26320a38d9bac02190fd7b0230fd0c
m_Category: 1
m_Index: 0
- m_Guid:
m_Value0: 4225538081375705477
m_Value1: 10816025756629798206
m_HashGuid:
serializedVersion: 2
Hash: 85d948457f20a43a3e0d65b11e3e1a96
m_Category: 0
m_Index: 3
- m_Guid:
m_Value0: 1990642935411556156
m_Value1: 16710028644464764280
m_HashGuid:
serializedVersion: 2
Hash: 3cbfd8ef332fa01b78a5ecc384f2e5e7
m_Category: 0
m_Index: 4
- m_Guid:
m_Value0: 5477022009621441144
m_Value1: 13992127810305260154
m_HashGuid:
serializedVersion: 2
Hash: 786a7bce7f4a024c7afa1b291c062ec2
m_Category: 2
m_Index: 1
- m_Guid:
m_Value0: 10537482371379217669
m_Value1: 805153394380735108
m_HashGuid:
serializedVersion: 2
Hash: 05c5ff0463a83c928482c30dbf7a2c0b
m_Category: 0
m_Index: 5
- m_Guid:
m_Value0: 10238952115911916765
m_Value1: 16796494752743159762
m_HashGuid:
serializedVersion: 2
Hash: ddfc297db310188ed2f7f768fc2219e9
m_Category: 2
m_Index: 2
- m_Guid:
m_Value0: 10491986159911335451
m_Value1: 18287880145942505208
m_HashGuid:
serializedVersion: 2
Hash: 1b76d4d1d2059b91f866d271199acbfd
m_Category: 2
m_Index: 3
- m_Guid:
m_Value0: 3534792673092891566
m_Value1: 6472493350207860515
m_HashGuid:
serializedVersion: 2
Hash: aef35a42351b0e3123af37c668ead259
m_Category: 0
m_Index: 6
- m_Guid:
m_Value0: 1069232297653548642
m_Value1: 12871763382231758094
m_HashGuid:
serializedVersion: 2
Hash: 62b603141cadd60e0ef5cd3e99b0a1b2
m_Category: 2
m_Index: 4
- m_Guid:
m_Value0: 6652862542851746443
m_Value1: 1010545699289270970
m_HashGuid:
serializedVersion: 2
Hash: 8b2a2efe3bb7535cba8a6f9bf52d060e
m_Category: 2
m_Index: 5
m_EntryPoint:
rid: 1219994508087787747
m_Graph:
rid: 1219994508087787736
- rid: 1219994508087787735
type: {class: SectionModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 12939578175715148634
m_Value1: 2855330721591447007
m_HashGuid:
serializedVersion: 2
Hash: 5a03e642cb9d92b3dfcdb7c0292ca027
m_Version: 2
m_Items:
- rid: 1219994508087787760
m_Title:
- rid: 1219994508087787736
type: {class: DialogueGraph, ns: Editor.Dialogue, asm: AppleHillsEditor}
data:
- rid: 1219994508087787747
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 13346176596883742728
m_Value1: 18083586785705260694
m_HashGuid:
serializedVersion: 2
Hash: 0820e35ee72437b996f6e8e25ecef5fa
m_Version: 2
m_Position: {x: 316.4595, y: -65.01193}
m_Title:
m_Tooltip:
m_NodePreviewModel:
rid: -2
m_State: 0
m_InputConstantsById:
m_KeyList:
- SpeakerName
m_ValueList:
- rid: 1219994508087787766
m_InputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_OutputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_Collapsed: 0
m_CurrentModeIndex: 0
m_ElementColor:
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_HasUserColor: 0
m_Node:
rid: 1219994508087787748
- rid: 1219994508087787748
type: {class: StartNode, ns: Editor.Dialogue, asm: AppleHillsEditor}
data:
- rid: 1219994508087787749
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 356371523793864382
m_Value1: 4751895819492649258
m_HashGuid:
serializedVersion: 2
Hash: be46cc430316f2042ae9853a1220f241
m_Version: 2
m_Position: {x: 2070.2, y: 1.3479004}
m_Title:
m_Tooltip:
m_NodePreviewModel:
rid: -2
m_State: 0
m_InputConstantsById:
m_KeyList: []
m_ValueList: []
m_InputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_OutputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_Collapsed: 0
m_CurrentModeIndex: 0
m_ElementColor:
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_HasUserColor: 0
m_Node:
rid: 1219994508087787750
- rid: 1219994508087787750
type: {class: EndNode, ns: Editor.Dialogue, asm: AppleHillsEditor}
data:
- rid: 1219994508087787751
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 8593691416048532199
m_Value1: 6890539440515769320
m_HashGuid:
serializedVersion: 2
Hash: e77ae5c2cfec4277e8e3c20e1d1da05f
m_Version: 2
m_Position: {x: 530.97986, y: -60.683594}
m_Title:
m_Tooltip:
m_NodePreviewModel:
rid: -2
m_State: 0
m_InputConstantsById:
m_KeyList:
- __option_DialogueLineType
- __option_NoLines
- DefaultDialogueLine
- LoopThroughDefaultLines
m_ValueList:
- rid: 1219994508087787857
- rid: 1219994508087787858
- rid: 1219994508087787897
- rid: 1219994508087787904
m_InputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_OutputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_Collapsed: 0
m_CurrentModeIndex: 0
m_ElementColor:
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_HasUserColor: 0
m_Node:
rid: 1219994508087787752
- rid: 1219994508087787752
type: {class: DialogueNode, ns: Editor.Dialogue, asm: AppleHillsEditor}
data:
- rid: 1219994508087787755
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 7709580528075638554
m_Value1: 12466507236153719696
m_HashGuid:
serializedVersion: 2
Hash: 1a8737a7a4eefd6a907bc7e847ee01ad
m_Version: 2
m_FromPortReference:
m_NodeModelGuid:
m_Value0: 13346176596883742728
m_Value1: 18083586785705260694
m_NodeModelHashGuid:
serializedVersion: 2
Hash: 0820e35ee72437b996f6e8e25ecef5fa
m_UniqueId: out
m_PortDirection: 2
m_PortOrientation: 0
m_Title: out
m_ToPortReference:
m_NodeModelGuid:
m_Value0: 8593691416048532199
m_Value1: 6890539440515769320
m_NodeModelHashGuid:
serializedVersion: 2
Hash: e77ae5c2cfec4277e8e3c20e1d1da05f
m_UniqueId: in
m_PortDirection: 1
m_PortOrientation: 0
m_Title: in
- rid: 1219994508087787760
type: {class: VariableDeclarationModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 13887651235662800591
m_Value1: 935957084791214113
m_HashGuid:
serializedVersion: 2
Hash: cf26320a38d9bac02190fd7b0230fd0c
m_Version: 2
m_Name: Anna-Lyse
m_UniqueId:
m_DataType:
m_Identification: System.String, System.Private.CoreLib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089
m_IsExposed: 0
m_Scope: 0
m_ShowOnInspectorOnly: 0
m_Tooltip:
m_InitializationValue:
rid: 1219994508087787761
m_Modifiers: 0
m_VariableFlags: 0
- rid: 1219994508087787761
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: Anna-Lyse
- rid: 1219994508087787764
type: {class: VariableNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 4225538081375705477
m_Value1: 10816025756629798206
m_HashGuid:
serializedVersion: 2
Hash: 85d948457f20a43a3e0d65b11e3e1a96
m_Version: 2
m_Position: {x: 128.085, y: -12.860001}
m_Title: Anna-Lyse
m_Tooltip:
m_NodePreviewModel:
rid: -2
m_State: 0
m_InputConstantsById:
m_KeyList: []
m_ValueList: []
m_InputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_OutputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_Collapsed: 0
m_CurrentModeIndex: 0
m_ElementColor:
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_HasUserColor: 0
m_DeclarationModel:
rid: 1219994508087787760
m_DeclarationModelHashGuid:
serializedVersion: 2
Hash: cf26320a38d9bac02190fd7b0230fd0c
- rid: 1219994508087787766
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value:
- rid: 1219994508087787770
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 1990642935411556156
m_Value1: 16710028644464764280
m_HashGuid:
serializedVersion: 2
Hash: 3cbfd8ef332fa01b78a5ecc384f2e5e7
m_Version: 2
m_Position: {x: 914.5827, y: -60.08837}
m_Title: DialogueNode
m_Tooltip:
m_NodePreviewModel:
rid: -2
m_State: 0
m_InputConstantsById:
m_KeyList:
- __option_DialogueLineType
- __option_NoLines
- DefaultDialogueLine1
- DefaultDialogueLine2
- DefaultDialogueLine3
- LoopThroughDefaultLines
m_ValueList:
- rid: 1219994508087787860
- rid: 1219994508087787861
- rid: 1219994508087787900
- rid: 1219994508087787901
- rid: 1219994508087787902
- rid: 1219994508087787905
m_InputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_OutputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_Collapsed: 0
m_CurrentModeIndex: 0
m_ElementColor:
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_HasUserColor: 0
m_Node:
rid: 1219994508087787772
- rid: 1219994508087787772
type: {class: DialogueNode, ns: Editor.Dialogue, asm: AppleHillsEditor}
data:
- rid: 1219994508087787773
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 5477022009621441144
m_Value1: 13992127810305260154
m_HashGuid:
serializedVersion: 2
Hash: 786a7bce7f4a024c7afa1b291c062ec2
m_Version: 2
m_FromPortReference:
m_NodeModelGuid:
m_Value0: 8593691416048532199
m_Value1: 6890539440515769320
m_NodeModelHashGuid:
serializedVersion: 2
Hash: e77ae5c2cfec4277e8e3c20e1d1da05f
m_UniqueId: out
m_PortDirection: 2
m_PortOrientation: 0
m_Title: out
m_ToPortReference:
m_NodeModelGuid:
m_Value0: 1990642935411556156
m_Value1: 16710028644464764280
m_NodeModelHashGuid:
serializedVersion: 2
Hash: 3cbfd8ef332fa01b78a5ecc384f2e5e7
m_UniqueId: in
m_PortDirection: 1
m_PortOrientation: 0
m_Title: in
- rid: 1219994508087787776
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 10537482371379217669
m_Value1: 805153394380735108
m_HashGuid:
serializedVersion: 2
Hash: 05c5ff0463a83c928482c30dbf7a2c0b
m_Version: 2
m_Position: {x: 1294.008, y: -60.75061}
m_Title: DialogueNode
m_Tooltip:
m_NodePreviewModel:
rid: -2
m_State: 0
m_InputConstantsById:
m_KeyList:
- __option_DialogueLineType
- __option_NoLines
- DefaultDialogueLine
- LoopThroughDefaultLines
m_ValueList:
- rid: 1219994508087787863
- rid: 1219994508087787864
- rid: 1219994508087787898
- rid: 1219994508087787906
m_InputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_OutputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_Collapsed: 0
m_CurrentModeIndex: 0
m_ElementColor:
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_HasUserColor: 0
m_Node:
rid: 1219994508087787778
- rid: 1219994508087787778
type: {class: DialogueNode, ns: Editor.Dialogue, asm: AppleHillsEditor}
data:
- rid: 1219994508087787779
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 10238952115911916765
m_Value1: 16796494752743159762
m_HashGuid:
serializedVersion: 2
Hash: ddfc297db310188ed2f7f768fc2219e9
m_Version: 2
m_FromPortReference:
m_NodeModelGuid:
m_Value0: 1990642935411556156
m_Value1: 16710028644464764280
m_NodeModelHashGuid:
serializedVersion: 2
Hash: 3cbfd8ef332fa01b78a5ecc384f2e5e7
m_UniqueId: out
m_PortDirection: 2
m_PortOrientation: 0
m_Title: out
m_ToPortReference:
m_NodeModelGuid:
m_Value0: 10537482371379217669
m_Value1: 805153394380735108
m_NodeModelHashGuid:
serializedVersion: 2
Hash: 05c5ff0463a83c928482c30dbf7a2c0b
m_UniqueId: in
m_PortDirection: 1
m_PortOrientation: 0
m_Title: in
- rid: 1219994508087787813
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 10491986159911335451
m_Value1: 18287880145942505208
m_HashGuid:
serializedVersion: 2
Hash: 1b76d4d1d2059b91f866d271199acbfd
m_Version: 2
m_FromPortReference:
m_NodeModelGuid:
m_Value0: 4225538081375705477
m_Value1: 10816025756629798206
m_NodeModelHashGuid:
serializedVersion: 2
Hash: 85d948457f20a43a3e0d65b11e3e1a96
m_UniqueId: MainPortName
m_PortDirection: 2
m_PortOrientation: 0
m_Title: MainPortName
m_ToPortReference:
m_NodeModelGuid:
m_Value0: 13346176596883742728
m_Value1: 18083586785705260694
m_NodeModelHashGuid:
serializedVersion: 2
Hash: 0820e35ee72437b996f6e8e25ecef5fa
m_UniqueId: SpeakerName
m_PortDirection: 1
m_PortOrientation: 0
m_Title: SpeakerName
- rid: 1219994508087787857
type: {class: EnumConstant, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value:
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_Value: 0
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
- rid: 1219994508087787858
type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 1
- rid: 1219994508087787860
type: {class: EnumConstant, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value:
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_Value: 1
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
- rid: 1219994508087787861
type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 3
- rid: 1219994508087787863
type: {class: EnumConstant, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value:
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_Value: 0
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
- rid: 1219994508087787864
type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 1
- rid: 1219994508087787897
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: This is a first line of dialogue
- rid: 1219994508087787898
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: Another regular line
- rid: 1219994508087787900
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: One multiline
- rid: 1219994508087787901
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: Two multiline
- rid: 1219994508087787902
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: Three multiline
- rid: 1219994508087787904
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 0
- rid: 1219994508087787905
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 0
- rid: 1219994508087787906
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 0
- rid: 1226592702090706949
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor}
data:
m_Guid:
m_Value0: 3534792673092891566
m_Value1: 6472493350207860515
m_HashGuid:
serializedVersion: 2
Hash: aef35a42351b0e3123af37c668ead259
m_Version: 2
m_Position: {x: 1675.55, y: -47.149998}
m_Title: DialogueNode
m_Tooltip:
m_NodePreviewModel:
rid: -2
m_State: 0
m_InputConstantsById:
m_KeyList:
- __option_DialogueLineType
- __option_NoLines
- DefaultDialogueLine2
- LoopThroughDefaultLines
- DefaultDialogueLine1
m_ValueList:
- rid: 1226592702090706950
- rid: 1226592702090706951
- rid: 1226592702090706958
- rid: 1226592702090706953
- rid: 1226592702090706957
m_InputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_OutputPortInfos:
expandedPortsById:
m_KeyList: []
m_ValueList:
m_Collapsed: 0
m_CurrentModeIndex: 0
m_ElementColor:
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_HasUserColor: 0
m_Node:
rid: 1226592702090706954
- rid: 1226592702090706950
type: {class: EnumConstant, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value:
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_Value: 1
m_EnumType:
m_Identification: Editor.Dialogue.DialogueType, AppleHillsEditor, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
- rid: 1226592702090706951
type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 2
- rid: 1226592702090706953
type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: 1
- rid: 1226592702090706954
type: {class: DialogueNode, ns: Editor.Dialogue, asm: AppleHillsEditor}
data:
- rid: 1226592702090706955
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 1069232297653548642
m_Value1: 12871763382231758094
m_HashGuid:
serializedVersion: 2
Hash: 62b603141cadd60e0ef5cd3e99b0a1b2
m_Version: 2
m_FromPortReference:
m_NodeModelGuid:
m_Value0: 10537482371379217669
m_Value1: 805153394380735108
m_NodeModelHashGuid:
serializedVersion: 2
Hash: 05c5ff0463a83c928482c30dbf7a2c0b
m_UniqueId: out
m_PortDirection: 2
m_PortOrientation: 0
m_Title: out
m_ToPortReference:
m_NodeModelGuid:
m_Value0: 3534792673092891566
m_Value1: 6472493350207860515
m_NodeModelHashGuid:
serializedVersion: 2
Hash: aef35a42351b0e3123af37c668ead259
m_UniqueId: in
m_PortDirection: 1
m_PortOrientation: 0
m_Title: in
- rid: 1226592702090706956
type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Guid:
m_Value0: 6652862542851746443
m_Value1: 1010545699289270970
m_HashGuid:
serializedVersion: 2
Hash: 8b2a2efe3bb7535cba8a6f9bf52d060e
m_Version: 2
m_FromPortReference:
m_NodeModelGuid:
m_Value0: 3534792673092891566
m_Value1: 6472493350207860515
m_NodeModelHashGuid:
serializedVersion: 2
Hash: aef35a42351b0e3123af37c668ead259
m_UniqueId: out
m_PortDirection: 2
m_PortOrientation: 0
m_Title: out
m_ToPortReference:
m_NodeModelGuid:
m_Value0: 356371523793864382
m_Value1: 4751895819492649258
m_NodeModelHashGuid:
serializedVersion: 2
Hash: be46cc430316f2042ae9853a1220f241
m_UniqueId: in
m_PortDirection: 1
m_PortOrientation: 0
m_Title: in
- rid: 1226592702090706957
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: And we're...
- rid: 1226592702090706958
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor}
data:
m_Value: ...in a loop

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9050f99a225035b40b415df272d2b341
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -4,7 +4,9 @@
"references": [
"GUID:d91d3f46515a6954caa674697afbf416",
"GUID:69448af7b92c7f342b298e06a37122aa",
"GUID:9e24947de15b9834991c9d8411ea37cf"
"GUID:9e24947de15b9834991c9d8411ea37cf",
"GUID:70ef9a24f4cfc4aec911c1414e3f90ad",
"GUID:d1e08c06f8f9473888c892637c83c913"
],
"includePlatforms": [
"Editor"

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5ced9daeaad4427f9feb953a53b6d3df
timeCreated: 1758869763

View File

@@ -0,0 +1,20 @@
using System;
using UnityEngine;
using UnityEditor;
using Unity.GraphToolkit.Editor;
namespace Editor.Dialogue
{
[Serializable]
[Graph(AssetExtension)]
public class DialogueGraph : Graph
{
public const string AssetExtension = "dialoguegraph";
[MenuItem("Assets/Create/Dialogue Graph", false)]
private static void CreateAssetFile()
{
GraphDatabase.PromptInProjectBrowserToCreateNewAsset<DialogueGraph>();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: eff5cdbb7a22496e93560cffa5754029
timeCreated: 1758869773

View File

@@ -0,0 +1,262 @@
using UnityEngine;
using UnityEditor.AssetImporters;
using Unity.GraphToolkit.Editor;
using System;
using System.Collections.Generic;
using System.Linq;
using Dialogue;
using PuzzleS;
namespace Editor.Dialogue
{
[ScriptedImporter(1, DialogueGraph.AssetExtension)]
public class DialogueGraphImporter : ScriptedImporter
{
public override void OnImportAsset(AssetImportContext ctx)
{
DialogueGraph editorGraph = GraphDatabase.LoadGraphForImporter<DialogueGraph>(ctx.assetPath);
RuntimeDialogueGraph runtimeGraph = ScriptableObject.CreateInstance<RuntimeDialogueGraph>();
var nodeIDMap = new Dictionary<INode, string>();
// Generate stable GUIDs for each node
foreach (var node in editorGraph.GetNodes())
{
nodeIDMap[node] = Guid.NewGuid().ToString();
}
// Process start node to get entry point and speaker name
var startNode = editorGraph.GetNodes().OfType<StartNode>().FirstOrDefault();
if (startNode != null)
{
var entryPoint = startNode.GetOutputPorts().FirstOrDefault()?.firstConnectedPort;
if (entryPoint != null)
{
runtimeGraph.entryNodeID = nodeIDMap[entryPoint.GetNode()];
}
runtimeGraph.speakerName = GetPortValue<string>(startNode.GetInputPortByName("SpeakerName"));
}
// Process each node in the graph
foreach (var iNode in editorGraph.GetNodes())
{
if (iNode is StartNode || iNode is IVariableNode)
continue;
var runtimeNode = new RuntimeDialogueNode{ nodeID = nodeIDMap[iNode] };
// Process node based on its type
if (iNode is DialogueNode dialogueNode)
{
// Process base dialogue node properties (for all node types)
ProcessDialogueNodeBase(dialogueNode, runtimeNode);
if (iNode is WaitOnPuzzleStep puzzleNode)
{
ProcessPuzzleNode(puzzleNode, runtimeNode);
}
else if (iNode is WaitOnPickup pickupNode)
{
ProcessPickupNode(pickupNode, runtimeNode);
}
else if (iNode is WaitOnSlot slotNode)
{
ProcessSlotNode(slotNode, runtimeNode);
}
else if (iNode is WaitOnCombination combinationNode)
{
ProcessCombinationNode(combinationNode, runtimeNode);
}
}
else if (iNode is EndNode)
{
runtimeNode.nodeType = RuntimeDialogueNodeType.End;
// End nodes don't have next nodes, so we don't need to look for "out" ports
}
// Get next node connection (skip for EndNodes as they don't have out ports)
if (!(iNode is EndNode))
{
// Check if the node has output ports before trying to get one by name
var outputPorts = iNode.GetOutputPorts();
if (outputPorts != null && outputPorts.Any())
{
var outPort = outputPorts.FirstOrDefault(p => p.name == "out");
if (outPort != null && outPort.firstConnectedPort != null)
{
runtimeNode.nextNodeID = nodeIDMap[outPort.firstConnectedPort.GetNode()];
}
}
}
// Add node to runtime graph
runtimeGraph.allNodes.Add(runtimeNode);
}
ctx.AddObjectToAsset("RuntimeData", runtimeGraph);
ctx.SetMainObject(runtimeGraph);
Debug.Log($"Imported DialogueGraph with {runtimeGraph.allNodes.Count} nodes.");
}
private void ProcessDialogueNodeBase(DialogueNode node, RuntimeDialogueNode runtimeNode)
{
// Set default node type
runtimeNode.nodeType = RuntimeDialogueNodeType.Dialogue;
// Get line type and count options
var lineTypeOption = node.GetNodeOptionByName("DialogueLineType");
lineTypeOption.TryGetValue<DialogueType>(out var lineType);
var lineCountOption = node.GetNodeOptionByName("NoLines");
lineCountOption.TryGetValue<int>(out var lineCount);
// Process dialogue lines based on line type
if (lineType == DialogueType.SayMultipleLines)
{
for (var i = 0; i < lineCount; i++)
{
var lineValue = GetPortValue<string>(node.GetInputPortByName($"DefaultDialogueLine{i + 1}"));
if (!string.IsNullOrEmpty(lineValue))
{
runtimeNode.dialogueLines.Add(lineValue);
}
}
}
else
{
var lineValue = GetPortValue<string>(node.GetInputPortByName("DefaultDialogueLine"));
if (!string.IsNullOrEmpty(lineValue))
{
runtimeNode.dialogueLines.Add(lineValue);
}
}
// Get loop through lines option
var loopThroughLines = GetPortValue<bool>(node.GetInputPortByName("LoopThroughDefaultLines"));
runtimeNode.loopThroughLines = loopThroughLines;
}
private void ProcessPuzzleNode(WaitOnPuzzleStep node, RuntimeDialogueNode runtimeNode)
{
runtimeNode.nodeType = RuntimeDialogueNodeType.WaitOnPuzzleStep;
var puzzleStep = GetPortValue<PuzzleStepSO>(node.GetInputPortByName("RequiredPuzzleStep"));
if (puzzleStep != null)
{
runtimeNode.puzzleStepID = puzzleStep.stepId;
}
}
private void ProcessPickupNode(WaitOnPickup node, RuntimeDialogueNode runtimeNode)
{
runtimeNode.nodeType = RuntimeDialogueNodeType.WaitOnPickup;
var pickup = GetPortValue<PickupItemData>(node.GetInputPortByName("RequiredPickup"));
if (pickup != null)
{
runtimeNode.pickupItemID = pickup.itemId;
}
}
private void ProcessSlotNode(WaitOnSlot node, RuntimeDialogueNode runtimeNode)
{
runtimeNode.nodeType = RuntimeDialogueNodeType.WaitOnSlot;
var slot = GetPortValue<PickupItemData>(node.GetInputPortByName("RequiredSlot"));
if (slot != null)
{
runtimeNode.slotItemID = slot.itemId;
}
// Process incorrect item lines
var incorrectItemLineTypeOption = node.GetNodeOptionByName("IncorrectItemDialogueLineType");
incorrectItemLineTypeOption.TryGetValue<DialogueType>(out var incorrectItemLineType);
var incorrectItemLineCountOption = node.GetNodeOptionByName("IncorrectItemNoLines");
incorrectItemLineCountOption.TryGetValue<int>(out var incorrectItemLineCount);
if (incorrectItemLineType == DialogueType.SayMultipleLines)
{
for (var i = 0; i < incorrectItemLineCount; i++)
{
var lineValue = GetPortValue<string>(node.GetInputPortByName($"IncorrectItemDialogueLine{i + 1}"));
if (!string.IsNullOrEmpty(lineValue))
{
runtimeNode.incorrectItemLines.Add(lineValue);
}
}
}
else
{
var lineValue = GetPortValue<string>(node.GetInputPortByName("IncorrectItemDialogueLine"));
if (!string.IsNullOrEmpty(lineValue))
{
runtimeNode.incorrectItemLines.Add(lineValue);
}
}
runtimeNode.loopThroughIncorrectLines =
GetPortValue<bool>(node.GetInputPortByName("LoopThroughIncorrectItemLines"));
// Process forbidden item lines
var forbiddenItemLineTypeOption = node.GetNodeOptionByName("ForbiddenItemDialogueLineType");
forbiddenItemLineTypeOption.TryGetValue<DialogueType>(out var forbiddenItemLineType);
var forbiddenItemLineCountOption = node.GetNodeOptionByName("ForbiddenItemNoLines");
forbiddenItemLineCountOption.TryGetValue<int>(out var forbiddenItemLineCount);
if (forbiddenItemLineType == DialogueType.SayMultipleLines)
{
for (var i = 0; i < forbiddenItemLineCount; i++)
{
var lineValue = GetPortValue<string>(node.GetInputPortByName($"ForbiddenItemDialogueLine{i + 1}"));
if (!string.IsNullOrEmpty(lineValue))
{
runtimeNode.forbiddenItemLines.Add(lineValue);
}
}
}
else
{
var lineValue = GetPortValue<string>(node.GetInputPortByName("ForbiddenItemDialogueLine"));
if (!string.IsNullOrEmpty(lineValue))
{
runtimeNode.forbiddenItemLines.Add(lineValue);
}
}
runtimeNode.loopThroughForbiddenLines =
GetPortValue<bool>(node.GetInputPortByName("LoopThroughForbiddenItemLines"));
}
// Add new method to process combination nodes
private void ProcessCombinationNode(WaitOnCombination node, RuntimeDialogueNode runtimeNode)
{
runtimeNode.nodeType = RuntimeDialogueNodeType.WaitOnCombination;
var resultItem = GetPortValue<PickupItemData>(node.GetInputPortByName("RequiredResultItem"));
if (resultItem != null)
{
runtimeNode.combinationResultItemID = resultItem.itemId;
}
}
private T GetPortValue<T>(IPort port)
{
if (port == null) return default(T);
if (port.isConnected)
{
if (port.firstConnectedPort.GetNode() is IVariableNode variableNode)
{
variableNode.variable.TryGetDefaultValue(out T value);
return value;
}
}
port.TryGetValue(out T fallbackValue);
return fallbackValue;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a2334d3ee5254a2bbcb316035c681b27
timeCreated: 1758871584

View File

@@ -0,0 +1,209 @@
using UnityEngine;
using Unity.GraphToolkit.Editor;
using System;
namespace Editor.Dialogue
{
[Serializable]
public class StartNode : Node
{
protected override void OnDefinePorts(IPortDefinitionContext context)
{
context.AddOutputPort("out").Build();
context.AddInputPort<string>("SpeakerName").Build();
}
}
[Serializable]
public class EndNode : Node
{
protected override void OnDefinePorts(IPortDefinitionContext context)
{
context.AddInputPort("in").Build();
}
}
[Serializable]
public enum DialogueType
{
SayOneLine,
SayMultipleLines
}
[Serializable]
public class DialogueNode : Node
{
const string LineTypeOptionName = "DialogueLineType";
const string NoLinesOptionName = "NoLines";
const string LoopThroughDefaultLinesOptionName = "LoopThroughDefaultLines";
const string DefaultDialogueLineOptionName = "DefaultDialogueLine";
protected override void OnDefineOptions(IOptionDefinitionContext context)
{
context.AddOption<DialogueType>(LineTypeOptionName)
.WithDisplayName("Default Line Type")
.WithDefaultValue(DialogueType.SayOneLine)
.Delayed();
context.AddOption<int>(NoLinesOptionName)
.WithDisplayName("Number of Default Lines")
.WithDefaultValue(1)
.Delayed();
}
protected override void OnDefinePorts(IPortDefinitionContext context)
{
context.AddInputPort("in").Build();
context.AddOutputPort("out").Build();
var lineTypeOption = GetNodeOptionByName(LineTypeOptionName);
lineTypeOption.TryGetValue<DialogueType>(out var lineType);
var lineCountOption = GetNodeOptionByName(NoLinesOptionName);
lineCountOption.TryGetValue<int>(out var lineCount);
if (lineType == DialogueType.SayMultipleLines)
{
for (var i = 0; i < lineCount; i++)
{
context.AddInputPort<string>($"{DefaultDialogueLineOptionName}{i + 1}").WithDisplayName($"Default Dialogue Line {i + 1}").Build();
}
}
else
{
context.AddInputPort<string>($"{DefaultDialogueLineOptionName}").WithDisplayName("Default Dialogue Line").Build();
}
context.AddInputPort<bool>($"{LoopThroughDefaultLinesOptionName}").WithDisplayName("Loop Through Default Lines?").Build();
}
}
[Serializable]
public class WaitOnPuzzleStep : DialogueNode
{
const string RequiredPuzzleStep = "RequiredPuzzleStep";
protected override void OnDefinePorts(IPortDefinitionContext context)
{
context.AddInputPort<PuzzleStepSO>(RequiredPuzzleStep).WithDisplayName("Required Puzzle Step").Build();
base.OnDefinePorts(context);
}
}
[Serializable]
public class WaitOnPickup : DialogueNode
{
const string RequiredPickupsOptionName = "RequiredPickup";
protected override void OnDefinePorts(IPortDefinitionContext context)
{
context.AddInputPort<PickupItemData>(RequiredPickupsOptionName).WithDisplayName("Required Pickup").Build();
base.OnDefinePorts(context);
}
}
[Serializable]
public class WaitOnSlot : DialogueNode
{
const string RequiredSlotOptionName = "RequiredSlot";
// Incorrect item - i.e. not the correct one but also not forbidden
const string IncorrectItemLineTypeOptionName = "IncorrectItemDialogueLineType";
const string IncorrectItemNoLinesOptionName = "IncorrectItemNoLines";
const string LoopThroughIncorrectItemLinesOptionName = "LoopThroughIncorrectItemLines";
const string IncorrectIteDialogueLineOptionName = "IncorrectItemDialogueLine";
// Explicitely forbidden item
const string ForbiddenItemLineTypeOptionName = "ForbiddenItemDialogueLineType";
const string ForbiddenItemNoLinesOptionName = "ForbiddenItemNoLines";
const string LoopThroughForbiddenItemLinesOptionName = "LoopThroughForbiddenItemLines";
const string ForbiddenIteDialogueLineOptionName = "ForbiddenItemDialogueLine";
protected override void OnDefineOptions(IOptionDefinitionContext context)
{
base.OnDefineOptions(context);
// Incorrect
context.AddOption<DialogueType>(IncorrectItemLineTypeOptionName)
.WithDisplayName("Incorrect Item Line Type")
.WithDefaultValue(DialogueType.SayOneLine)
.Delayed();
context.AddOption<int>(IncorrectItemNoLinesOptionName)
.WithDisplayName("Number of Incorrect Item Lines")
.WithDefaultValue(1)
.Delayed();
// Forbidden
context.AddOption<DialogueType>(ForbiddenItemLineTypeOptionName)
.WithDisplayName("Forbidden Item Line Type")
.WithDefaultValue(DialogueType.SayOneLine)
.Delayed();
context.AddOption<int>(ForbiddenItemNoLinesOptionName)
.WithDisplayName("Forbidden of Incorrect Item Lines")
.WithDefaultValue(1)
.Delayed();
}
protected override void OnDefinePorts(IPortDefinitionContext context)
{
context.AddInputPort<PickupItemData>(RequiredSlotOptionName).WithDisplayName("Required Slot").Build();
base.OnDefinePorts(context);
// Incorrect
var incorrectItemLineTypeOption = GetNodeOptionByName(IncorrectItemLineTypeOptionName);
incorrectItemLineTypeOption.TryGetValue<DialogueType>(out var incorrectItemLineType);
var incorrectItemLineCountOption = GetNodeOptionByName(IncorrectItemNoLinesOptionName);
incorrectItemLineCountOption.TryGetValue<int>(out var incorrectItemLineCount);
if (incorrectItemLineType == DialogueType.SayMultipleLines)
{
for (var i = 0; i < incorrectItemLineCount; i++)
{
context.AddInputPort<string>($"{IncorrectIteDialogueLineOptionName}{i + 1}").WithDisplayName($"Incorrect Item Dialogue Line {i + 1}").Build();
}
}
else
{
context.AddInputPort<string>($"{IncorrectIteDialogueLineOptionName}").WithDisplayName("Incorrect Item Dialogue Line").Build();
}
context.AddInputPort<bool>($"{LoopThroughIncorrectItemLinesOptionName}").WithDisplayName("Loop Through Incorrect Item Lines?").Build();
// Forbidden
var forbiddenItemLineTypeOption = GetNodeOptionByName(ForbiddenItemLineTypeOptionName);
forbiddenItemLineTypeOption.TryGetValue<DialogueType>(out var forbiddenItemLineType);
var forbiddenItemLineCountOption = GetNodeOptionByName(ForbiddenItemNoLinesOptionName);
forbiddenItemLineCountOption.TryGetValue<int>(out var forbiddenItemLineCount);
if (forbiddenItemLineType == DialogueType.SayMultipleLines)
{
for (var i = 0; i < forbiddenItemLineCount; i++)
{
context.AddInputPort<string>($"{ForbiddenIteDialogueLineOptionName}{i + 1}").WithDisplayName($"Forbidden Item Dialogue Line {i + 1}").Build();
}
}
else
{
context.AddInputPort<string>($"{ForbiddenIteDialogueLineOptionName}").WithDisplayName("Forbidden Item Dialogue Line").Build();
}
context.AddInputPort<bool>($"{LoopThroughForbiddenItemLinesOptionName}").WithDisplayName("Loop Through Forbidden Item Lines?").Build();
}
}
[Serializable]
public class WaitOnCombination : DialogueNode
{
const string RequiredResultItemOptionName = "RequiredResultItem";
protected override void OnDefinePorts(IPortDefinitionContext context)
{
context.AddInputPort<PickupItemData>(RequiredResultItemOptionName).WithDisplayName("Required Result Item").Build();
base.OnDefinePorts(context);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a8b3213c46b447a9adc5627a273f2b2d
timeCreated: 1758870466

View File

@@ -0,0 +1,46 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6399527186463168339
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7768516537241418043}
- component: {fileID: 4607144289768175859}
m_Layer: 0
m_Name: ItemManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7768516537241418043
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6399527186463168339}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2.64965, y: 3.24335, 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!114 &4607144289768175859
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6399527186463168339}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a78fe78378e6426da43710f6d0ae84ba, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Core.ItemManager

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ac41583865245bc4bb3de6c15929b9fc
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,442 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1494212192306772670
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8307219291215824345}
- component: {fileID: 9002038557409323574}
- component: {fileID: 4498241824153346754}
- component: {fileID: 3123748273643935430}
m_Layer: 5
m_Name: SpeechBubble
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8307219291215824345
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1494212192306772670}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1539728007164444029}
m_Father: {fileID: 3484825090253933040}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 50}
m_SizeDelta: {x: 400, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &9002038557409323574
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1494212192306772670}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &4498241824153346754
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1494212192306772670}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!114 &3123748273643935430
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1494212192306772670}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinHeight: -1
m_PreferredWidth: 400
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &5048280843231724144
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7704981663008171144}
- component: {fileID: 5689339761876843762}
- component: {fileID: 4573570654593171780}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7704981663008171144
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5048280843231724144}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1539728007164444029}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5689339761876843762
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5048280843231724144}
m_CullTransparentMesh: 1
--- !u!114 &4573570654593171780
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5048280843231724144}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Hey there buster!
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 0.8207547, g: 0.011614433, b: 0.011614433, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 1
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 35
m_fontSizeBase: 35
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &6499933157207406972
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3484825090253933040}
- component: {fileID: 3535066688902750632}
- component: {fileID: 6771925387362164676}
- component: {fileID: 9137259633125916521}
m_Layer: 5
m_Name: DialogueCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3484825090253933040
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6499933157207406972}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 8307219291215824345}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &3535066688902750632
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6499933157207406972}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: -1132846201
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &6771925387362164676
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6499933157207406972}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!114 &9137259633125916521
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6499933157207406972}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &8341977934938436915
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1539728007164444029}
- component: {fileID: 2528298462582055986}
- component: {fileID: 60731842453945467}
- component: {fileID: 7607150792847151459}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1539728007164444029
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8341977934938436915}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7704981663008171144}
m_Father: {fileID: 8307219291215824345}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2528298462582055986
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8341977934938436915}
m_CullTransparentMesh: 0
--- !u!114 &60731842453945467
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8341977934938436915}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: -904705141413079607, guid: 5710afcaa2eca3d41b7fc78d09652325, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1.72
--- !u!114 &7607150792847151459
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8341977934938436915}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
m_Padding:
m_Left: 25
m_Right: 25
m_Top: 25
m_Bottom: 70
m_ChildAlignment: 4
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a8b0a1c6cf21352439dc24d3b03182db
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -309,7 +309,7 @@ PrefabInstance:
objectReference: {fileID: -8109988653212156562, guid: 77ab3d770c92d5344b36eee3293a0f94, type: 3}
- target: {fileID: 6350287859698694726, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: m_Name
value: TestAss
value: TestAss3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -771,6 +771,214 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
--- !u!114 &614125440 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4573570654593171780, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 7880670876025270805}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
--- !u!1001 &677854359
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1238302921}
m_Modifications:
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 2.55
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.17
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3535066688902750632, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Camera
value:
objectReference: {fileID: 1741016589}
- target: {fileID: 6499933157207406972, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Name
value: DialogueCanvas
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8307219291215824345, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 1494212192306772670, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
insertIndex: -1
addedObject: {fileID: 677854363}
m_SourcePrefab: {fileID: 100100000, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
--- !u!224 &677854360 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 677854359}
m_PrefabAsset: {fileID: 0}
--- !u!114 &677854361 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4573570654593171780, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 677854359}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
--- !u!1 &677854362 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1494212192306772670, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 677854359}
m_PrefabAsset: {fileID: 0}
--- !u!114 &677854363
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677854362}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb3605ae81a54d2689504e0cd456ac27, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.SpeechBubble
textDisplay: {fileID: 677854361}
displayMode: 1
typewriterSpeed: 0.02
typingSoundSource: {fileID: 0}
typingSoundFrequency: 3
useRichText: 1
dialogueDisplayTime: 1.5
dialoguePromptText: . . .
--- !u!4 &754397347 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2844046668579196942, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
@@ -998,7 +1206,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6350287859698694726, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
propertyPath: m_Name
value: TestAss
value: TestAss2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -1114,6 +1322,186 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
--- !u!1 &1238302916
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1238302921}
- component: {fileID: 1238302920}
- component: {fileID: 1238302919}
- component: {fileID: 1238302918}
- component: {fileID: 1238302917}
m_Layer: 10
m_Name: TestNPC (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1238302917
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238302916}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 73d6494a73174ffabc6a7d3089d51e73, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Interactions.Interactable
isOneTime: 0
cooldown: -1
characterToInteract: 1
interactionStarted:
m_PersistentCalls:
m_Calls: []
interactionInterrupted:
m_PersistentCalls:
m_Calls: []
characterArrived:
m_PersistentCalls:
m_Calls: []
interactionComplete:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1238302918
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238302916}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 25bbad45f1fa4183b30ad76c62256fd6, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.DialogueComponent
dialogueGraph: {fileID: 3965311268370046156, guid: 032495bac2b5aca4396a0a07774c8a57, type: 3}
--- !u!61 &1238302919
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238302916}
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: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1.58, y: 3.16}
newSize: {x: 1.58, y: 3.16}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 1.58, y: 3.16}
m_EdgeRadius: 0
--- !u!212 &1238302920
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238302916}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: -4209461767521648114, guid: 95abe5ab485a1c64b977f3dd2aff5256, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.58, y: 3.16}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &1238302921
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1238302916}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -37.15, y: -16.03, z: 0}
m_LocalScale: {x: 3.2097, y: 3.2097, z: 3.2097}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 677854360}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1255598765
GameObject:
m_ObjectHideFlags: 0
@@ -1330,6 +1718,31 @@ BoxCollider2D:
m_AutoTiling: 0
m_Size: {x: 19.2, y: 10.8}
m_EdgeRadius: 0
--- !u!1 &1300234226 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1494212192306772670, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 7880670876025270805}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1300234231
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1300234226}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb3605ae81a54d2689504e0cd456ac27, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.SpeechBubble
textDisplay: {fileID: 614125440}
displayMode: 1
typewriterSpeed: 0.02
typingSoundSource: {fileID: 0}
typingSoundFrequency: 3
useRichText: 1
dialogueDisplayTime: 1.5
dialoguePromptText: . . .
--- !u!4 &1309036670 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3823830588451517910, guid: 301b4e0735896334f8f6fb9a68a7e419, type: 3}
@@ -1475,6 +1888,191 @@ PrefabInstance:
insertIndex: -1
addedObject: {fileID: 1631660124}
m_SourcePrefab: {fileID: 100100000, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
--- !u!1 &1443361595
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1443361597}
- component: {fileID: 1443361596}
- component: {fileID: 1443361598}
- component: {fileID: 1443361599}
- component: {fileID: 1443361600}
m_Layer: 10
m_Name: TestNPC
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &1443361596
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443361595}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: -4209461767521648114, guid: 95abe5ab485a1c64b977f3dd2aff5256, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.58, y: 3.16}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &1443361597
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443361595}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -53.12, y: 5.36, z: 0}
m_LocalScale: {x: 3.2097, y: 3.2097, z: 3.2097}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1522460111}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &1443361598
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443361595}
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: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1.58, y: 3.16}
newSize: {x: 1.58, y: 3.16}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 1.58, y: 3.16}
m_EdgeRadius: 0
--- !u!114 &1443361599
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443361595}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 25bbad45f1fa4183b30ad76c62256fd6, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.DialogueComponent
dialogueGraph: {fileID: 3965311268370046156, guid: 9050f99a225035b40b415df272d2b341, type: 3}
--- !u!114 &1443361600
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443361595}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 73d6494a73174ffabc6a7d3089d51e73, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Interactions.Interactable
isOneTime: 0
cooldown: -1
characterToInteract: 1
interactionStarted:
m_PersistentCalls:
m_Calls: []
interactionInterrupted:
m_PersistentCalls:
m_Calls: []
characterArrived:
m_PersistentCalls:
m_Calls: []
interactionComplete:
m_PersistentCalls:
m_Calls: []
--- !u!224 &1522460111 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 7880670876025270805}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1553825406 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2844046668579196942, guid: b5fc01af35233eb4cbeede05e50a7c34, type: 3}
@@ -2025,6 +2623,162 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8ac0210dbf9d7754e9526d6d5c214f49, type: 3}
--- !u!1001 &7880670876025270805
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1443361597}
m_Modifications:
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1539728007164444029, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 2.55
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 3.17
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3535066688902750632, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Camera
value:
objectReference: {fileID: 1741016589}
- target: {fileID: 6499933157207406972, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_Name
value: DialogueCanvas
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7704981663008171144, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8307219291215824345, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 1494212192306772670, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
insertIndex: -1
addedObject: {fileID: 1300234231}
m_SourcePrefab: {fileID: 100100000, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
--- !u!1001 &8865498003578620591
PrefabInstance:
m_ObjectHideFlags: 0
@@ -2100,3 +2854,5 @@ SceneRoots:
- {fileID: 1336824707}
- {fileID: 384576747}
- {fileID: 1668240411}
- {fileID: 1443361597}
- {fileID: 1238302921}

View File

@@ -172,6 +172,8 @@ SpriteRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
@@ -193,6 +195,7 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -253,6 +256,51 @@ BoxCollider2D:
m_AutoTiling: 0
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!1 &1334266842
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1334266844}
- component: {fileID: 1334266843}
m_Layer: 0
m_Name: DialogueTest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1334266843
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1334266842}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 749c3dece1c14b82845c175203a2e7dc, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Dialogue.DialogueComponent
runtimeGraph: {fileID: 3965311268370046156, guid: 9050f99a225035b40b415df272d2b341, type: 3}
--- !u!4 &1334266844
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1334266842}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.64555, y: 2.05444, 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!1 &1507068790
GameObject:
m_ObjectHideFlags: 0
@@ -264,6 +312,7 @@ GameObject:
- component: {fileID: 1507068793}
- component: {fileID: 1507068792}
- component: {fileID: 1507068791}
- component: {fileID: 1507068794}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@@ -345,6 +394,50 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1507068794
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1507068790}
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 &1851499346
GameObject:
m_ObjectHideFlags: 0
@@ -429,6 +522,8 @@ SpriteRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
@@ -450,6 +545,7 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -518,3 +614,4 @@ SceneRoots:
- {fileID: 1851499349}
- {fileID: 2029728268}
- {fileID: 465048834}
- {fileID: 1334266844}

View File

@@ -0,0 +1,263 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using Interactions;
namespace Core
{
/// <summary>
/// Central registry for pickups and item slots.
/// Mirrors the singleton pattern used by PuzzleManager.
/// </summary>
public class ItemManager : MonoBehaviour
{
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;
}
}
private readonly HashSet<Pickup> _pickups = new HashSet<Pickup>();
private readonly HashSet<ItemSlot> _itemSlots = new HashSet<ItemSlot>();
private readonly HashSet<string> _itemsCreatedThroughCombination = new HashSet<string>();
// Central events forwarded from registered pickups/slots
// Broadcasts when any registered pickup was picked up (passes the picked item data)
public event Action<PickupItemData> OnItemPickedUp;
// Broadcasts when any registered ItemSlot reports a correct item slotted
// Args: slot's itemData (the slot definition), then the slotted item data
public event Action<PickupItemData, PickupItemData> OnCorrectItemSlotted;
// Broadcasts when any registered ItemSlot reports an incorrect item slotted
// Args: slot's itemData (the slot definition), then the slotted item data
public event Action<PickupItemData, PickupItemData> OnIncorrectItemSlotted;
// Broadcasts when any registered ItemSlot reports a forbidden item slotted
// Args: slot's itemData (the slot definition), then the slotted item data
public event Action<PickupItemData, PickupItemData> OnForbiddenItemSlotted;
// Broadcasts when any registered ItemSlot is cleared (item removed)
// Args: the item data that was removed
public event Action<PickupItemData> OnItemSlotCleared;
// Broadcasts when any two items are successfully combined
// Args: first item data, second item data, result item data
public event Action<PickupItemData, PickupItemData, PickupItemData> OnItemsCombined;
void Awake()
{
_instance = this;
}
void Start()
{
// 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;
}
void OnDestroy()
{
// Unsubscribe from SceneManagerService
if (SceneManagerService.Instance != null)
SceneManagerService.Instance.SceneLoadStarted -= OnSceneLoadStarted;
// Ensure we clean up any subscriptions from registered items when the manager is destroyed
ClearAllRegistrations();
}
void OnApplicationQuit()
{
_isQuitting = true;
}
private void OnSceneLoadStarted(string sceneName)
{
// Clear all registrations when a new scene is loaded, so no stale references persist
ClearAllRegistrations();
}
// Handler that forwards pickup events
private void Pickup_OnItemPickedUp(PickupItemData data)
{
OnItemPickedUp?.Invoke(data);
}
// Handler that forwards correct-slot events
private void ItemSlot_OnCorrectItemSlotted(PickupItemData slotData, PickupItemData slottedItem)
{
OnCorrectItemSlotted?.Invoke(slotData, slottedItem);
}
// Handler that forwards incorrect-slot events
private void ItemSlot_OnIncorrectItemSlotted(PickupItemData slotData, PickupItemData slottedItem)
{
OnIncorrectItemSlotted?.Invoke(slotData, slottedItem);
}
// Handler that forwards forbidden-slot events
private void ItemSlot_OnForbiddenItemSlotted(PickupItemData slotData, PickupItemData slottedItem)
{
OnForbiddenItemSlotted?.Invoke(slotData, slottedItem);
}
// Handler that forwards item combination events
private void Pickup_OnItemsCombined(PickupItemData itemA, PickupItemData itemB, PickupItemData resultItem)
{
// Track the created item
if (resultItem != null)
{
_itemsCreatedThroughCombination.Add(resultItem.itemId);
}
OnItemsCombined?.Invoke(itemA, itemB, resultItem);
}
// Handler that forwards slot-removed events
private void ItemSlot_OnItemSlotRemoved(PickupItemData removedItem)
{
OnItemSlotCleared?.Invoke(removedItem);
}
/// <summary>
/// Unsubscribe all pickup/slot event handlers and clear registries and manager events.
/// </summary>
private void ClearAllRegistrations()
{
// Unsubscribe pickup handlers
var pickupsCopy = new List<Pickup>(_pickups);
foreach (var p in pickupsCopy)
{
if (p != null)
{
p.OnItemPickedUp -= Pickup_OnItemPickedUp;
p.OnItemsCombined -= Pickup_OnItemsCombined;
}
}
_pickups.Clear();
// Unsubscribe slot handlers
var slotsCopy = new List<ItemSlot>(_itemSlots);
foreach (var s in slotsCopy)
{
if (s != null)
{
s.OnCorrectItemSlotted -= ItemSlot_OnCorrectItemSlotted;
s.OnIncorrectItemSlotted -= ItemSlot_OnIncorrectItemSlotted;
s.OnForbiddenItemSlotted -= ItemSlot_OnForbiddenItemSlotted;
s.OnItemSlotRemoved -= ItemSlot_OnItemSlotRemoved;
}
}
_itemSlots.Clear();
// Clear item tracking
_itemsCreatedThroughCombination.Clear();
// Clear manager-level event subscribers
OnItemPickedUp = null;
OnCorrectItemSlotted = null;
OnIncorrectItemSlotted = null;
OnForbiddenItemSlotted = null;
OnItemSlotCleared = null;
OnItemsCombined = null;
}
public void RegisterPickup(Pickup pickup)
{
if (pickup == null) return;
// only subscribe if newly added to avoid duplicate subscriptions
if (_pickups.Add(pickup))
{
pickup.OnItemPickedUp += Pickup_OnItemPickedUp;
pickup.OnItemsCombined += Pickup_OnItemsCombined;
}
}
public void UnregisterPickup(Pickup pickup)
{
if (pickup == null) return;
if (_pickups.Remove(pickup))
{
pickup.OnItemPickedUp -= Pickup_OnItemPickedUp;
pickup.OnItemsCombined -= Pickup_OnItemsCombined;
}
}
public void RegisterItemSlot(ItemSlot slot)
{
if (slot == null) return;
if (_itemSlots.Add(slot))
{
// Subscribe to all slot events
slot.OnCorrectItemSlotted += ItemSlot_OnCorrectItemSlotted;
slot.OnIncorrectItemSlotted += ItemSlot_OnIncorrectItemSlotted;
slot.OnForbiddenItemSlotted += ItemSlot_OnForbiddenItemSlotted;
slot.OnItemSlotRemoved += ItemSlot_OnItemSlotRemoved;
}
}
public void UnregisterItemSlot(ItemSlot slot)
{
if (slot == null) return;
if (_itemSlots.Remove(slot))
{
// Unsubscribe from all slot events
slot.OnCorrectItemSlotted -= ItemSlot_OnCorrectItemSlotted;
slot.OnIncorrectItemSlotted -= ItemSlot_OnIncorrectItemSlotted;
slot.OnForbiddenItemSlotted -= ItemSlot_OnForbiddenItemSlotted;
slot.OnItemSlotRemoved -= ItemSlot_OnItemSlotRemoved;
}
}
/// <summary>
/// Checks if a specific item has been created through item combination.
/// </summary>
/// <param name="itemId">The ID of the item to check.</param>
/// <returns>True if the item has been created through combination, false otherwise.</returns>
public bool WasItemCreatedThroughCombination(string itemId)
{
return !string.IsNullOrEmpty(itemId) && _itemsCreatedThroughCombination.Contains(itemId);
}
/// <summary>
/// Returns the current slot state for the given item data by searching registered slots.
/// If the item is currently slotted in a slot, returns that slot's state; otherwise returns ItemSlotState.None.
/// </summary>
public ItemSlotState GetSlotStatusForItem(PickupItemData itemData)
{
if (itemData == null) return ItemSlotState.None;
foreach (var slot in _itemSlots)
{
var slottedObj = slot.GetSlottedObject();
if (slottedObj == null) continue;
var pickup = slottedObj.GetComponent<Pickup>();
if (pickup == null) continue;
if (pickup.itemData == itemData)
{
return slot.CurrentSlottedState;
}
}
return ItemSlotState.None;
}
public IEnumerable<Pickup> Pickups => _pickups;
public IEnumerable<ItemSlot> ItemSlots => _itemSlots;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a78fe78378e6426da43710f6d0ae84ba
timeCreated: 1758888493

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e592597a12a7498dbb5336395d7db00c
timeCreated: 1758871403

View File

@@ -0,0 +1,627 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Core;
using Interactions;
using UnityEngine;
using PuzzleS;
namespace Dialogue
{
[AddComponentMenu("Apple Hills/Dialogue/Dialogue Component")]
public class DialogueComponent : MonoBehaviour
{
[SerializeField] private RuntimeDialogueGraph dialogueGraph;
private RuntimeDialogueNode currentNode;
private int currentLineIndex;
private bool initialized = false;
private SpeechBubble speechBubble;
// Flag to track when a condition has been met but dialogue hasn't advanced yet
private bool _conditionSatisfiedPendingAdvance = false;
// Track the current slot state for WaitOnSlot nodes
private ItemSlotState _currentSlotState = ItemSlotState.None;
private PickupItemData _lastSlottedItem;
// Properties
public bool IsActive { get; private set; }
public bool IsCompleted { get; private set; }
public string CurrentSpeakerName => dialogueGraph?.speakerName;
// Event for UI updates if needed
public event Action<string> OnDialogueChanged;
private void Start()
{
// Register for global events
if (PuzzleManager.Instance != null)
PuzzleManager.Instance.OnStepCompleted += OnAnyPuzzleStepCompleted;
if (ItemManager.Instance != null)
{
ItemManager.Instance.OnItemPickedUp += OnAnyItemPickedUp;
ItemManager.Instance.OnCorrectItemSlotted += OnAnyItemSlotted;
ItemManager.Instance.OnIncorrectItemSlotted += OnAnyIncorrectItemSlotted;
ItemManager.Instance.OnForbiddenItemSlotted += OnAnyForbiddenItemSlotted;
ItemManager.Instance.OnItemSlotCleared += OnAnyItemSlotCleared;
ItemManager.Instance.OnItemsCombined += OnAnyItemsCombined;
}
speechBubble = GetComponentInChildren<SpeechBubble>();
if (speechBubble == null)
{
Debug.LogError("SpeechBubble component is missing on Dialogue Component");
}
// Auto-start the dialogue
// StartDialogue();
var interactable = GetComponent<Interactable>();
if (interactable != null)
{
interactable.characterArrived.AddListener(OnCharacterArrived);
}
// Update bubble visibility based on whether we have lines
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
private void OnCharacterArrived()
{
if (speechBubble == null || ! HasAnyLines()) return;
AdvanceDialogueState();
// Get the current dialogue line
string line = GetCurrentDialogueLine();
// Display the line with the new method that handles timed updates
speechBubble.DisplayDialogueLine(line, HasAnyLines());
// Advance dialogue state for next interaction
}
private void OnDestroy()
{
// Unregister from events
if (PuzzleManager.Instance != null)
PuzzleManager.Instance.OnStepCompleted -= OnAnyPuzzleStepCompleted;
if (ItemManager.Instance != null)
{
ItemManager.Instance.OnItemPickedUp -= OnAnyItemPickedUp;
ItemManager.Instance.OnCorrectItemSlotted -= OnAnyItemSlotted;
ItemManager.Instance.OnIncorrectItemSlotted -= OnAnyIncorrectItemSlotted;
ItemManager.Instance.OnForbiddenItemSlotted -= OnAnyForbiddenItemSlotted;
ItemManager.Instance.OnItemSlotCleared -= OnAnyItemSlotCleared;
ItemManager.Instance.OnItemsCombined -= OnAnyItemsCombined;
}
}
/// <summary>
/// Start the dialogue from the beginning
/// </summary>
public void StartDialogue()
{
if (dialogueGraph == null)
{
Debug.LogError("DialogueComponent: No dialogue graph assigned!");
return;
}
// Reset state
IsActive = true;
IsCompleted = false;
currentLineIndex = 0;
initialized = true;
// Set to entry node
currentNode = dialogueGraph.GetNodeByID(dialogueGraph.entryNodeID);
// Process the node
ProcessCurrentNode();
// Update bubble visibility based on whether we have lines
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
/// <summary>
/// Get the current dialogue line and advance to the next line or node if appropriate
/// Each call represents one interaction with the NPC
/// </summary>
public string GetCurrentDialogueLine()
{
// Initialize if needed
if (!initialized)
{
StartDialogue();
}
if (!IsActive || IsCompleted || currentNode == null)
return string.Empty;
// For WaitOnSlot nodes, use the appropriate line type based on slot state
if (currentNode.nodeType == RuntimeDialogueNodeType.WaitOnSlot)
{
// Choose the appropriate line collection based on the current slot state
List<string> linesForState = currentNode.dialogueLines; // Default lines
switch (_currentSlotState)
{
case ItemSlotState.Incorrect:
// Use incorrect item lines if available, otherwise fall back to default lines
if (currentNode.incorrectItemLines != null && currentNode.incorrectItemLines.Count > 0)
linesForState = currentNode.incorrectItemLines;
break;
case ItemSlotState.Forbidden:
// Use forbidden item lines if available, otherwise fall back to default lines
if (currentNode.forbiddenItemLines != null && currentNode.forbiddenItemLines.Count > 0)
linesForState = currentNode.forbiddenItemLines;
break;
// For None or Correct state, use the default lines
default:
linesForState = currentNode.dialogueLines;
break;
}
// If we have lines for this state, return the current one
if (linesForState != null && linesForState.Count > 0)
{
// Make sure index is within bounds
int index = Mathf.Clamp(currentLineIndex, 0, linesForState.Count - 1);
return linesForState[index];
}
}
// For other node types, use the default dialogueLines
if (currentNode.dialogueLines == null || currentNode.dialogueLines.Count == 0)
return string.Empty;
// Get current line
string currentLine = string.Empty;
if (currentLineIndex >= 0 && currentLineIndex < currentNode.dialogueLines.Count)
{
currentLine = currentNode.dialogueLines[currentLineIndex];
}
return currentLine;
}
/// <summary>
/// Advance dialogue state for the next interaction
/// </summary>
private void AdvanceDialogueState()
{
if (!IsActive || IsCompleted || currentNode == null)
return;
// If the condition was satisfied earlier, move to the next node immediately
if (_conditionSatisfiedPendingAdvance)
{
_conditionSatisfiedPendingAdvance = false; // Reset flag
MoveToNextNode();
return;
}
// If we have more lines in the current node, advance to the next line
if (currentLineIndex < currentNode.dialogueLines.Count - 1)
{
currentLineIndex++;
return;
}
// If we should loop through lines, reset the index
if (currentNode.loopThroughLines && currentNode.dialogueLines.Count > 0)
{
currentLineIndex = 0;
return;
}
// If we're at a node that doesn't have a next node, we're done
if (string.IsNullOrEmpty(currentNode.nextNodeID))
{
IsActive = false;
IsCompleted = true;
return;
}
// Move to the next node only if no conditions to wait for
if (!IsWaitingForCondition())
{
MoveToNextNode();
}
}
private void MoveToNextNode()
{
Debug.Log("MoveToNextNode");
// If there's no next node, complete the dialogue
if (string.IsNullOrEmpty(currentNode.nextNodeID))
{
IsActive = false;
IsCompleted = true;
return;
}
// Move to the next node
currentNode = dialogueGraph.GetNodeByID(currentNode.nextNodeID);
currentLineIndex = 0;
// Process the new node
ProcessCurrentNode();
}
private void ProcessCurrentNode()
{
if (currentNode == null)
{
Debug.LogError("DialogueComponent: Current node is null!");
return;
}
// Handle different node types
switch (currentNode.nodeType)
{
case RuntimeDialogueNodeType.Dialogue:
// Regular dialogue node, nothing special to do
break;
case RuntimeDialogueNodeType.WaitOnPuzzleStep:
// Check if the puzzle step is already completed
if (IsPuzzleStepComplete(currentNode.puzzleStepID))
{
// If it's already complete, move past this node automatically
MoveToNextNode();
}
break;
case RuntimeDialogueNodeType.WaitOnPickup:
// Check if the item is already picked up
if (IsItemPickedUp(currentNode.pickupItemID))
{
// If it's already picked up, move past this node automatically
MoveToNextNode();
}
break;
case RuntimeDialogueNodeType.WaitOnSlot:
// Check if the item is already slotted
if (IsItemSlotted(currentNode.slotItemID))
{
// If it's already slotted, move past this node automatically
MoveToNextNode();
}
break;
case RuntimeDialogueNodeType.WaitOnCombination:
// Check if the result item is already created through combination
if (IsResultItemCreated(currentNode.combinationResultItemID))
{
// If it's already created, move past this node automatically
MoveToNextNode();
}
break;
case RuntimeDialogueNodeType.End:
// End node, complete the dialogue
IsActive = false;
IsCompleted = true;
break;
default:
Debug.LogError($"DialogueComponent: Unknown node type {currentNode.nodeType}");
break;
}
}
// Global event handlers
private void OnAnyPuzzleStepCompleted(PuzzleStepSO step)
{
// Only react if we're active and waiting on a puzzle step
if (!IsActive || IsCompleted || currentNode == null ||
currentNode.nodeType != RuntimeDialogueNodeType.WaitOnPuzzleStep)
return;
// Check if this is the step we're waiting for
if (step.stepId == currentNode.puzzleStepID)
{
// Instead of immediately moving to the next node, set the flag
_conditionSatisfiedPendingAdvance = true;
// Update bubble visibility after state change to show interaction prompt
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
}
private void OnAnyItemPickedUp(PickupItemData item)
{
// Only react if we're active and waiting on an item pickup
if (!IsActive || IsCompleted || currentNode == null ||
currentNode.nodeType != RuntimeDialogueNodeType.WaitOnPickup)
return;
// Check if this is the item we're waiting for
if (item.itemId == currentNode.pickupItemID)
{
// Instead of immediately moving to the next node, set the flag
_conditionSatisfiedPendingAdvance = true;
// Update bubble visibility after state change to show interaction prompt
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
}
private void OnAnyItemSlotted(PickupItemData slotDefinition, PickupItemData slottedItem)
{
Debug.Log("[DialogueComponent] OnAnyItemSlotted");
// Only react if we're active and waiting on a slot
if (!IsActive || IsCompleted || currentNode == null ||
currentNode.nodeType != RuntimeDialogueNodeType.WaitOnSlot)
return;
// Check if this is the slot we're waiting for
if (slotDefinition.itemId == currentNode.slotItemID)
{
// Instead of immediately moving to the next node, set the flag
_conditionSatisfiedPendingAdvance = true;
// Update bubble visibility after state change to show interaction prompt
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
}
private void OnAnyItemsCombined(PickupItemData itemA, PickupItemData itemB, PickupItemData resultItem)
{
// Only react if we're active and waiting on a combination
if (!IsActive || IsCompleted || currentNode == null ||
currentNode.nodeType != RuntimeDialogueNodeType.WaitOnCombination)
return;
// Check if this is the result item we're waiting for
if (resultItem.itemId == currentNode.combinationResultItemID)
{
// Instead of immediately moving to the next node, set the flag
_conditionSatisfiedPendingAdvance = true;
// Update bubble visibility after state change to show interaction prompt
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
}
private void OnAnyIncorrectItemSlotted(PickupItemData slotDefinition, PickupItemData slottedItem)
{
// Update the slot state for displaying the correct dialogue lines
if (!IsActive || IsCompleted || currentNode == null)
return;
// Only update state if we're actively waiting on this slot
if (currentNode.nodeType == RuntimeDialogueNodeType.WaitOnSlot &&
slotDefinition.itemId == currentNode.slotItemID)
{
_currentSlotState = ItemSlotState.Incorrect;
_lastSlottedItem = slottedItem;
// Trigger dialogue update
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
}
private void OnAnyForbiddenItemSlotted(PickupItemData slotDefinition, PickupItemData slottedItem)
{
// Update the slot state for displaying the correct dialogue lines
if (!IsActive || IsCompleted || currentNode == null)
return;
// Only update state if we're actively waiting on this slot
if (currentNode.nodeType == RuntimeDialogueNodeType.WaitOnSlot &&
slotDefinition.itemId == currentNode.slotItemID)
{
_currentSlotState = ItemSlotState.Forbidden;
_lastSlottedItem = slottedItem;
// Trigger dialogue update
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
}
private void OnAnyItemSlotCleared(PickupItemData removedItem)
{
// Update the slot state when an item is removed
if (!IsActive || IsCompleted || currentNode == null)
return;
// Reset slot state if we were tracking this item
if (_lastSlottedItem != null && _lastSlottedItem == removedItem)
{
_currentSlotState = ItemSlotState.None;
_lastSlottedItem = null;
// Trigger dialogue update
if (speechBubble != null)
{
speechBubble.UpdatePromptVisibility(HasAnyLines());
}
}
}
// Helper methods
private bool IsWaitingForCondition()
{
if (currentNode == null) return false;
switch (currentNode.nodeType)
{
case RuntimeDialogueNodeType.WaitOnPuzzleStep:
return !IsPuzzleStepComplete(currentNode.puzzleStepID);
case RuntimeDialogueNodeType.WaitOnPickup:
return !IsItemPickedUp(currentNode.pickupItemID);
case RuntimeDialogueNodeType.WaitOnSlot:
return !IsItemSlotted(currentNode.slotItemID);
case RuntimeDialogueNodeType.WaitOnCombination:
return !IsResultItemCreated(currentNode.combinationResultItemID);
default:
return false;
}
}
private bool IsPuzzleStepComplete(string stepID)
{
return PuzzleManager.Instance != null &&
PuzzleManager.Instance.IsPuzzleStepCompleted(stepID);
}
private bool IsItemPickedUp(string itemID)
{
if (ItemManager.Instance == null) return false;
// Check all pickups for the given ID
foreach (var pickup in ItemManager.Instance.Pickups)
{
if (pickup.isPickedUp && pickup.itemData != null &&
pickup.itemData.itemId == itemID)
{
return true;
}
}
return false;
}
private bool IsItemSlotted(string slotID)
{
if (ItemManager.Instance == null) return false;
// Check if any slot with this ID has the correct item
foreach (var slot in ItemManager.Instance.ItemSlots)
{
if (slot.itemData != null && slot.itemData.itemId == slotID &&
slot.CurrentSlottedState == ItemSlotState.Correct)
{
return true;
}
}
return false;
}
private bool IsResultItemCreated(string resultItemId)
{
if (ItemManager.Instance == null) return false;
// Use the ItemManager's tracking of items created through combination
return ItemManager.Instance.WasItemCreatedThroughCombination(resultItemId);
}
/// <summary>
/// Checks if the dialogue component has any lines available to serve
/// </summary>
/// <returns>True if there are lines available, false otherwise</returns>
public bool HasAnyLines()
{
if (!initialized)
{
// If not initialized yet but has a dialogue graph, it will have lines when initialized
return dialogueGraph != null;
}
// No lines if dialogue is not active or is completed
if (!IsActive || IsCompleted || currentNode == null)
return false;
// Special case: if condition has been satisfied but not yet advanced, we should show lines
if (_conditionSatisfiedPendingAdvance && !string.IsNullOrEmpty(currentNode.nextNodeID))
{
// Check if the next node would have lines
RuntimeDialogueNode nextNode = dialogueGraph.GetNodeByID(currentNode.nextNodeID);
return nextNode != null && (nextNode.dialogueLines.Count > 0 || nextNode.nodeType != RuntimeDialogueNodeType.End);
}
// For WaitOnSlot nodes, check for lines based on current slot state
if (currentNode.nodeType == RuntimeDialogueNodeType.WaitOnSlot)
{
// Choose the appropriate line collection based on the current slot state
List<string> linesForState = currentNode.dialogueLines; // Default lines
switch (_currentSlotState)
{
case ItemSlotState.Incorrect:
// Use incorrect item lines if available, otherwise fall back to default lines
if (currentNode.incorrectItemLines != null && currentNode.incorrectItemLines.Count > 0)
linesForState = currentNode.incorrectItemLines;
break;
case ItemSlotState.Forbidden:
// Use forbidden item lines if available, otherwise fall back to default lines
if (currentNode.forbiddenItemLines != null && currentNode.forbiddenItemLines.Count > 0)
linesForState = currentNode.forbiddenItemLines;
break;
}
// Check if we have any lines for the current state
if (linesForState != null && linesForState.Count > 0)
{
// If we're not at the end of the lines or we loop through them
if (currentLineIndex < linesForState.Count - 1 || currentNode.loopThroughLines)
{
return true;
}
}
}
// For other node types, use the standard check
else if (currentNode.dialogueLines.Count > 0)
{
// If we're not at the end of the lines or we loop through them
if (currentLineIndex < currentNode.dialogueLines.Count - 1 || currentNode.loopThroughLines)
{
return true;
}
// If we're at the end of lines but not waiting for a condition and have a next node
if (!IsWaitingForCondition() && !string.IsNullOrEmpty(currentNode.nextNodeID))
{
// We need to check if the next node would have lines
RuntimeDialogueNode nextNode = dialogueGraph.GetNodeByID(currentNode.nextNodeID);
return nextNode != null && (nextNode.dialogueLines.Count > 0 || nextNode.nodeType != RuntimeDialogueNodeType.End);
}
}
return false;
}
// Editor functionality
public void SetDialogueGraph(RuntimeDialogueGraph graph)
{
dialogueGraph = graph;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 25bbad45f1fa4183b30ad76c62256fd6
timeCreated: 1758891211

View File

@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Dialogue
{
[Serializable]
public enum RuntimeDialogueNodeType
{
Dialogue,
WaitOnPuzzleStep,
WaitOnPickup,
WaitOnSlot,
WaitOnCombination,
End
}
[Serializable]
public class RuntimeDialogueGraph : ScriptableObject
{
public string entryNodeID;
public string speakerName;
public List<RuntimeDialogueNode> allNodes = new List<RuntimeDialogueNode>();
// Helper method to find a node by ID
public RuntimeDialogueNode GetNodeByID(string id)
{
return allNodes.Find(n => n.nodeID == id);
}
}
[Serializable]
public class RuntimeDialogueNode
{
public string nodeID;
public RuntimeDialogueNodeType nodeType;
public string nextNodeID;
// Basic dialogue
public List<string> dialogueLines = new List<string>();
public bool loopThroughLines;
// Conditional nodes
public string puzzleStepID; // For WaitOnPuzzleStep
public string pickupItemID; // For WaitOnPickup
public string slotItemID; // For WaitOnSlot
public string combinationResultItemID; // For WaitOnCombination
// For WaitOnSlot - different responses
public List<string> incorrectItemLines = new List<string>();
public bool loopThroughIncorrectLines;
public List<string> forbiddenItemLines = new List<string>();
public bool loopThroughForbiddenLines;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3c3be3596532450a923c31dfe0ed4aa9
timeCreated: 1758871423

View File

@@ -0,0 +1,263 @@
using System;
using System.Collections;
using TMPro;
using UnityEngine;
namespace Dialogue
{
/// <summary>
/// Display mode for the speech bubble text
/// </summary>
public enum TextDisplayMode
{
Instant, // Display all text at once
Typewriter // Display text one character at a time
}
[AddComponentMenu("Apple Hills/Dialogue/Speech Bubble")]
public class SpeechBubble : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI textDisplay;
[SerializeField] private TextDisplayMode displayMode = TextDisplayMode.Typewriter;
[SerializeField] private float typewriterSpeed = 0.05f; // Time between characters in seconds
[SerializeField] private AudioSource typingSoundSource;
[SerializeField] private float typingSoundFrequency = 3; // Play sound every X characters
[SerializeField] private bool useRichText = true; // Whether to respect rich text tags
[SerializeField] private float dialogueDisplayTime = 1.5f; // Time in seconds to display dialogue before showing prompt
[SerializeField] private string dialoguePromptText = ". . ."; // Text to show as a prompt for available dialogue
private Coroutine typewriterCoroutine;
private Coroutine promptUpdateCoroutine;
private string currentFullText = string.Empty;
private bool isVisible = false;
private void Awake()
{
}
/// <summary>
/// Show the speech bubble
/// </summary>
public void Show()
{
gameObject.SetActive(true);
isVisible = true;
}
/// <summary>
/// Hide the speech bubble
/// </summary>
public void Hide()
{
gameObject.SetActive(false);
isVisible = false;
// Stop any ongoing typewriter effect
if (typewriterCoroutine != null)
{
StopCoroutine(typewriterCoroutine);
typewriterCoroutine = null;
}
// Stop any prompt update coroutine
if (promptUpdateCoroutine != null)
{
StopCoroutine(promptUpdateCoroutine);
promptUpdateCoroutine = null;
}
}
/// <summary>
/// Toggle visibility of the speech bubble
/// </summary>
public void Toggle()
{
if (isVisible)
Hide();
else
Show();
}
/// <summary>
/// Set the text to display in the speech bubble
/// </summary>
/// <param name="text">Text to display</param>
public void SetText(string text)
{
if (textDisplay == null)
{
Debug.LogError("SpeechBubble: TextMeshProUGUI component is not assigned!");
return;
}
currentFullText = text;
// Stop any existing typewriter effect
if (typewriterCoroutine != null)
{
StopCoroutine(typewriterCoroutine);
typewriterCoroutine = null;
}
// Display text based on the selected mode
if (displayMode == TextDisplayMode.Instant)
{
textDisplay.text = text;
}
else // Typewriter mode
{
textDisplay.text = string.Empty; // Clear the text initially
typewriterCoroutine = StartCoroutine(TypewriterEffect(text));
}
// Make sure the bubble is visible when setting text
if (!isVisible)
Show();
}
/// <summary>
/// Display a dialogue line and handle prompt visibility afterward
/// </summary>
/// <param name="line">The dialogue line to display</param>
/// <param name="hasMoreDialogue">Whether there are more dialogue lines available</param>
public void DisplayDialogueLine(string line, bool hasMoreDialogue)
{
// Cancel any existing prompt update
if (promptUpdateCoroutine != null)
{
StopCoroutine(promptUpdateCoroutine);
promptUpdateCoroutine = null;
}
// Display the dialogue line
if (!string.IsNullOrEmpty(line))
{
SetText(line);
// After a delay, update the prompt visibility
promptUpdateCoroutine = StartCoroutine(UpdatePromptAfterDelay(hasMoreDialogue));
}
else
{
// If no line to display, update prompt visibility immediately
UpdatePromptVisibility(hasMoreDialogue);
}
}
/// <summary>
/// Update the speech bubble to either show a prompt or hide based on dialogue availability
/// </summary>
/// <param name="hasDialogueAvailable">Whether dialogue is available</param>
public void UpdatePromptVisibility(bool hasDialogueAvailable)
{
if (hasDialogueAvailable)
{
Show();
SetText(dialoguePromptText);
}
else
{
Hide();
}
}
/// <summary>
/// Coroutine to update the prompt visibility after a delay
/// </summary>
private IEnumerator UpdatePromptAfterDelay(bool hasMoreDialogue)
{
// Wait for the configured display time
yield return new WaitForSeconds(dialogueDisplayTime);
// Update the prompt visibility
UpdatePromptVisibility(hasMoreDialogue);
promptUpdateCoroutine = null;
}
/// <summary>
/// Change the display mode
/// </summary>
/// <param name="mode">New display mode</param>
public void SetDisplayMode(TextDisplayMode mode)
{
displayMode = mode;
// If we're changing modes while text is displayed, refresh it
if (!string.IsNullOrEmpty(currentFullText))
{
SetText(currentFullText);
}
}
/// <summary>
/// Skip the typewriter effect and show the full text immediately
/// </summary>
public void SkipTypewriter()
{
if (typewriterCoroutine != null)
{
StopCoroutine(typewriterCoroutine);
typewriterCoroutine = null;
textDisplay.text = currentFullText;
}
}
/// <summary>
/// Set the speed of the typewriter effect
/// </summary>
/// <param name="charactersPerSecond">Characters per second</param>
public void SetTypewriterSpeed(float charactersPerSecond)
{
if (charactersPerSecond <= 0)
{
Debug.LogError("SpeechBubble: Typewriter speed must be greater than 0!");
return;
}
typewriterSpeed = 1f / charactersPerSecond;
}
/// <summary>
/// Coroutine that gradually reveals text one character at a time
/// </summary>
private IEnumerator TypewriterEffect(string text)
{
int visibleCount = 0;
int characterCount = 0;
while (visibleCount < text.Length)
{
// Skip rich text tags if enabled
if (useRichText && visibleCount < text.Length && text[visibleCount] == '<')
{
// Find the end of the tag
int tagEnd = text.IndexOf('>', visibleCount);
if (tagEnd != -1)
{
// Include the entire tag at once
visibleCount = tagEnd + 1;
textDisplay.text = text.Substring(0, visibleCount);
continue;
}
}
// Reveal the next character
visibleCount++;
characterCount++;
textDisplay.text = text.Substring(0, visibleCount);
// Play typing sound at specified frequency
if (typingSoundSource != null && characterCount % typingSoundFrequency == 0)
{
typingSoundSource.Play();
}
yield return new WaitForSeconds(typewriterSpeed);
}
typewriterCoroutine = null;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cb3605ae81a54d2689504e0cd456ac27
timeCreated: 1758973942

View File

@@ -0,0 +1 @@


View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 877344c7a0014922bc3a2a469e03792d
timeCreated: 1759050622

View File

@@ -25,7 +25,7 @@ namespace Interactions
public UnityEvent interactionInterrupted;
public UnityEvent characterArrived;
public UnityEvent<bool> interactionComplete;
// Helpers for managing interaction state
private bool _interactionInProgress;
private PlayerTouchController _playerRef;

View File

@@ -1,20 +1,51 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using System; // for Action<T>
using Core; // register with ItemManager
namespace Interactions
{
// New enum describing possible states for the slotted item
public enum ItemSlotState
{
None,
Correct,
Incorrect,
Forbidden
}
/// <summary>
/// Interaction requirement that allows slotting, swapping, or picking up items in a slot.
/// </summary>
[RequireComponent(typeof(Interactable))]
public class ItemSlot : Pickup
{
// Tracks the current state of the slotted item
private ItemSlotState _currentState = ItemSlotState.None;
/// <summary>
/// Read-only access to the current slotted item state.
/// </summary>
public ItemSlotState CurrentSlottedState => _currentState;
public UnityEvent onItemSlotted;
public UnityEvent onItemSlotRemoved;
// Native C# event alternative for code-only subscribers
public event Action<PickupItemData> OnItemSlotRemoved;
public UnityEvent onCorrectItemSlotted;
// Native C# event alternative to the UnityEvent for code-only subscribers
public event Action<PickupItemData, PickupItemData> OnCorrectItemSlotted;
public UnityEvent onIncorrectItemSlotted;
// Native C# event alternative for code-only subscribers
public event Action<PickupItemData, PickupItemData> OnIncorrectItemSlotted;
public UnityEvent onForbiddenItemSlotted;
// Native C# event alternative for code-only subscribers
public event Action<PickupItemData, PickupItemData> OnForbiddenItemSlotted;
private PickupItemData _currentlySlottedItemData;
public SpriteRenderer slottedItemRenderer;
private GameObject _currentlySlottedItemObject = null;
@@ -35,6 +66,8 @@ namespace Interactions
protected override void OnCharacterArrived()
{
Debug.Log("[ItemSlot] OnCharacterArrived");
var heldItemData = FollowerController.CurrentlyHeldItemData;
var heldItemObj = FollowerController.GetHeldPickupObject();
var config = GameManager.Instance.GetSlotItemConfig(itemData);
@@ -48,6 +81,8 @@ namespace Interactions
{
DebugUIMessage.Show("Can't place that here.", Color.red);
onForbiddenItemSlotted?.Invoke();
OnForbiddenItemSlotted?.Invoke(itemData, heldItemData);
_currentState = ItemSlotState.Forbidden;
Interactable.BroadcastInteractionComplete(false);
return;
}
@@ -62,6 +97,8 @@ namespace Interactions
{
FollowerController.TryPickupItem(_currentlySlottedItemObject, _currentlySlottedItemData, false);
onItemSlotRemoved?.Invoke();
OnItemSlotRemoved?.Invoke(_currentlySlottedItemData);
_currentState = ItemSlotState.None;
SlotItem(heldItemObj, heldItemData, _currentlySlottedItemObject == null);
return;
}
@@ -105,10 +142,22 @@ namespace Interactions
public void SlotItem(GameObject itemToSlot, PickupItemData itemToSlotData, bool clearFollowerHeldItem = true)
{
// Cache the previous item data before clearing, needed for OnItemSlotRemoved event
var previousItemData = _currentlySlottedItemData;
bool wasSlotCleared = _currentlySlottedItemObject != null && itemToSlot == null;
if (itemToSlot == null)
{
_currentlySlottedItemObject = null;
_currentlySlottedItemData = null;
// Clear state when no item is slotted
_currentState = ItemSlotState.None;
// Fire native event for slot clearing
if (wasSlotCleared)
{
OnItemSlotRemoved?.Invoke(previousItemData);
}
}
else
{
@@ -117,6 +166,7 @@ namespace Interactions
SetSlottedObject(itemToSlot);
_currentlySlottedItemData = itemToSlotData;
}
if (clearFollowerHeldItem)
{
FollowerController.ClearHeldItem();
@@ -133,6 +183,8 @@ namespace Interactions
{
DebugUIMessage.Show("You correctly slotted " + itemToSlotData.itemName + " into: " + itemData.itemName, Color.green);
onCorrectItemSlotted?.Invoke();
OnCorrectItemSlotted?.Invoke(itemData, _currentlySlottedItemData);
_currentState = ItemSlotState.Correct;
}
Interactable.BroadcastInteractionComplete(true);
@@ -143,9 +195,22 @@ namespace Interactions
{
DebugUIMessage.Show("I'm not sure this works.", Color.yellow);
onIncorrectItemSlotted?.Invoke();
OnIncorrectItemSlotted?.Invoke(itemData, _currentlySlottedItemData);
_currentState = ItemSlotState.Incorrect;
}
Interactable.BroadcastInteractionComplete(false);
}
}
// Register with ItemManager when enabled
void Start()
{
ItemManager.Instance?.RegisterItemSlot(this);
}
void OnDestroy()
{
ItemManager.Instance?.UnregisterItemSlot(this);
}
}
}

View File

@@ -1,5 +1,7 @@
using Input;
using UnityEngine;
using System; // added for Action<T>
using Core; // register with ItemManager
namespace Interactions
{
@@ -12,6 +14,15 @@ namespace Interactions
private PlayerTouchController _playerRef;
protected FollowerController FollowerController;
// Track if the item has been picked up
public bool isPickedUp { get; private set; }
// Event: invoked when the item was picked up successfully
public event Action<PickupItemData> OnItemPickedUp;
// Event: invoked when this item is successfully combined with another
public event Action<PickupItemData, PickupItemData, PickupItemData> OnItemsCombined;
/// <summary>
/// Unity Awake callback. Sets up icon, interactable, and event handlers.
/// </summary>
@@ -30,6 +41,14 @@ namespace Interactions
ApplyItemData();
}
/// <summary>
/// Register with ItemManager on Start
/// </summary>
void Start()
{
ItemManager.Instance?.RegisterPickup(this);
}
/// <summary>
/// Unity OnDestroy callback. Cleans up event handlers.
/// </summary>
@@ -40,6 +59,9 @@ namespace Interactions
Interactable.interactionStarted.RemoveListener(OnInteractionStarted);
Interactable.characterArrived.RemoveListener(OnCharacterArrived);
}
// Unregister from ItemManager
ItemManager.Instance?.UnregisterPickup(this);
}
#if UNITY_EDITOR
@@ -81,15 +103,48 @@ namespace Interactions
protected virtual void OnCharacterArrived()
{
Debug.Log("[Pickup] OnCharacterArrived");
var combinationResult = FollowerController.TryCombineItems(this, out var combinationResultItem);
if (combinationResultItem != null)
{
Interactable.BroadcastInteractionComplete(true);
// Fire the combination event when items are successfully combined
if (combinationResult == FollowerController.CombinationResult.Successful)
{
var resultPickup = combinationResultItem.GetComponent<Pickup>();
if (resultPickup != null && resultPickup.itemData != null)
{
// Get the combined item data
var resultItemData = resultPickup.itemData;
var heldItem = FollowerController.GetHeldPickupObject();
if (heldItem != null)
{
var heldPickup = heldItem.GetComponent<Pickup>();
if (heldPickup != null && heldPickup.itemData != null)
{
// Trigger the combination event
OnItemsCombined?.Invoke(itemData, heldPickup.itemData, resultItemData);
}
}
}
}
return;
}
FollowerController?.TryPickupItem(gameObject, itemData);
Interactable.BroadcastInteractionComplete(combinationResult == FollowerController.CombinationResult.NotApplicable);
bool wasPickedUp = (combinationResult == FollowerController.CombinationResult.NotApplicable);
Interactable.BroadcastInteractionComplete(wasPickedUp);
// Update pickup state and invoke event when the item was picked up successfully
if (wasPickedUp)
{
isPickedUp = true;
OnItemPickedUp?.Invoke(itemData);
}
}
}
}

View File

@@ -1,18 +1,58 @@
using UnityEngine;
using System.Collections.Generic;
using System;
[CreateAssetMenu(fileName = "PickupItemData", menuName = "Game/Pickup Item Data")]
public class PickupItemData : ScriptableObject
{
[SerializeField] private string _itemId;
public string itemName;
[TextArea]
public string description;
public Sprite mapSprite;
// Read-only property for itemId
public string itemId => _itemId;
// Auto-generate ID on creation or validation
void OnValidate()
{
// Only generate if empty
if (string.IsNullOrEmpty(_itemId))
{
_itemId = GenerateItemId();
#if UNITY_EDITOR
// Mark the asset as dirty to ensure the ID is saved
UnityEditor.EditorUtility.SetDirty(this);
#endif
}
}
private string GenerateItemId()
{
// Use asset name as the basis for the ID to keep it somewhat readable
string baseName = name.Replace(" ", "").ToLowerInvariant();
// Add a unique suffix based on a GUID
string uniqueSuffix = Guid.NewGuid().ToString().Substring(0, 8);
return $"{baseName}_{uniqueSuffix}";
}
// Method to manually regenerate ID if needed (for editor scripts)
public void RegenerateId()
{
_itemId = GenerateItemId();
}
public static bool AreEquivalent(PickupItemData a, PickupItemData b)
{
if (ReferenceEquals(a, b)) return true;
if (a is null || b is null) return false;
// First compare by itemId if available
if (!string.IsNullOrEmpty(a.itemId) && !string.IsNullOrEmpty(b.itemId))
return a.itemId == b.itemId;
// Compare by itemName as a fallback
return a.itemName == b.itemName;
}

View File

@@ -95,7 +95,7 @@ namespace PuzzleS
if (success)
{
Debug.Log($"[Puzzles] Step interacted: {stepData?.stepId} on {gameObject.name}");
PuzzleManager.Instance?.OnStepCompleted(stepData);
PuzzleManager.Instance?.MarkPuzzleStepCompleted(stepData);
}
}
}

View File

@@ -1,196 +1,219 @@
using UnityEngine;
using System;
using System.Collections.Generic;
using PuzzleS;
using System.Linq;
using UnityEngine;
using UnityEngine.SceneManagement;
/// <summary>
/// Manages puzzle step registration, dependency management, and step completion for the puzzle system.
/// </summary>
public class PuzzleManager : MonoBehaviour
namespace PuzzleS
{
private static PuzzleManager _instance;
private static bool _isQuitting = false;
/// <summary>
/// Singleton instance of the PuzzleManager.
/// Manages puzzle step registration, dependency management, and step completion for the puzzle system.
/// </summary>
public static PuzzleManager Instance
public class PuzzleManager : MonoBehaviour
{
get
private static PuzzleManager _instance;
private static bool _isQuitting;
/// <summary>
/// Singleton instance of the PuzzleManager.
/// </summary>
public static PuzzleManager Instance
{
if (_instance == null && Application.isPlaying && !_isQuitting)
get
{
_instance = FindAnyObjectByType<PuzzleManager>();
if (_instance == null)
if (_instance == null && Application.isPlaying && !_isQuitting)
{
var go = new GameObject("PuzzleManager");
_instance = go.AddComponent<PuzzleManager>();
// DontDestroyOnLoad(go);
_instance = FindAnyObjectByType<PuzzleManager>();
if (_instance == null)
{
var go = new GameObject("PuzzleManager");
_instance = go.AddComponent<PuzzleManager>();
// DontDestroyOnLoad(go);
}
}
return _instance;
}
}
// Events to notify about step lifecycle
public event Action<PuzzleStepSO> OnStepCompleted;
public event Action<PuzzleStepSO> OnStepUnlocked;
private HashSet<PuzzleStepSO> _completedSteps = new HashSet<PuzzleStepSO>();
private HashSet<PuzzleStepSO> _unlockedSteps = new HashSet<PuzzleStepSO>();
// Registration for ObjectiveStepBehaviour
private Dictionary<PuzzleStepSO, ObjectiveStepBehaviour> _stepBehaviours = new Dictionary<PuzzleStepSO, ObjectiveStepBehaviour>();
// Runtime dependency graph
private Dictionary<PuzzleStepSO, List<PuzzleStepSO>> _runtimeDependencies = new Dictionary<PuzzleStepSO, List<PuzzleStepSO>>();
void Awake()
{
_instance = this;
// DontDestroyOnLoad(gameObject);
SceneManager.sceneLoaded += OnSceneLoaded;
}
void OnDestroy()
{
SceneManager.sceneLoaded -= OnSceneLoaded;
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
BuildRuntimeDependencies();
UnlockInitialSteps();
}
/// <summary>
/// Registers a step behaviour with the manager.
/// </summary>
/// <param name="behaviour">The step behaviour to register.</param>
public void RegisterStepBehaviour(ObjectiveStepBehaviour behaviour)
{
if (behaviour?.stepData == null) return;
if (!_stepBehaviours.ContainsKey(behaviour.stepData))
{
_stepBehaviours.Add(behaviour.stepData, behaviour);
Debug.Log($"[Puzzles] Registered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
}
}
/// <summary>
/// Unregisters a step behaviour from the manager.
/// </summary>
/// <param name="behaviour">The step behaviour to unregister.</param>
public void UnregisterStepBehaviour(ObjectiveStepBehaviour behaviour)
{
if (behaviour?.stepData == null) return;
_stepBehaviours.Remove(behaviour.stepData);
Debug.Log($"[Puzzles] Unregistered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
}
/// <summary>
/// Builds the runtime dependency graph for all registered steps.
/// </summary>
private void BuildRuntimeDependencies()
{
_runtimeDependencies = PuzzleGraphUtility.BuildDependencyGraph(_stepBehaviours.Keys);
foreach (var step in _runtimeDependencies.Keys)
{
foreach (var dep in _runtimeDependencies[step])
{
Debug.Log($"[Puzzles] Step {step.stepId} depends on {dep.stepId}");
}
}
return _instance;
Debug.Log($"[Puzzles] Runtime dependencies built. Total steps: {_stepBehaviours.Count}");
}
}
private HashSet<PuzzleStepSO> completedSteps = new HashSet<PuzzleStepSO>();
private HashSet<PuzzleStepSO> unlockedSteps = new HashSet<PuzzleStepSO>();
// Registration for ObjectiveStepBehaviour
private Dictionary<PuzzleStepSO, ObjectiveStepBehaviour> stepBehaviours = new Dictionary<PuzzleStepSO, ObjectiveStepBehaviour>();
// Runtime dependency graph
private Dictionary<PuzzleStepSO, List<PuzzleStepSO>> runtimeDependencies = new Dictionary<PuzzleStepSO, List<PuzzleStepSO>>();
void Awake()
{
_instance = this;
// DontDestroyOnLoad(gameObject);
SceneManager.sceneLoaded += OnSceneLoaded;
}
void OnDestroy()
{
SceneManager.sceneLoaded -= OnSceneLoaded;
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
BuildRuntimeDependencies();
UnlockInitialSteps();
}
/// <summary>
/// Registers a step behaviour with the manager.
/// </summary>
/// <param name="behaviour">The step behaviour to register.</param>
public void RegisterStepBehaviour(ObjectiveStepBehaviour behaviour)
{
if (behaviour?.stepData == null) return;
if (!stepBehaviours.ContainsKey(behaviour.stepData))
/// <summary>
/// Unlocks all initial steps (those with no dependencies).
/// </summary>
private void UnlockInitialSteps()
{
stepBehaviours.Add(behaviour.stepData, behaviour);
Debug.Log($"[Puzzles] Registered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
}
}
/// <summary>
/// Unregisters a step behaviour from the manager.
/// </summary>
/// <param name="behaviour">The step behaviour to unregister.</param>
public void UnregisterStepBehaviour(ObjectiveStepBehaviour behaviour)
{
if (behaviour?.stepData == null) return;
stepBehaviours.Remove(behaviour.stepData);
Debug.Log($"[Puzzles] Unregistered step: {behaviour.stepData.stepId} on {behaviour.gameObject.name}");
}
/// <summary>
/// Builds the runtime dependency graph for all registered steps.
/// </summary>
private void BuildRuntimeDependencies()
{
runtimeDependencies = PuzzleGraphUtility.BuildDependencyGraph(stepBehaviours.Keys);
foreach (var step in runtimeDependencies.Keys)
{
foreach (var dep in runtimeDependencies[step])
var initialSteps = PuzzleGraphUtility.FindInitialSteps(_runtimeDependencies);
foreach (var step in initialSteps)
{
Debug.Log($"[Puzzles] Step {step.stepId} depends on {dep.stepId}");
Debug.Log($"[Puzzles] Initial step unlocked: {step.stepId}");
UnlockStep(step);
}
}
Debug.Log($"[Puzzles] Runtime dependencies built. Total steps: {stepBehaviours.Count}");
}
/// <summary>
/// Unlocks all initial steps (those with no dependencies).
/// </summary>
private void UnlockInitialSteps()
{
var initialSteps = PuzzleGraphUtility.FindInitialSteps(runtimeDependencies);
foreach (var step in initialSteps)
/// <summary>
/// Called when a step is completed. Unlocks dependent steps if their dependencies are met.
/// </summary>
/// <param name="step">The completed step.</param>
public void MarkPuzzleStepCompleted(PuzzleStepSO step)
{
Debug.Log($"[Puzzles] Initial step unlocked: {step.stepId}");
UnlockStep(step);
}
}
if (_completedSteps.Contains(step)) return;
_completedSteps.Add(step);
Debug.Log($"[Puzzles] Step completed: {step.stepId}");
/// <summary>
/// Called when a step is completed. Unlocks dependent steps if their dependencies are met.
/// </summary>
/// <param name="step">The completed step.</param>
public void OnStepCompleted(PuzzleStepSO step)
{
if (completedSteps.Contains(step)) return;
completedSteps.Add(step);
Debug.Log($"[Puzzles] Step completed: {step.stepId}");
foreach (var unlock in step.unlocks)
{
if (AreRuntimeDependenciesMet(unlock))
// Broadcast completion
OnStepCompleted?.Invoke(step);
foreach (var unlock in step.unlocks)
{
Debug.Log($"[Puzzles] Unlocking step {unlock.stepId} after completing {step.stepId}");
UnlockStep(unlock);
if (AreRuntimeDependenciesMet(unlock))
{
Debug.Log($"[Puzzles] Unlocking step {unlock.stepId} after completing {step.stepId}");
UnlockStep(unlock);
}
else
{
Debug.Log($"[Puzzles] Step {unlock.stepId} not unlocked yet, waiting for other dependencies");
}
}
else
CheckPuzzleCompletion();
}
/// <summary>
/// Checks if all dependencies for a step are met.
/// </summary>
/// <param name="step">The step to check.</param>
/// <returns>True if all dependencies are met, false otherwise.</returns>
private bool AreRuntimeDependenciesMet(PuzzleStepSO step)
{
if (!_runtimeDependencies.ContainsKey(step) || _runtimeDependencies[step].Count == 0) return true;
foreach (var dep in _runtimeDependencies[step])
{
Debug.Log($"[Puzzles] Step {unlock.stepId} not unlocked yet, waiting for other dependencies");
if (!_completedSteps.Contains(dep)) return false;
}
return true;
}
/// <summary>
/// Unlocks a specific step and notifies its behaviour.
/// </summary>
/// <param name="step">The step to unlock.</param>
private void UnlockStep(PuzzleStepSO step)
{
if (_unlockedSteps.Contains(step)) return;
_unlockedSteps.Add(step);
if (_stepBehaviours.TryGetValue(step, out var behaviour))
{
behaviour.UnlockStep();
}
Debug.Log($"[Puzzles] Step unlocked: {step.stepId}");
// Broadcast unlock
OnStepUnlocked?.Invoke(step);
}
/// <summary>
/// Checks if the puzzle is complete (all steps finished).
/// </summary>
private void CheckPuzzleCompletion()
{
if (_completedSteps.Count == _stepBehaviours.Count)
{
Debug.Log("[Puzzles] Puzzle complete! All steps finished.");
// TODO: Fire puzzle complete event or trigger outcome logic
}
}
CheckPuzzleCompletion();
}
/// <summary>
/// Checks if all dependencies for a step are met.
/// </summary>
/// <param name="step">The step to check.</param>
/// <returns>True if all dependencies are met, false otherwise.</returns>
private bool AreRuntimeDependenciesMet(PuzzleStepSO step)
{
if (!runtimeDependencies.ContainsKey(step) || runtimeDependencies[step].Count == 0) return true;
foreach (var dep in runtimeDependencies[step])
/// <summary>
/// Returns whether a step is already unlocked.
/// </summary>
public bool IsStepUnlocked(PuzzleStepSO step)
{
if (!completedSteps.Contains(dep)) return false;
BuildRuntimeDependencies();
UnlockInitialSteps();
return _unlockedSteps.Contains(step);
}
return true;
}
/// <summary>
/// Unlocks a specific step and notifies its behaviour.
/// </summary>
/// <param name="step">The step to unlock.</param>
private void UnlockStep(PuzzleStepSO step)
{
if (unlockedSteps.Contains(step)) return;
unlockedSteps.Add(step);
if (stepBehaviours.TryGetValue(step, out var behaviour))
/// <summary>
/// Checks if a puzzle step with the specified ID has been completed
/// </summary>
/// <param name="stepId">The ID of the puzzle step to check</param>
/// <returns>True if the step has been completed, false otherwise</returns>
public bool IsPuzzleStepCompleted(string stepId)
{
behaviour.UnlockStep();
return _completedSteps.Any(step => step.stepId == stepId);
}
Debug.Log($"[Puzzles] Step unlocked: {step.stepId}");
}
/// <summary>
/// Checks if the puzzle is complete (all steps finished).
/// </summary>
private void CheckPuzzleCompletion()
{
if (completedSteps.Count == stepBehaviours.Count)
void OnApplicationQuit()
{
Debug.Log("[Puzzles] Puzzle complete! All steps finished.");
// TODO: Fire puzzle complete event or trigger outcome logic
_isQuitting = true;
}
}
/// <summary>
/// Returns whether a step is already unlocked.
/// </summary>
public bool IsStepUnlocked(PuzzleStepSO step)
{
BuildRuntimeDependencies();
UnlockInitialSteps();
return unlockedSteps.Contains(step);
}
void OnApplicationQuit()
{
_isQuitting = true;
}
}

View File

@@ -21,8 +21,8 @@ MonoBehaviour:
basePickupPrefab: {fileID: 7447346505753002421, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
levelSwitchMenuPrefab: {fileID: 4062459998181038721, guid: de2ed28e4200a4340a5af4086c98a0dc, type: 3}
combinationRules:
- itemA: {fileID: 11400000, guid: 33e7ca06b22108d4e802486e08bcdfd1, type: 2}
itemB: {fileID: 11400000, guid: 8b2616beb14825a46b9b1ed85ad3cb25, type: 2}
- itemA: {fileID: 11400000, guid: 8b2616beb14825a46b9b1ed85ad3cb25, type: 2}
itemB: {fileID: 11400000, guid: 33e7ca06b22108d4e802486e08bcdfd1, type: 2}
resultPrefab: {fileID: 1610562450228973293, guid: 58654125374567147839eb382fcde422, type: 3}
- itemA: {fileID: 11400000, guid: 983414276ae3f004c854e9c450f27f88, type: 2}
itemB: {fileID: 11400000, guid: 0c6986639ca176a419c92f5a327d95ce, type: 2}

View File

@@ -63,7 +63,19 @@ MonoBehaviour:
- rid: 7785851992983994373
- rid: 1219994508087787520
m_RuntimeSettings:
m_List: []
m_List:
- rid: 7752762179098771456
- rid: 7752762179098771457
- rid: 7752762179098771459
- rid: 7752762179098771461
- rid: 7752762179098771462
- rid: 7752762179098771464
- rid: 7752762179098771466
- rid: 7752762179098771468
- rid: 7752762179098771472
- rid: 7752762179098771476
- rid: 7785851992983994372
- rid: 7785851992983994373
m_AssetVersion: 8
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
m_RenderingLayerNames: