PlaceWithRelatedModule requirement, finish Puzzle D

This commit is contained in:
2022-12-03 22:35:00 +01:00
parent 655f495804
commit 9b262ce4c9
31 changed files with 402 additions and 811 deletions

View File

@@ -1,227 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Hover
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 1.5, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 4
value: {x: 0, y: 1.54, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 8
value: {x: 0, y: 1.5, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Origin
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: -0.00315}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 2
value: {x: 0, y: 0, z: -0.0063}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 6
value: {x: 0, y: 0, z: 0.0063}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 8
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: -0.00315}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Origin/Ring
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1818259597
attribute: 1
script: {fileID: 0}
typeID: 4
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 684716456
attribute: 1
script: {fileID: 0}
typeID: 4
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 8
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1.5
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 4
value: 1.54
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 8
value: 1.5
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.y
path: Origin
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: -0.00315
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
value: -0.0063
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 6
value: 0.0063
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 8
value: 0
inSlope: -0.00315
outSlope: 0
tangentMode: 69
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.z
path: Origin/Ring
classID: 4
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@@ -12,8 +12,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 28d04249c1c4438da94b524e7d4afff2, type: 3} m_Script: {fileID: 11500000, guid: 28d04249c1c4438da94b524e7d4afff2, type: 3}
m_Name: Desert m_Name: Desert
m_EditorClassIdentifier: m_EditorClassIdentifier:
minRoomSize: {x: 3, y: 3} minRoomSize: {x: 2, y: 2}
playSpace: {x: 3, y: 5} playSpace: {x: 2, y: 4}
spaceTile: {fileID: 3229991053255736984, guid: b8f192f7cebe686468af6b1a71c4605b, spaceTile: {fileID: 3229991053255736984, guid: b8f192f7cebe686468af6b1a71c4605b,
type: 3} type: 3}
environment: {fileID: 5743657079028767629, guid: 17ecdbaca50efaa4ab503614dfec54a8, environment: {fileID: 5743657079028767629, guid: 17ecdbaca50efaa4ab503614dfec54a8,
@@ -32,8 +32,4 @@ MonoBehaviour:
- {fileID: 11400000, guid: 83d6800536b1df14287ff2cd8e0d58ce, type: 2} - {fileID: 11400000, guid: 83d6800536b1df14287ff2cd8e0d58ce, type: 2}
puzzleCount: {x: 1, y: 2} puzzleCount: {x: 1, y: 2}
puzzleTypes: puzzleTypes:
- {fileID: 11400000, guid: 3f79d37154e44ca47b54bb43bbe8d9aa, type: 2} - {fileID: 11400000, guid: ee5a44432e80cd64689be3ff34750339, type: 2}
- {fileID: 11400000, guid: 8707242279bb6c541a12dc4491388c42, type: 2}
- {fileID: 11400000, guid: 3e5e65f1afdbf7f458b2bcc8b90ec1ff, type: 2}
- {fileID: 11400000, guid: 15dcebb677f5df940839eaaa50274294, type: 2}
- {fileID: 11400000, guid: ecc412010abd45a4aaa7d364b6c3789c, type: 2}

View File

@@ -69,7 +69,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 4096
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1

View File

@@ -69,7 +69,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 4096
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1

View File

@@ -69,7 +69,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 4096
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1

View File

@@ -69,7 +69,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 4096
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1

View File

@@ -69,7 +69,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 4096
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1

View File

@@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: Dispenser Easy m_Name: Dispenser Easy
m_EditorClassIdentifier: m_EditorClassIdentifier:
types: 03000000 types: 03000000
modulePrefab: {fileID: 3942114796521670514, guid: 20c9cfab710bbe04ca6f81d44a01b025, modulePrefab: {fileID: 8291735269762471888, guid: 8253a7c07eeea3b48832a42b847cf0f1,
type: 3} type: 3}
preconditionRequirements: [] preconditionRequirements: []
placementRequirements: placementRequirements:

View File

@@ -0,0 +1,113 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &5019013083343442082
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 2
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4826747451102095092, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_Name
value: Puzzle C Easy Dispenser
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[0].lights.Array.data[0]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[0].lights.Array.data[5]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[1].lights.Array.data[1]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[1].lights.Array.data[4]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[4].lights.Array.data[1]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[4].lights.Array.data[4]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[5].lights.Array.data[0]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8200130174738179068, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: lights.Array.data[5].lights.Array.data[5]
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_AddedGameObjects: []
m_SourcePrefab: {fileID: 100100000, guid: 20c9cfab710bbe04ca6f81d44a01b025, type: 3}

View File

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

View File

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

View File

@@ -0,0 +1,15 @@
%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: 6e3f3bf07aae4a03834a7943c255f37d, type: 3}
m_Name: Dispenser Easy Relation
m_EditorClassIdentifier:
relatedModule: {fileID: 11400000, guid: 2ae9786d52faa1f4c82b3a3eeae9f538, type: 2}

View File

@@ -1,8 +1,8 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 11e962d632c515e4ea1a885b3fbc1692 guid: 2393bf2b32e06f647a014688e3d8a8d9
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 7400000 mainObjectFileID: 11400000
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@@ -0,0 +1,22 @@
%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: abf4a405f6c64073995bded39977563e, type: 3}
m_Name: Dispenser Easy
m_EditorClassIdentifier:
types: 03000000
modulePrefab: {fileID: 3942114796521670514, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
preconditionRequirements: []
placementRequirements:
- {fileID: 11400000, guid: ed4830127e9381245a6af07e42c52422, type: 2}
- {fileID: 11400000, guid: 1f1825b71bae09c438a1cb52603347d6, type: 2}
- {fileID: 11400000, guid: 43eb2a566a244964aa3a3319eaafe1a8, type: 2}

View File

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

View File

@@ -0,0 +1,21 @@
%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: f928b97941e3469a9015316bb5ac1309, type: 3}
m_Name: Puzzle D Easy
m_EditorClassIdentifier:
types: 02000000
modulePrefab: {fileID: 6853723365353446933, guid: c6f4a21ce6c0ce84584c90804c96ad80,
type: 3}
preconditionRequirements:
- {fileID: 11400000, guid: 2393bf2b32e06f647a014688e3d8a8d9, type: 2}
placementRequirements:
- {fileID: 11400000, guid: be3144e12a689e84fbfe2ce50f61dcc7, type: 2}

