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_Name: Desert
m_EditorClassIdentifier:
minRoomSize: {x: 3, y: 3}
playSpace: {x: 3, y: 5}
minRoomSize: {x: 2, y: 2}
playSpace: {x: 2, y: 4}
spaceTile: {fileID: 3229991053255736984, guid: b8f192f7cebe686468af6b1a71c4605b,
type: 3}
environment: {fileID: 5743657079028767629, guid: 17ecdbaca50efaa4ab503614dfec54a8,
@@ -32,8 +32,4 @@ MonoBehaviour:
- {fileID: 11400000, guid: 83d6800536b1df14287ff2cd8e0d58ce, type: 2}
puzzleCount: {x: 1, y: 2}
puzzleTypes:
- {fileID: 11400000, guid: 3f79d37154e44ca47b54bb43bbe8d9aa, 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}
- {fileID: 11400000, guid: ee5a44432e80cd64689be3ff34750339, type: 2}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: Dispenser Easy
m_EditorClassIdentifier:
types: 03000000
modulePrefab: {fileID: 3942114796521670514, guid: 20c9cfab710bbe04ca6f81d44a01b025,
modulePrefab: {fileID: 8291735269762471888, guid: 8253a7c07eeea3b48832a42b847cf0f1,
type: 3}
preconditionRequirements: []
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
guid: 11e962d632c515e4ea1a885b3fbc1692
guid: 2393bf2b32e06f647a014688e3d8a8d9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
mainObjectFileID: 11400000
userData:
assetBundleName:
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:
- component: {fileID: 8664788757336834019}
- component: {fileID: 3229991053255736984}
- component: {fileID: 7880032434625960893}
m_Layer: 0
m_Name: Desert Space Tile
m_TagString: Untagged
@@ -45,16 +46,46 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
tilePrefabs:
keys: 000000000100000002000000030000000400000005000000060000000700000008000000
values:
- {fileID: 2171430479842946829, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: 2423305530833545252, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: -8565254895107937726, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: -4929169701154996116, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: -2334870282328881315, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: -929614819956293028, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: 4483222258087546740, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: -1447634327028791381, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- {fileID: -5212206449543053848, guid: 77b4684295838884782186a211a5a6cb, type: 3}
- location: 6
prefab: {fileID: 4483222258087546740, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 7
prefab: {fileID: -1447634327028791381, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 8
prefab: {fileID: -5212206449543053848, guid: 77b4684295838884782186a211a5a6cb,
type: 3}
- location: 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}
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_EditorClassIdentifier:
lights:
- lights: 010000000001
- lights: 000100000100
- lights: 000000000000
- lights: 000000000000
- lights: 000100000100
- lights: 010000000001
- lights: 000000000000
- lights: 000000000000
- lights: 000000000000
- lights: 000000000000
lightPrefab: {fileID: 5209397971498272420, guid: 2b9310245ad42eb4699083590fdd5f51,
type: 3}
gridDimensions: {x: 6, y: 6}

View File

@@ -217,7 +217,6 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1431476700248791042}
- {fileID: 7187554344845375949}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -567,80 +566,3 @@ MonoBehaviour:
m_EditorClassIdentifier:
color: {r: 8, g: 3.5137255, b: 0, a: 1}
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 UnityEngine;
namespace EscapeRoomEngine.Desert.Runtime
{
[RequireComponent(typeof(Collider))]
public class Hoop : MonoBehaviour
public class Hoop : StatePuzzle
{
public float updateDelay;
[BoxGroup("Internal")] [SerializeField]
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 = );
}
else
{
case PuzzleEventType.Restarted:
var color = Engine.Runtime.Engine.DefaultEngine.theme.puzzleColor;
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
{
throw new EngineException("Terminal was not assigned a related Ball.");
throw new EngineException("Holes were not assigned a related Dispenser.");
}
}
}