View File

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

View File

@@ -10,6 +10,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 8664788757336834019} - component: {fileID: 8664788757336834019}
- component: {fileID: 3229991053255736984} - component: {fileID: 3229991053255736984}
- component: {fileID: 7880032434625960893}
m_Layer: 0 m_Layer: 0
m_Name: Desert Space Tile m_Name: Desert Space Tile
m_TagString: Untagged m_TagString: Untagged
@@ -45,16 +46,46 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
tilePrefabs: tilePrefabs:
keys: 000000000100000002000000030000000400000005000000060000000700000008000000 - location: 6
values: prefab: {fileID: 4483222258087546740, guid: 77b4684295838884782186a211a5a6cb,
- {fileID: 2171430479842946829, guid: 77b4684295838884782186a211a5a6cb, type: 3} type: 3}
- {fileID: 2423305530833545252, guid: 77b4684295838884782186a211a5a6cb, type: 3} - location: 7
- {fileID: -8565254895107937726, guid: 77b4684295838884782186a211a5a6cb, type: 3} prefab: {fileID: -1447634327028791381, guid: 77b4684295838884782186a211a5a6cb,
- {fileID: -4929169701154996116, guid: 77b4684295838884782186a211a5a6cb, type: 3} type: 3}
- {fileID: -2334870282328881315, guid: 77b4684295838884782186a211a5a6cb, type: 3} - location: 8
- {fileID: -929614819956293028, guid: 77b4684295838884782186a211a5a6cb, type: 3} prefab: {fileID: -5212206449543053848, guid: 77b4684295838884782186a211a5a6cb,
- {fileID: 4483222258087546740, guid: 77b4684295838884782186a211a5a6cb, type: 3} type: 3}
- {fileID: -1447634327028791381, guid: 77b4684295838884782186a211a5a6cb, type: 3} - location: 3
- {fileID: -5212206449543053848, guid: 77b4684295838884782186a211a5a6cb, type: 3} prefab: {fileID: -4929169701154996116, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 4
prefab: {fileID: -2334870282328881315, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 5
prefab: {fileID: -929614819956293028, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 0
prefab: {fileID: 2171430479842946829, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 1
prefab: {fileID: 2423305530833545252, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 2
prefab: {fileID: -8565254895107937726, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
material: {fileID: 2100000, guid: 627fd7178942c81449aae5e08ad11d21, type: 2} material: {fileID: 2100000, guid: 627fd7178942c81449aae5e08ad11d21, type: 2}
showTile: 0 showTile: 0
--- !u!64 &7880032434625960893
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8664788757336834016}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 0}

View File

@@ -622,12 +622,12 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
lights: lights:
- lights: 010000000001
- lights: 000100000100
- lights: 000000000000 - lights: 000000000000
- lights: 000000000000 - lights: 000000000000
- lights: 000100000100 - lights: 000000000000
- lights: 010000000001 - lights: 000000000000
- lights: 000000000000
- lights: 000000000000
lightPrefab: {fileID: 5209397971498272420, guid: 2b9310245ad42eb4699083590fdd5f51, lightPrefab: {fileID: 5209397971498272420, guid: 2b9310245ad42eb4699083590fdd5f51,
type: 3} type: 3}
gridDimensions: {x: 6, y: 6} gridDimensions: {x: 6, y: 6}

View File

@@ -217,7 +217,6 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1431476700248791042} - {fileID: 1431476700248791042}
- {fileID: 7187554344845375949}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -567,80 +566,3 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
color: {r: 8, g: 3.5137255, b: 0, a: 1} color: {r: 8, g: 3.5137255, b: 0, a: 1}
emissionRenderer: {fileID: 1782781022534132745} emissionRenderer: {fileID: 1782781022534132745}
--- !u!1001 &2485194224317594919
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 2
m_TransformParent: {fileID: 2966546982734834469}
m_Modifications:
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4826747451102095092, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
propertyPath: m_Name
value: Dispenser
objectReference: {fileID: 0}
m_RemovedComponents: []
m_AddedGameObjects: []
m_SourcePrefab: {fileID: 100100000, guid: 20c9cfab710bbe04ca6f81d44a01b025, type: 3}
--- !u!4 &7187554344845375949 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4738486521284232426, guid: 20c9cfab710bbe04ca6f81d44a01b025,
type: 3}
m_PrefabInstance: {fileID: 2485194224317594919}
m_PrefabAsset: {fileID: 0}

View File

@@ -1,30 +1,98 @@
using System.Collections.Generic; using System.Collections;
using System.Collections.Generic;
using EscapeRoomEngine.Desert.Runtime.Dispenser;
using EscapeRoomEngine.Engine.Runtime.Modules;
using EscapeRoomEngine.Engine.Runtime.Utilities;
using NaughtyAttributes; using NaughtyAttributes;
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Desert.Runtime namespace EscapeRoomEngine.Desert.Runtime
{ {
[RequireComponent(typeof(Collider))] [RequireComponent(typeof(Collider))]
public class Hoop : MonoBehaviour public class Hoop : StatePuzzle
{ {
public float updateDelay;
[BoxGroup("Internal")] [SerializeField] [BoxGroup("Internal")] [SerializeField]
private List<Emission> rings; private List<Emission> rings;
public bool Solved private readonly HashSet<GameObject> _orbs = new();
private Dispenser.Dispenser _dispenser;
protected override void Start()
{ {
set base.Start();
PuzzleEvent += (_, type) =>
{ {
if (value) // ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault
switch (type)
{ {
rings.ForEach(ring => ring.color = ); case PuzzleEventType.Restarted:
} var color = Engine.Runtime.Engine.DefaultEngine.theme.puzzleColor;
else rings.ForEach(ring => ring.color = color.hdr);
{ _dispenser.Reset();
break;
case PuzzleEventType.Solved:
color = Engine.Runtime.Engine.DefaultEngine.theme.solvedColor;
rings.ForEach(ring => ring.color = color.hdr);
_dispenser.Solve();
break;
} }
};
}
protected override void SetState(int index, int value, bool checkSolution)
{
base.SetState(index, value, checkSolution);
for (var i = 0; i < rings.Count; i++)
{
rings[i].active = i < value;
} }
} }
private int _orbCount; private IEnumerator SetOrbCount()
{
if (!Solved)
{
yield return new WaitForSeconds(updateDelay);
SetState(0, _orbs.Count, true);
}
}
private void OnTriggerEnter(Collider other)
{
var orb = other.GetComponent<DispenserOrb>();
if (orb)
{
_orbs.Add(orb.gameObject);
StartCoroutine(SetOrbCount());
}
}
private void OnTriggerExit(Collider other)
{
var orb = other.GetComponent<DispenserOrb>();
if (orb)
{
_orbs.Remove(orb.gameObject);
StartCoroutine(SetOrbCount());
}
}
public override void SetModule(Module module)
{
base.SetModule(module);
var firstRelatedModule = Module.relatedModules[0];
if (firstRelatedModule.State is Dispenser.Dispenser dispenser)
{
_dispenser = dispenser;
}
else
{
throw new EngineException("Hoop was not assigned a related Dispenser.");
}
}
} }
} }

View File

@@ -82,7 +82,7 @@ namespace EscapeRoomEngine.Desert.Runtime.Puzzle_C
} }
else else
{ {
throw new EngineException("Terminal was not assigned a related Ball."); throw new EngineException("Holes were not assigned a related Dispenser.");
} }
} }
} }

View File

@@ -0,0 +1,14 @@
%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: 406f215d83114f4c9b3a92c8a0ea8d73, type: 3}
m_Name: Place With Related Module
m_EditorClassIdentifier:

View File

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

View File

@@ -0,0 +1,17 @@
using System.Collections.Generic;
using System.Linq;
using EscapeRoomEngine.Engine.Runtime.Modules;
using NaughtyAttributes;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Requirements
{
[CreateAssetMenu(menuName = "Requirements/Place With Related Module")]
public class PlaceWithRelatedModule : PlacementRequirement
{
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space)
{
return new List<Placement> { module.relatedModules[0].srPlacement };
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 406f215d83114f4c9b3a92c8a0ea8d73
timeCreated: 1670537230

View File

@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using EscapeRoomEngine.Engine.Runtime.Utilities;
using NaughtyAttributes; using NaughtyAttributes;
using UnityEngine; using UnityEngine;
@@ -14,6 +14,13 @@ namespace EscapeRoomEngine.Engine.Runtime
SW, S, SE SW, S, SE
} }
[Serializable]
public struct TilePrefab
{
public TileLocation location;
public GameObject prefab;
}
public class SpaceTile : MonoBehaviour public class SpaceTile : MonoBehaviour
{ {
public static HashSet<TileLocation> EveryTileLocation => new(new[] public static HashSet<TileLocation> EveryTileLocation => new(new[]
@@ -24,7 +31,7 @@ namespace EscapeRoomEngine.Engine.Runtime
}); });
[BoxGroup("Style Prefabs")] [SerializeField] [BoxGroup("Style Prefabs")] [SerializeField]
private UDictionary<TileLocation, GameObject> tilePrefabs; private List<TilePrefab> tilePrefabs;
[BoxGroup("Style Prefabs")] [SerializeField] [BoxGroup("Style Prefabs")] [SerializeField]
private Material material; private Material material;
@@ -53,9 +60,13 @@ namespace EscapeRoomEngine.Engine.Runtime
Destroy(_tile); Destroy(_tile);
} }
_tile = Instantiate(tilePrefabs[showTile], transform); _tile = Instantiate(tilePrefabs.Find(tilePrefab => tilePrefab.location == showTile).prefab, transform);
_tile.isStatic = true; _tile.isStatic = true;
_tile.GetComponent<MeshRenderer>().material = material; _tile.GetComponent<MeshRenderer>().material = material;
var tileCollider = _tile.AddComponent<MeshCollider>();
tileCollider.convex = true;
tileCollider.sharedMesh = _tile.GetComponent<MeshFilter>().sharedMesh;
_showTile = showTile; _showTile = showTile;
} }

View File

@@ -1,449 +0,0 @@
// https://gist.github.com/Moe-Baker/e36610361012d586b1393994febeb5d2
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Utilities
{
[Serializable]
public class UDictionary
{
public class SplitAttribute : PropertyAttribute
{
public float Key { get; protected set; }
public float Value { get; protected set; }
public SplitAttribute(float key, float value)
{
this.Key = key;
this.Value = value;
}
}
#if UNITY_EDITOR
[CustomPropertyDrawer(typeof(SplitAttribute), true)]
[CustomPropertyDrawer(typeof(UDictionary), true)]
public class Drawer : PropertyDrawer
{
SerializedProperty property;
public bool IsExpanded
{
get => property.isExpanded;
set => property.isExpanded = value;
}
SerializedProperty keys;
SerializedProperty values;
public bool IsAligned => keys.arraySize == values.arraySize;
ReorderableList list;
GUIContent label;
SplitAttribute split;
public float KeySplit => split == null ? 30f : split.Key;
public float ValueSplit => split == null ? 70f : split.Value;
public static float SingleLineHeight => EditorGUIUtility.singleLineHeight;
public const float ElementHeightPadding = 6f;
public const float ElementSpacing = 10f;
public const float ElementFoldoutPadding = 20f;
public const float TopPadding = 5f;
public const float BottomPadding = 5f;
void Init(SerializedProperty value)
{
if (SerializedProperty.EqualContents(value, property)) return;
property = value;
keys = property.FindPropertyRelative(nameof(keys));
values = property.FindPropertyRelative(nameof(values));
split = attribute as SplitAttribute;
list = new ReorderableList(property.serializedObject, keys, true, true, true, true);
list.drawHeaderCallback = DrawHeader;
list.onAddCallback = Add;
list.onRemoveCallback = Remove;
list.elementHeightCallback = GetElementHeight;
list.drawElementCallback = DrawElement;
list.onReorderCallbackWithDetails += Reorder;
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
Init(property);
var height = TopPadding + BottomPadding;
if (IsAligned)
height += IsExpanded ? list.GetHeight() : list.headerHeight;
else
height += SingleLineHeight;
return height;
}
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
{
label.text = $" {label.text}";
this.label = label;
Init(property);
rect = EditorGUI.IndentedRect(rect);
rect.y += TopPadding;
rect.height -= TopPadding + BottomPadding;
if (IsAligned == false)
{
DrawAlignmentWarning(ref rect);
return;
}
if (IsExpanded)
DrawList(ref rect);
else
DrawCompleteHeader(ref rect);
}
void DrawList(ref Rect rect)
{
EditorGUIUtility.labelWidth = 80f;
EditorGUIUtility.fieldWidth = 80f;
list.DoList(rect);
}
void DrawAlignmentWarning(ref Rect rect)
{
var width = 80f;
var spacing = 5f;
rect.width -= width;
EditorGUI.HelpBox(rect, " Misalignment Detected", MessageType.Error);
rect.x += rect.width + spacing;
rect.width = width - spacing;
if (GUI.Button(rect, "Fix"))
{
if (keys.arraySize > values.arraySize)
{
var difference = keys.arraySize - values.arraySize;
for (int i = 0; i < difference; i++)
keys.DeleteArrayElementAtIndex(keys.arraySize - 1);
}
else if (keys.arraySize < values.arraySize)
{
var difference = values.arraySize - keys.arraySize;
for (int i = 0; i < difference; i++)
values.DeleteArrayElementAtIndex(values.arraySize - 1);
}
}
}
#region Draw Header
void DrawHeader(Rect rect)
{
rect.x += 10f;
IsExpanded = EditorGUI.Foldout(rect, IsExpanded, label, true);
}
void DrawCompleteHeader(ref Rect rect)
{
ReorderableList.defaultBehaviours.DrawHeaderBackground(rect);
rect.x += 6;
rect.y += 0;
DrawHeader(rect);
}
#endregion
float GetElementHeight(int index)
{
SerializedProperty key = keys.GetArrayElementAtIndex(index);
SerializedProperty value = values.GetArrayElementAtIndex(index);
var kHeight = GetChildernSingleHeight(key);
var vHeight = GetChildernSingleHeight(value);
var max = Math.Max(kHeight, vHeight);
if (max < SingleLineHeight) max = SingleLineHeight;
return max + ElementHeightPadding;
}
#region Draw Element
void DrawElement(Rect rect, int index, bool isActive, bool isFocused)
{
rect.height -= ElementHeightPadding;
rect.y += ElementHeightPadding / 2;
var areas = Split(rect, KeySplit, ValueSplit);
DrawKey(areas[0], index);
DrawValue(areas[1], index);
}
void DrawKey(Rect rect, int index)
{
var property = keys.GetArrayElementAtIndex(index);
rect.x += ElementSpacing / 2f;
rect.width -= ElementSpacing;
DrawField(rect, property);
}
void DrawValue(Rect rect, int index)
{
var property = values.GetArrayElementAtIndex(index);
rect.x += ElementSpacing / 2f;
rect.width -= ElementSpacing;
DrawField(rect, property);
}
void DrawField(Rect rect, SerializedProperty property)
{
rect.height = SingleLineHeight;
if (IsInline(property))
{
EditorGUI.PropertyField(rect, property, GUIContent.none);
}
else
{
rect.x += ElementSpacing / 2f;
rect.width -= ElementSpacing;
foreach (var child in IterateChildern(property))
{
EditorGUI.PropertyField(rect, child, false);
rect.y += SingleLineHeight + +2f;
}
}
}
#endregion
void Reorder(ReorderableList list, int oldIndex, int newIndex)
{
values.MoveArrayElement(oldIndex, newIndex);
}
void Add(ReorderableList list)
{
values.InsertArrayElementAtIndex(values.arraySize);
ReorderableList.defaultBehaviours.DoAddButton(list);
}
void Remove(ReorderableList list)
{
values.DeleteArrayElementAtIndex(list.index);
ReorderableList.defaultBehaviours.DoRemoveButton(list);
}
//Static Utility
static Rect[] Split(Rect source, params float[] cuts)
{
var rects = new Rect[cuts.Length];
var x = 0f;
for (int i = 0; i < cuts.Length; i++)
{
rects[i] = new Rect(source);
rects[i].x += x;
rects[i].width *= cuts[i] / 100;
x += rects[i].width;
}
return rects;
}
static bool IsInline(SerializedProperty property)
{
switch (property.propertyType)
{
case SerializedPropertyType.Generic:
return property.hasVisibleChildren == false;
}
return true;
}
static IEnumerable<SerializedProperty> IterateChildern(SerializedProperty property)
{
var path = property.propertyPath;
property.Next(true);
while (true)
{
yield return property;
if (property.NextVisible(false) == false) break;
if (property.propertyPath.StartsWith(path) == false) break;
}
}
float GetChildernSingleHeight(SerializedProperty property)
{
if (IsInline(property)) return SingleLineHeight;
var height = 0f;
foreach (var child in IterateChildern(property))
height += SingleLineHeight + 2f;
return height;
}
}
#endif
}
[Serializable]
public class UDictionary<TKey, TValue> : UDictionary, IDictionary<TKey, TValue>
{
[SerializeField] List<TKey> keys;
public List<TKey> Keys => keys;
ICollection<TKey> IDictionary<TKey, TValue>.Keys => keys;
[SerializeField] List<TValue> values;
public List<TValue> Values => values;
ICollection<TValue> IDictionary<TKey, TValue>.Values => values;
public int Count => keys.Count;
public bool IsReadOnly => false;
Dictionary<TKey, TValue> cache;
public bool Cached => cache != null;
public Dictionary<TKey, TValue> Dictionary
{
get
{
if (cache == null)
{
cache = new Dictionary<TKey, TValue>();
for (int i = 0; i < keys.Count; i++)
{
if (keys[i] == null) continue;
if (cache.ContainsKey(keys[i])) continue;
cache.Add(keys[i], values[i]);
}
}
return cache;
}
}
public TValue this[TKey key]
{
get => Dictionary[key];
set
{
var index = keys.IndexOf(key);
if (index < 0)
{
Add(key, value);
}
else
{
values[index] = value;
if (Cached) Dictionary[key] = value;
}
}
}
public bool TryGetValue(TKey key, out TValue value) => Dictionary.TryGetValue(key, out value);
public bool ContainsKey(TKey key) => Dictionary.ContainsKey(key);
public bool Contains(KeyValuePair<TKey, TValue> item) => ContainsKey(item.Key);
public void Add(TKey key, TValue value)
{
keys.Add(key);
values.Add(value);
if (Cached) Dictionary.Add(key, value);
}
public void Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value);
public bool Remove(TKey key)
{
var index = keys.IndexOf(key);
if (index < 0) return false;
keys.RemoveAt(index);
values.RemoveAt(index);
if (Cached) Dictionary.Remove(key);
return true;
}
public bool Remove(KeyValuePair<TKey, TValue> item) => Remove(item.Key);
public void Clear()
{
keys.Clear();
values.Clear();
if (Cached) Dictionary.Clear();
}
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) =>
(Dictionary as IDictionary).CopyTo(array, arrayIndex);
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => Dictionary.GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => Dictionary.GetEnumerator();
public UDictionary()
{
values = new List<TValue>();
keys = new List<TKey>();
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 238265e493429c44ebcd511153a19322
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 414b94700c9b4f419c6415f60e5dfb2a
timeCreated: 1670537525