Compare commits

72 Commits
engine ... main

Author SHA1 Message Date
924ef43361 skipping puzzles 2023-05-16 16:09:45 +02:00
7a8e945f81 some more puzzle sounds 2023-05-16 15:01:06 +02:00
de10513161 support more puzzles with smaller room distance 2023-05-16 13:53:18 +02:00
1b2a6395c4 fix end terminal pluralisation 2023-05-16 13:46:15 +02:00
64a3eba203 vive cosmos and index controller support 2023-05-16 13:36:27 +02:00
480f458706 cosmos and focus3 (with wave) 2023-05-16 12:35:13 +02:00
b9bfeda9b6 small bug in elevator 2023-05-16 08:14:34 +02:00
c9d1717acc vive focus3 support 2023-05-16 08:00:37 +02:00
16a69d2fec end terminal placement 2023-05-15 20:52:27 +02:00
bbdae70907 remove index controller grip interaction 2023-05-15 16:01:58 +02:00
c241e3d680 end terminal module 2023-05-15 16:00:43 +02:00
d486a1cf6e environment management 2023-05-15 14:04:09 +02:00
fd705d46e8 beacons 2023-05-15 11:18:13 +02:00
0d451302e0 only allow using elevator while on it 2023-05-15 09:13:12 +02:00
8de8301205 station 46 audio and animation 2023-05-14 21:22:58 +02:00
48742e7d14 sphere speaking 2023-05-14 19:04:46 +02:00
e2699061da editor transport camera between rooms 2023-05-14 18:33:14 +02:00
eba953b844 station 46 room 2023-05-14 18:13:02 +02:00
f03d723119 intro sphere 2023-05-13 15:45:05 +02:00
803b6c32b0 add control room assets 2023-05-13 14:54:31 +02:00
033989a85e increase room diversity, improve ui 2023-05-13 13:06:08 +02:00
ec094f410f hotfixes 2023-05-12 10:48:00 +02:00
05c952e7c7 set room size in ui 2023-05-12 02:59:40 +02:00
939c741787 bugfixes 2023-05-12 02:19:56 +02:00
eb0c803ad7 ring model 2023-05-11 22:00:41 +02:00
309296e7a7 elevated platform model 2023-05-11 19:54:56 +02:00
f16b026404 laser sink 2023-04-25 19:42:08 +02:00
064470be4d emitter model 2023-04-25 16:54:21 +02:00
b79e80b898 align steles puzzle 2023-04-25 11:31:25 +02:00
218bfcbd71 fix symbol button colliders 2023-04-12 17:45:19 +02:00
7ddf555771 fling holes puzzle 2023-04-12 16:03:10 +02:00
42ef7cc9bd timed button stand puzzle 2023-04-12 12:18:04 +02:00
7e803a5279 hoop drop animations, multiemission 2023-04-11 17:42:59 +02:00
a866257535 finish laser puzzle easy 2023-04-11 14:44:13 +02:00
a0aaf5e87d respawning 2023-04-11 13:40:17 +02:00
fd44becec0 laser puzzle platform and elevated platform module 2023-04-11 11:16:20 +02:00
1ba43d0b07 laser puzzle easy 2023-04-06 17:05:17 +02:00
3fd61039fb laser redirector group module 2023-04-06 17:31:34 +02:00
b96b47f963 laser sink puzzle module 2023-04-06 15:48:00 +02:00
cb54ebab05 laser emitter module 2023-04-06 15:21:23 +02:00
b4612b482f working lasers 2023-04-06 14:01:22 +02:00
393d52feef fix namespaces 2023-04-06 09:55:51 +02:00
a71e5cac37 measurements take pausing the game into account 2023-04-06 09:47:33 +02:00
0dc7eef753 fix portal placement 2023-04-06 09:12:15 +02:00
31e96aa10a unity 2022.2.14 2023-04-06 08:06:21 +02:00
128ab216d2 refactor modules 2023-03-22 17:03:55 +01:00
52cf3a7fbd stop hiding old rooms 2023-03-22 10:15:01 +01:00
30d8f986df move puzzle implementations out of engine 2023-03-22 09:44:17 +01:00
e1bfecbd4b refactor Desert assembly into Station46 2023-05-09 02:15:57 +02:00
9c65d24685 small fixes 2023-03-22 07:54:00 +01:00
307edb8491 make portal surface work with transparent objects 2023-03-15 19:59:15 +01:00
6cf8d72900 make desert portals stencil portals 2023-03-15 19:04:55 +01:00
cd8c4cd345 portal surface 2023-03-15 15:15:26 +01:00
c024ddfe5e render stencil portals (stereo) 2023-03-15 13:47:11 +01:00
52fa079fce unity 2022.2.11 2023-03-15 10:16:14 +01:00
574ae42c93 fix frustum culling for portals 2023-03-08 17:12:48 +01:00
4be8380a40 render stencil portals (transparent) 2023-03-08 15:39:58 +01:00
02bb0727b7 unity 2022.2.9 2023-03-08 08:24:55 +01:00
6d2b5c52a1 render stencil portals (opaque) 2023-03-03 16:25:24 +01:00
5e911f2df1 remove unnecessary nesting from render pipeline settings 2023-03-03 16:21:03 +01:00
d834b76aac fix skybox clipping 2023-03-03 16:19:44 +01:00
70c603ad83 update packages and remove unused 2023-02-21 08:32:32 +01:00
27dbb24b9f unity 2022.2.7 2023-02-21 08:06:13 +01:00
dd080ef541 fix stencil pass 2023-02-14 17:03:12 +01:00
da1837f00c unity 2022.2.6 2023-02-14 13:44:30 +01:00
c5f3bb3299 number portals 2023-02-14 13:34:11 +01:00
e8ae057754 unity mock hmd 2023-02-14 13:15:52 +01:00
8aa329a055 stencil portals pass 1 and 2 2023-02-14 11:22:01 +01:00
b2c509e9cb don't store player instance 2023-02-07 12:53:21 +01:00
013708f3b2 update unity 2023-02-07 12:36:49 +01:00
190a6f0cc9 Add LICENSE 2023-01-01 19:37:10 +00:00
155682a062 Merge branch 'engine' into 'main'
engine into main

See merge request milanvanzanten/escape-room-engine!1
2023-01-01 19:36:42 +00:00
1193 changed files with 105093 additions and 3621 deletions

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 2ef3a3f442154e3b9dfd9b5d481da2f3
timeCreated: 1668944890

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,116 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &6542684658370590840
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 419816427646908932, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_Name
value: Desert XR Origin
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816427646908934, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 419816429261119706, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_ModelPrefab
value:
objectReference: {fileID: 3680365890358827431, guid: 7bb2b5aee7d244943b4f1bb2f6606ac2,
type: 3}
- target: {fileID: 419816429261119717, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_Radius
value: 0.05
objectReference: {fileID: 0}
- target: {fileID: 419816429507230469, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_Radius
value: 0.05
objectReference: {fileID: 0}
- target: {fileID: 419816429507230714, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
propertyPath: m_ModelPrefab
value:
objectReference: {fileID: 3680365890358827431, guid: 7bb2b5aee7d244943b4f1bb2f6606ac2,
type: 3}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 419816428804372187, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
insertIndex: -1
addedObject: {fileID: 542038026734091070}
m_SourcePrefab: {fileID: 100100000, guid: c84e0198f66a41b4294f6e8e585192a4, type: 3}
--- !u!1 &6854256365856247459 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 419816428804372187, guid: c84e0198f66a41b4294f6e8e585192a4,
type: 3}
m_PrefabInstance: {fileID: 6542684658370590840}
m_PrefabAsset: {fileID: 0}
--- !u!45 &542038026734091070
Skybox:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6854256365856247459}
m_Enabled: 1
m_CustomSkybox: {fileID: 2100000, guid: b543b13595b5be247a0ef19ffdc5344b, type: 2}

View File

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

View File

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

View File

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

View File

@@ -1,214 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1506878834482086433
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5095331294769565189}
m_Layer: 0
m_Name: Slot 1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5095331294769565189
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1506878834482086433}
m_LocalRotation: {x: -0.9820791, y: -0, z: -0, w: 0.18846948}
m_LocalPosition: {x: 0, y: 0.812958, z: -0.104633}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7756295983983028816}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: -158.273, y: 0, z: 0}
--- !u!1 &4316323159942158443
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 862697354921996744}
m_Layer: 0
m_Name: Slot 0
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &862697354921996744
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4316323159942158443}
m_LocalRotation: {x: -0.9820791, y: -0, z: -0, w: 0.18846948}
m_LocalPosition: {x: 0, y: 0.886395, z: -0.288131}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7756295983983028816}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: -158.273, y: 0, z: 0}
--- !u!1 &7612444233466593008
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6165579071297624197}
m_Layer: 0
m_Name: Slot 2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6165579071297624197
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7612444233466593008}
m_LocalRotation: {x: -0.9820791, y: -0, z: -0, w: 0.18846948}
m_LocalPosition: {x: 0, y: 0.73952, z: 0.078867}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7756295983983028816}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: -158.273, y: 0, z: 0}
--- !u!1001 &2384246425946067472
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 2
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827905, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: totalSteps
value: 3
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827905, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: symbols.Array.size
value: 3
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827905, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: symbolSlots.Array.size
value: 3
objectReference: {fileID: 0}
- target: {fileID: 5383329221585827905, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: symbolSlots.Array.data[0]
value:
objectReference: {fileID: 862697354921996744}
- target: {fileID: 5383329221585827905, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: symbolSlots.Array.data[1]
value:
objectReference: {fileID: 5095331294769565189}
- target: {fileID: 5383329221585827905, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: symbolSlots.Array.data[2]
value:
objectReference: {fileID: 6165579071297624197}
- target: {fileID: 5383329221585827911, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
propertyPath: m_Name
value: Terminal 3 Slots
objectReference: {fileID: 0}
m_RemovedComponents: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
insertIndex: -1
addedObject: {fileID: 862697354921996744}
- targetCorrespondingSourceObject: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
insertIndex: -1
addedObject: {fileID: 5095331294769565189}
- targetCorrespondingSourceObject: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
insertIndex: -1
addedObject: {fileID: 6165579071297624197}
m_SourcePrefab: {fileID: 100100000, guid: 02a72e7f56d97334c93a1449eedc9d91, type: 3}
--- !u!4 &7756295983983028816 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5383329221585827904, guid: 02a72e7f56d97334c93a1449eedc9d91,
type: 3}
m_PrefabInstance: {fileID: 2384246425946067472}
m_PrefabAsset: {fileID: 0}

View File

@@ -1,13 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Desert space and environment
- Puzzle A, press buttons when their symbols light up

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 5c40d0f295594f1bb8fcff1eafc17107
timeCreated: 1668939744

View File

@@ -1,3 +0,0 @@
# Desert
A desert theme for the VR escape room engine.

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 22c108ee7cba4c8da59abc65012143ea
timeCreated: 1668940013

View File

@@ -1,18 +0,0 @@
{
"name": "Desert",
"rootNamespace": "EscapeRoomEngine",
"references": [
"GUID:2d68e204354e44f2a2ecf3cfa9213c5f",
"GUID:ba4c7dba98ca4c31818cc46276b5dea1",
"GUID:776d03a35f1b52c4a9aed9f56d7b4229"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 20d0c4bd521546c7859e37019a165e38
timeCreated: 1668940232

View File

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

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 788a501fd6ac4d74bc34a49c99b02fc2
timeCreated: 1670792890

View File

@@ -1,37 +0,0 @@
using EscapeRoomEngine.Engine.Runtime.Modules;
using UnityEngine;
namespace EscapeRoomEngine.Desert.Runtime.Portal
{
/// <summary>
/// The desert theme includes its own version of a portal that changes colour when it is unlocked.
/// </summary>
[RequireComponent(typeof(Emission))]
public class DesertPortal : EscapeRoomEngine.Portal.Runtime.Portal
{
private Emission _emission;
protected override void Awake()
{
base.Awake();
_emission = GetComponent<Emission>();
DoorEvent += (_, type) =>
{
// ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault ConvertSwitchStatementToSwitchExpression
switch (type)
{
case DoorEventType.Unlocked:
_emission.color = Engine.Runtime.Engine.Theme.solvedColor.hdr;
break;
case DoorEventType.Locked:
_emission.color = Engine.Runtime.Engine.Theme.puzzleColor.hdr;
break;
}
};
_emission.active = true;
}
}
}

View File

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

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: d97e612b38c148c1a988eefa9af29b75
timeCreated: 1669687251

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 3ec2f8925bad45d189d951bc02b39c11
timeCreated: 1669815308

View File

@@ -1,15 +0,0 @@
{
"displayName": "Escape Room Engine Theme - Desert",
"name": "wtf.milan.escape-room-engine.desert",
"version": "0.0.1",
"description": "A desert theme for the VR escape room engine.",
"unity": "2022.1",
"author": {
"name": "Milan van Zanten",
"email": "milan@milan.wtf",
"url": "https://milan.wtf"
},
"hideInEditor": false,
"keywords": ["vr", "virtual reality", "modular", "escape room"],
"dependencies": {}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 720aa805e8204bab88c42fd946331244
timeCreated: 1668939945

View File

@@ -7,7 +7,7 @@ LightingSettings:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Lighting Settings m_Name: Lighting Settings
serializedVersion: 5 serializedVersion: 6
m_GIWorkflowMode: 1 m_GIWorkflowMode: 1
m_EnableBakedLightmaps: 1 m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0 m_EnableRealtimeLightmaps: 0
@@ -46,7 +46,7 @@ LightingSettings:
m_PVREnvironmentReferencePointCount: 2048 m_PVREnvironmentReferencePointCount: 2048
m_LightProbeSampleCountMultiplier: 4 m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2 m_PVRBounces: 2
m_PVRMinBounces: 1 m_PVRMinBounces: 2
m_PVREnvironmentImportanceSampling: 1 m_PVREnvironmentImportanceSampling: 1
m_PVRFilteringMode: 1 m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1 m_PVRDenoiserTypeDirect: 1
@@ -63,3 +63,4 @@ LightingSettings:
m_PVRFilteringAtrousPositionSigmaAO: 1 m_PVRFilteringAtrousPositionSigmaAO: 1
m_PVRTiledBaking: 0 m_PVRTiledBaking: 0
m_NumRaysToShootPerTexel: -1 m_NumRaysToShootPerTexel: -1
m_RespectSceneVisibilityWhenBakingGI: 0

View File

@@ -0,0 +1,316 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &1426389422660023004
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 3093889143253032090, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_Name
value: Current Puzzle
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_RootOrder
value: -1
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_SizeDelta.x
value: 320
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_SizeDelta.y
value: 30
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
insertIndex: -1
addedObject: {fileID: 5130676646786296218}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: cad05994b2fb37746988912bce5a31f5, type: 3}
--- !u!114 &1167465838608174999 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 286020777690709323, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
m_PrefabInstance: {fileID: 1426389422660023004}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8ef80fc9016c4a46a190769f3b771bfa, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &4117484506985705025 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5,
type: 3}
m_PrefabInstance: {fileID: 1426389422660023004}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8450872368111848395
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 4117484506985705025}
m_Modifications:
- target: {fileID: 3635623839229914385, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_Text
value: Skip
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501520, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_Name
value: Button
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_RootOrder
value: -1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_SizeDelta.x
value: 38
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_SizeDelta.y
value: 30
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501522, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501522, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501522, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1167465838608174999}
- target: {fileID: 3635623840709501522, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501522, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: Skip
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501522, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: EscapeRoomEngine.Engine.Runtime.UI.PuzzlePlanEntry, Engine
objectReference: {fileID: 0}
- target: {fileID: 3635623840709501522, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c7b840466ebfae1468d75282ab9334f5, type: 3}
--- !u!224 &5130676646786296218 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5,
type: 3}
m_PrefabInstance: {fileID: 8450872368111848395}
m_PrefabAsset: {fileID: 0}

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -56,7 +56,7 @@ PrefabInstance:
- target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 54 value: 30
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
@@ -225,7 +225,7 @@ PrefabInstance:
- target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 320 value: 122
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
@@ -270,12 +270,12 @@ PrefabInstance:
- target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 0 value: 160
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -30 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
@@ -295,7 +295,7 @@ PrefabInstance:
- target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}
propertyPath: m_Text propertyPath: m_Text
value: 'Time Estimate: ' value: 'Est. '
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9,
type: 3} type: 3}

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: 5aece1c1f67b46afaf249c4520a0478f, type: 3}
m_Name: Place On Bottom Or Top Row Alternating
m_EditorClassIdentifier:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: dc63b0ce40036614b8465acd6a78bc8e guid: 49248c593c97bff4f8889e5c4da6c1bb
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 11400000 mainObjectFileID: 11400000

View File

@@ -10,5 +10,5 @@ MonoBehaviour:
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 406f215d83114f4c9b3a92c8a0ea8d73, type: 3} m_Script: {fileID: 11500000, guid: 406f215d83114f4c9b3a92c8a0ea8d73, type: 3}
m_Name: Place With Related Module m_Name: Place With First Related Module
m_EditorClassIdentifier: m_EditorClassIdentifier:

View File

@@ -11,7 +11,13 @@ namespace EscapeRoomEngine.Engine.Runtime.Editor
public class EngineEditor : EditorWindow public class EngineEditor : EditorWindow
{ {
private bool _registeredUpdateEvent; private bool _registeredUpdateEvent;
private Button _passToNextRoomButton, _skipCurrentRoomButton, _skipAndPassButton;
private Button
_passToNextRoomButton,
_skipCurrentRoomButton,
_skipAndPassButton,
_cameraUpButton,
_cameraDownButton;
[MenuItem("Window/Engine Editor")] [MenuItem("Window/Engine Editor")]
public static void ShowEditor() public static void ShowEditor()
@@ -37,6 +43,16 @@ namespace EscapeRoomEngine.Engine.Runtime.Editor
text = "Skip Current And Pass To Next Room" text = "Skip Current And Pass To Next Room"
}; };
rootVisualElement.Add(_skipAndPassButton); rootVisualElement.Add(_skipAndPassButton);
_cameraUpButton = new Button(CameraUp)
{
text = "Camera ↑"
};
rootVisualElement.Add(_cameraUpButton);
_cameraDownButton = new Button(CameraDown)
{
text = "Camera ↓"
};
rootVisualElement.Add(_cameraDownButton);
EditorApplication.playModeStateChanged += _ => UpdateUI(); EditorApplication.playModeStateChanged += _ => UpdateUI();
UpdateUI(); UpdateUI();
@@ -70,6 +86,16 @@ namespace EscapeRoomEngine.Engine.Runtime.Editor
} }
} }
private void CameraUp()
{
SceneView.lastActiveSceneView.pivot += new Vector3(0, 400, 0);
}
private void CameraDown()
{
SceneView.lastActiveSceneView.pivot += new Vector3(0, -400, 0);
}
private void UpdateUI() private void UpdateUI()
{ {
if (Engine.Instance && EditorApplication.isPlaying) if (Engine.Instance && EditorApplication.isPlaying)

View File

@@ -1,13 +1,16 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using EscapeRoomEngine.Engine.Runtime.Environment;
using EscapeRoomEngine.Engine.Runtime.Measurements; using EscapeRoomEngine.Engine.Runtime.Measurements;
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Modules;
using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.UI; using EscapeRoomEngine.Engine.Runtime.UI;
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Utilities;
using NaughtyAttributes; using NaughtyAttributes;
using UnityEngine; using UnityEngine;
using Logger = EscapeRoomEngine.Engine.Runtime.Utilities.Logger; using Logger = EscapeRoomEngine.Engine.Runtime.Utilities.Logger;
using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType; using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType;
using Range = EscapeRoomEngine.Engine.Runtime.Utilities.Range;
namespace EscapeRoomEngine.Engine.Runtime namespace EscapeRoomEngine.Engine.Runtime
{ {
@@ -40,12 +43,13 @@ namespace EscapeRoomEngine.Engine.Runtime
public int NumberOfRooms => _rooms.Count; public int NumberOfRooms => _rooms.Count;
public IOption<Room> CurrentRoom => NumberOfRooms > 0 ? Some<Room>.Of(_rooms[^1]) : None<Room>.New(); public IOption<Room> CurrentRoom => NumberOfRooms > 0 ? Some<Room>.Of(_rooms[^1]) : None<Room>.New();
/// <summary> /// <summary>
/// The currendly estimated time for the player to finish the experience. /// The currently estimated time for the player to finish the experience.
/// </summary> /// </summary>
public float EstimatedTimeRemaining { get; private set; } public float EstimatedTimeRemaining { get; private set; }
private readonly List<Room> _rooms = new(); private readonly List<Room> _rooms = new();
private List<PuzzleModuleDescription> _availablePuzzles, _plannedPuzzles; private List<PuzzleModuleDescription> _availablePuzzles, _plannedPuzzles;
private List<RoomEnvironment> _availableEnvironments;
private GameObject _playSpaceOrigin; private GameObject _playSpaceOrigin;
private void Awake() private void Awake()
@@ -56,13 +60,19 @@ namespace EscapeRoomEngine.Engine.Runtime
_availablePuzzles = new List<PuzzleModuleDescription>(theme.puzzleTypes); _availablePuzzles = new List<PuzzleModuleDescription>(theme.puzzleTypes);
_plannedPuzzles = new List<PuzzleModuleDescription>(_availablePuzzles); _plannedPuzzles = new List<PuzzleModuleDescription>(_availablePuzzles);
ResetAvailableEnvironments();
} }
private void Start() private void Start()
{ {
_playSpaceOrigin = new GameObject("Play Space Origin"); _playSpaceOrigin = new GameObject("Play Space Origin");
_playSpaceOrigin.transform.SetParent(transform); _playSpaceOrigin.transform.SetParent(transform);
_playSpaceOrigin.transform.localPosition = new Vector3(-theme.playSpace.x / 2f, 0, -theme.playSpace.y / 2f); _playSpaceOrigin.transform.localPosition = new Vector3(-GameControl.Instance.RoomSize.x / 2f, 0, -GameControl.Instance.RoomSize.y / 2f);
}
private void ResetAvailableEnvironments()
{
_availableEnvironments = new List<RoomEnvironment>(theme.environments);
} }
#region Generation #region Generation
@@ -71,34 +81,68 @@ namespace EscapeRoomEngine.Engine.Runtime
{ {
Logger.Log("Generating room...", LogType.RoomGeneration); Logger.Log("Generating room...", LogType.RoomGeneration);
// get the last entrance from the newest room or create a spawn passage with no entrance door for where the player will start var intro = NumberOfRooms == 0;
var entrance = NumberOfRooms > 0 ? _rooms.Last().exit : new Passage(new DoorModule(null, theme.spawnDoor));
var room = new Room(entrance); Passage entrance;
RoomEnvironment environment;
if (intro)
{
entrance = new Passage(new DoorModule(null, theme.spawnDoor));
environment = theme.intro.introEnvironment;
}
else
{
entrance = _rooms.Last().exit;
if (_availableEnvironments.Count == 0)
{
ResetAvailableEnvironments();
}
environment = _availableEnvironments.PopRandomElement();
}
var room = new Room(entrance, environment);
_rooms.Add(room); _rooms.Add(room);
if (_plannedPuzzles.Count > 0) if (intro)
{
GenerateIntroSpace(room, entrance);
}
else if (_plannedPuzzles.Count > 0)
{ {
GeneratePuzzleSpace(room, entrance); GeneratePuzzleSpace(room, entrance);
} }
else else
{ {
GenerateEndSpace(room, entrance); GenerateEndSpace(room, entrance);
GameControl.Instance.StopGame(); GameControl.Instance.FinishGame();
} }
var roomId = _rooms.Count - 1; var roomId = _rooms.Count - 1;
room.InstantiateRoom(_playSpaceOrigin.transform, roomId * roomOffset, roomId.ToString()); room.InstantiateRoom(_playSpaceOrigin.transform, roomId * roomOffset, roomId.ToString());
if (theme.environment) Instantiate(room.environment.environment, room.roomObject.transform, false);
if (intro)
{ {
Instantiate(theme.environment, room.roomObject.transform, false); FindObjectOfType<Intro>().Place(room.exit.fromOut.DoorState.transform);
} }
GameControl.Instance.TimeInRoom = 0; GameControl.Instance.TimeInRoom = 0;
UpdateUI(); UpdateUI();
} }
private void GenerateIntroSpace(Room room, Passage entrance)
{
Logger.Log($"Generating intro space...", LogType.RoomGeneration);
var space = new IntroSpace(room, entrance);
var exitDoor = new DoorModule(space, theme.introExitDoor);
if (!space.AddModuleWithRequirements(exitDoor))
{
throw new EngineException("Could not satisfy requirements for exit door.");
}
var exit = new Passage(exitDoor);
room.AddSpace(space, exit);
}
private void GeneratePuzzleSpace(Room room, Passage entrance) private void GeneratePuzzleSpace(Room room, Passage entrance)
{ {
var puzzlesAdded = 0; var puzzlesAdded = 0;
@@ -106,8 +150,9 @@ namespace EscapeRoomEngine.Engine.Runtime
Space space; Space space;
Passage exit; Passage exit;
// choose the next puzzle // choose a puzzle from the plan and remove it from both the plan and later available puzzles (so it is only chosen once)
var puzzle = ChoosePuzzle(); var puzzle = Measure.PreferLessPlayed ? _plannedPuzzles.Pop() : _plannedPuzzles.PopRandomElement();
_availablePuzzles.Remove(puzzle);
GameControl.Instance.CurrentPuzzle = puzzle; GameControl.Instance.CurrentPuzzle = puzzle;
do do
@@ -145,15 +190,13 @@ namespace EscapeRoomEngine.Engine.Runtime
{ {
Logger.Log($"Generating end space...", LogType.RoomGeneration); Logger.Log($"Generating end space...", LogType.RoomGeneration);
room.AddSpace(new Space(room, entrance), null); var space = new Space(room, entrance);
} var endModule = new Module(space, theme.endModule);
if (!space.AddModuleWithRequirements(endModule))
private PuzzleModuleDescription ChoosePuzzle()
{ {
// choose a puzzle from the plan and remove it from both the plan and later available puzzles (so it is only chosen once) throw new EngineException("Could not satisfy requirements for end module.");
var puzzle = _plannedPuzzles.PopRandomElement(); }
_availablePuzzles.Remove(puzzle); room.AddSpace(space, null);
return puzzle;
} }
#endregion #endregion
@@ -179,19 +222,20 @@ namespace EscapeRoomEngine.Engine.Runtime
_plannedPuzzles.Add(_availablePuzzles[i]); _plannedPuzzles.Add(_availablePuzzles[i]);
} }
if (Measure.PreferLessPlayed)
{
_plannedPuzzles.Sort((a, b) => Measure.TimesPlayed(a).CompareTo(Measure.TimesPlayed(b)));
}
EstimatedTimeRemaining = Measure.EstimateTime(_plannedPuzzles); EstimatedTimeRemaining = Measure.EstimateTime(_plannedPuzzles);
GameControl.Instance.PlannedPuzzles = _plannedPuzzles; GameControl.Instance.PlannedPuzzles = _plannedPuzzles;
} }
/// <summary>
/// Hide or destroy the room two rooms ago. The actual previous room is kept for the player to be able to backtrack one room.
/// </summary>
/// <param name="destroy"></param>
public void HidePreviousRoom(bool destroy = true) public void HidePreviousRoom(bool destroy = true)
{ {
if (NumberOfRooms > 2) if (NumberOfRooms >= 2)
{ {
var room = _rooms[NumberOfRooms - 3]; var room = _rooms[NumberOfRooms - 2];
// lock the doors that might be used to return to the old room // lock the doors that might be used to return to the old room
room.exit.toIn.DoorState.Lock(); room.exit.toIn.DoorState.Lock();

View File

@@ -1,5 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Environment;
using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Utilities;
using JetBrains.Annotations; using JetBrains.Annotations;
using NaughtyAttributes; using NaughtyAttributes;
@@ -13,25 +15,21 @@ namespace EscapeRoomEngine.Engine.Runtime
[CreateAssetMenu(menuName = "Engine Theme")] [CreateAssetMenu(menuName = "Engine Theme")]
public class EngineTheme : ScriptableObject public class EngineTheme : ScriptableObject
{ {
#region Size
[BoxGroup("Size")] [Tooltip("The minimum size that should be allowed for rooms.")]
public Vector2Int minRoomSize;
[BoxGroup("Size")] [Tooltip("The size of the physical play space available to the engine.")]
public Vector2Int playSpace;
#endregion
#region Theme #region Theme
[BoxGroup("Theme")]
public Intro intro;
[BoxGroup("Theme")]
public ModuleDescription endModule;
[BoxGroup("Theme")] [Required] [BoxGroup("Theme")] [Required]
[Tooltip("The tile that rooms are generated from.")] [Tooltip("The tile that rooms are generated from.")]
public SpaceTile spaceTile; public SpaceTile spaceTile;
[BoxGroup("Theme")] [BoxGroup("Theme")]
[Tooltip("The environment that is placed around every generated room.")] [Tooltip("The environments that are placed around generated rooms.")]
public GameObject environment; public List<RoomEnvironment> environments;
[BoxGroup("Theme")] [BoxGroup("Theme")]
public DynamicColor puzzleColor, solvedColor, activeColor; public DynamicColor puzzleColor, solvedColor, activeColor;
@@ -43,6 +41,9 @@ namespace EscapeRoomEngine.Engine.Runtime
[BoxGroup("Doors")] [Required] [BoxGroup("Doors")] [Required]
public DoorModuleDescription spawnDoor; public DoorModuleDescription spawnDoor;
[BoxGroup("Doors")] [Required]
public DoorModuleDescription introExitDoor;
[BoxGroup("Doors")] [ValidateInput("IsNotEmpty", "At least one exit door type is required.")] [BoxGroup("Doors")] [ValidateInput("IsNotEmpty", "At least one exit door type is required.")]
[Tooltip("The types of exit doors this theme provides. Entrance doors are connected to the exit doors and don't need to be specified here.")] [Tooltip("The types of exit doors this theme provides. Entrance doors are connected to the exit doors and don't need to be specified here.")]
public List<DoorModuleDescription> exitDoorTypes; public List<DoorModuleDescription> exitDoorTypes;

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f07b7a9e0ae34430999958d61ecc7e2c
timeCreated: 1684146335

View File

@@ -0,0 +1,85 @@
using System;
using System.Collections;
using NaughtyAttributes;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Environment
{
[RequireComponent(typeof(AudioSource))]
public class AmbienceAudio : MonoBehaviour
{
public static AmbienceAudio Instance { get; private set; }
public float fadeDuration = 0.5f;
public AmbienceClip initialAmbience;
[BoxGroup("Internal")] [SerializeField] private AudioSource[] sources;
private AudioSource CurrentSource => sources[currentSource];
private AudioSource OtherSource => sources[(currentSource + 1) % 2];
private int currentSource;
private readonly Coroutine[] _activeFades = new Coroutine[2]; // the indices in these fades do not necessarily correspond to the sources
private void Awake()
{
Instance = this;
if (sources.Length != 2)
{
throw new Exception("There must be two sources.");
}
if (CurrentSource == OtherSource)
{
throw new Exception("Current source must be different from other source.");
}
foreach (var source in sources)
{
source.loop = true;
}
}
public void StartAmbience()
{
CrossFadeTo(initialAmbience);
}
public void CrossFadeTo(AmbienceClip ambience)
{
// prepare fade source
var fadeSource = OtherSource;
fadeSource.clip = ambience.audio;
fadeSource.Play();
// stop any running fades
foreach (var fade in _activeFades)
{
if (fade != null)
{
StopCoroutine(fade);
}
}
// start new fades
_activeFades[0] = StartCoroutine(Fade(CurrentSource, CurrentSource.volume, 0));
_activeFades[1] = StartCoroutine(Fade(fadeSource, fadeSource.volume, ambience.volume));
// switch current source
currentSource = (currentSource + 1) % 2;
}
private IEnumerator Fade(AudioSource source, float from, float to)
{
var startTime = Time.time;
while (Math.Abs(source.volume - to) > 0.0001f)
{
source.volume = Mathf.Clamp01(Mathf.Lerp(
from,
to,
(Time.time - startTime) / fadeDuration));
yield return null;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: affaa904605c46dca7162e99fd363b5a
timeCreated: 1684143627

View File

@@ -0,0 +1,12 @@
using NaughtyAttributes;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Environment
{
[CreateAssetMenu(menuName = "Environment/Ambience Clip")]
public class AmbienceClip : ScriptableObject
{
[Required] public AudioClip audio;
public float volume = 1;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3d36d46846cd41019647bae00e4b0f17
timeCreated: 1684145618

View File

@@ -0,0 +1,12 @@
using NaughtyAttributes;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Environment
{
[CreateAssetMenu(menuName = "Environment/Room", order = 0)]
public class RoomEnvironment : ScriptableObject
{
[Required] public AmbienceClip ambience;
[Required] public GameObject environment;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3b7d4fea984e4fff841ac107b6896270
timeCreated: 1684146291

View File

@@ -0,0 +1,25 @@
using EscapeRoomEngine.Engine.Runtime.Environment;
using NaughtyAttributes;
using UnityEngine;
using UnityEngine.Serialization;
namespace EscapeRoomEngine.Engine.Runtime
{
public class Intro : MonoBehaviour
{
public RoomEnvironment introEnvironment;
[FormerlySerializedAs("_sphereAudio")] [BoxGroup("Internal")] [SerializeField] private AudioSource sphereAudio;
public void Place(Transform placement)
{
var t = transform;
t.position = placement.position;
t.rotation = placement.rotation;
}
public void StartTalking()
{
sphereAudio.Play();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c2e3fc71dc4142888bad2313cbf1bea9
timeCreated: 1684011098

View File

@@ -0,0 +1,19 @@
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime
{
public class IntroSpace : Space
{
internal IntroSpace(Room room, Passage entrance) : base(room, entrance) {}
internal override void InstantiateSpace(Transform parent, string name)
{
spaceObject = new GameObject($"Space {name}");
spaceObject.transform.SetParent(parent, false);
spaceObject.transform.localPosition = new Vector3(rrPlacement.position.x, 0, rrPlacement.position.z);
// instantiate all modules inside this space
Modules.ForEach(module => module.InstantiateModule(spaceObject.transform));
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 84603b46fb8d4513945a113de3e6af72
timeCreated: 1684066247

View File

@@ -1,9 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.UI; using EscapeRoomEngine.Engine.Runtime.UI;
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Utilities;
using UnityEngine;
using Logger = EscapeRoomEngine.Engine.Runtime.Utilities.Logger; using Logger = EscapeRoomEngine.Engine.Runtime.Utilities.Logger;
using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType; using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType;
@@ -18,6 +17,8 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// Whether to store the taken measurements in the database. Disable for test runs. /// Whether to store the taken measurements in the database. Disable for test runs.
/// </summary> /// </summary>
public static bool Store { get; set; } public static bool Store { get; set; }
public static bool PreferLessPlayed => GameControl.Instance.preferLessPlayed.Value;
public static int PuzzlesSolved { get; private set; }
private static Dictionary<int, PuzzleMeasurement> _runningMeasurements; private static Dictionary<int, PuzzleMeasurement> _runningMeasurements;
private static Session _currentSession; private static Session _currentSession;
@@ -26,7 +27,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// The average time to solve a specific puzzle. /// The average time to solve a specific puzzle.
/// </summary> /// </summary>
public static float AverageTime(PuzzleModuleDescription puzzle) => public static float AverageTime(PuzzleModuleDescription puzzle) =>
PuzzleStorage.Instance.Load(puzzle).AverageTimeToSolve; PuzzleStorage.Instance.LoadOrNew(puzzle).AverageTimeToSolve;
/// <summary> /// <summary>
/// The average time to solve a group of puzzles. /// The average time to solve a group of puzzles.
/// </summary> /// </summary>
@@ -42,7 +43,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// Estimate the time a specific puzzle will take to be solved by the current player. /// Estimate the time a specific puzzle will take to be solved by the current player.
/// </summary> /// </summary>
public static float EstimateTime(PuzzleModuleDescription puzzle) => public static float EstimateTime(PuzzleModuleDescription puzzle) =>
PuzzleStorage.Instance.Load(puzzle).EstimateTimeToSolve(SessionPercentile()); PuzzleStorage.Instance.LoadOrNew(puzzle).EstimateTimeToSolve(SessionPercentile());
/// <summary> /// <summary>
/// Estimate the time a group of puzzles will take to be solved by the current player. /// Estimate the time a group of puzzles will take to be solved by the current player.
/// </summary> /// </summary>
@@ -54,6 +55,12 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
public static float EstimateTime(Room room) => public static float EstimateTime(Room room) =>
room.puzzles.Sum(puzzle => EstimateTime((PuzzleModuleDescription)puzzle.description)); room.puzzles.Sum(puzzle => EstimateTime((PuzzleModuleDescription)puzzle.description));
/// <summary>
/// How often a specific puzzle has been played before.
/// </summary>
public static int TimesPlayed(PuzzleModuleDescription puzzle) =>
PuzzleStorage.Instance.LoadOrNew(puzzle).Measurements.Count;
/// <summary> /// <summary>
/// The estimated percentile the current player is placed in. /// The estimated percentile the current player is placed in.
/// </summary> /// </summary>
@@ -66,8 +73,8 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
{ {
_runningMeasurements[puzzle.Id] = new PuzzleMeasurement _runningMeasurements[puzzle.Id] = new PuzzleMeasurement
{ {
TimeStarted = Time.time, TimeStarted = GameControl.Instance.TimeElapsed,
TimeSolved = Time.time TimeSolved = GameControl.Instance.TimeElapsed
}; };
Logger.Log($"Started measuring {puzzle}", LogType.Measuring); Logger.Log($"Started measuring {puzzle}", LogType.Measuring);
@@ -83,6 +90,10 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
throw new EngineException("Measuring session must be started before taking measurements."); throw new EngineException("Measuring session must be started before taking measurements.");
} }
if (!_runningMeasurements.ContainsKey(puzzle.Id))
{
return;
}
var measurement = _runningMeasurements[puzzle.Id]; var measurement = _runningMeasurements[puzzle.Id];
if (Store) if (Store)
@@ -90,6 +101,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
PuzzleStorage.Instance.EndMeasurement(_currentSession, puzzle, measurement); PuzzleStorage.Instance.EndMeasurement(_currentSession, puzzle, measurement);
} }
_runningMeasurements.Remove(puzzle.Id); _runningMeasurements.Remove(puzzle.Id);
PuzzlesSolved++;
Logger.Log($"Solved {puzzle} with measurement {measurement}", LogType.Measuring); Logger.Log($"Solved {puzzle} with measurement {measurement}", LogType.Measuring);
} }

View File

@@ -26,7 +26,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
public PlanResult(float targetTime, float sectionPercentile, float timeEstimation) public PlanResult(float targetTime, float sectionPercentile, float timeEstimation)
{ {
TargetTime = targetTime; TargetTime = targetTime;
SectionPercentile = sectionPercentile; SectionPercentile = float.IsNaN(sectionPercentile) ? 0.5f : sectionPercentile;
TimeEstimation = timeEstimation; TimeEstimation = timeEstimation;
} }
} }

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Utilities;
using JetBrains.Annotations; using JetBrains.Annotations;
using Realms; using Realms;

View File

@@ -1,4 +1,4 @@
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.UI; using EscapeRoomEngine.Engine.Runtime.UI;
using Realms; using Realms;
using UnityEngine; using UnityEngine;
@@ -88,7 +88,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// Create a new puzzle for a specific description and store it in the database. /// Create a new puzzle for a specific description and store it in the database.
/// </summary> /// </summary>
/// <remarks>This requires that the puzzle does not yet exist in the database.</remarks> /// <remarks>This requires that the puzzle does not yet exist in the database.</remarks>
private Puzzle New(PuzzleModuleDescription puzzle) public Puzzle New(PuzzleModuleDescription puzzle)
{ {
Puzzle created = null; Puzzle created = null;
@@ -100,7 +100,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
/// <summary> /// <summary>
/// Load a specific puzzle from the database or create it if it wasn't found. /// Load a specific puzzle from the database or create it if it wasn't found.
/// </summary> /// </summary>
private Puzzle LoadOrNew(PuzzleModuleDescription puzzle) => _realm.Find<Puzzle>(puzzle.Id) ?? New(puzzle); public Puzzle LoadOrNew(PuzzleModuleDescription puzzle) => _realm.Find<Puzzle>(puzzle.Id) ?? New(puzzle);
/// <summary> /// <summary>
/// Load a specific puzzle from the database. /// Load a specific puzzle from the database.
@@ -129,16 +129,17 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements
_realm.Write(() => _realm.Write(() =>
{ {
measurement.TimeSolved = Time.time; measurement.TimeSolved = GameControl.Instance.TimeElapsed;
found.Measurements.Add(measurement); found.Measurements.Add(measurement);
// add solved puzzle to session // add solved puzzle to session
session.PuzzlesSolved.Add(found); session.PuzzlesSolved.Add(found);
// add plan result to session // add plan result to session
var percentile = found.Distribution.Cumulative(measurement.Time);
session.PlanResults.Add(new PlanResult( session.PlanResults.Add(new PlanResult(
GameControl.Instance.TargetTime, GameControl.Instance.TargetTime,
found.Distribution.Cumulative(measurement.Time), percentile,
GameControl.Instance.EstimatedTime)); GameControl.Instance.EstimatedTime));
}); });
} }

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 748b8c37770b495bb52f2acb59ba5641
timeCreated: 1683591555

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules.Description
{ {
/// <summary> /// <summary>
/// The <see cref="ModuleDescription"/> for a <see cref="DoorModule"/>. Includes the description of the connected door. /// The <see cref="ModuleDescription"/> for a <see cref="DoorModule"/>. Includes the description of the connected door.

View File

@@ -1,9 +1,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
using EscapeRoomEngine.Engine.Runtime.Requirements; using EscapeRoomEngine.Engine.Runtime.Requirements;
using NaughtyAttributes; using NaughtyAttributes;
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules.Description
{ {
/// <summary> /// <summary>
/// The description of a specific module variant. Includes any requirements, the types and the module state that should be initialised with the module. /// The description of a specific module variant. Includes any requirements, the types and the module state that should be initialised with the module.

View File

@@ -1,7 +1,7 @@
using NaughtyAttributes; using NaughtyAttributes;
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules.Description
{ {
/// <summary> /// <summary>
/// The <see cref="ModuleDescription"/> for a <see cref="DoorModule"/>. Includes the description of the connected door. /// The <see cref="ModuleDescription"/> for a <see cref="DoorModule"/>. Includes the description of the connected door.

View File

@@ -1,4 +1,6 @@
using System; using System;
using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Utilities;
using UnityEngine; using UnityEngine;

View File

@@ -1,6 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
using EscapeRoomEngine.Engine.Runtime.Requirements; using EscapeRoomEngine.Engine.Runtime.Requirements;
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Utilities;
using UnityEngine; using UnityEngine;
@@ -83,7 +85,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
srPlacement = placement; srPlacement = placement;
Logger.Log($"{this} has been placed at {placement.position} (SR)", LogType.ModulePlacement); Logger.Log($"{this} has been placed at {placement.ToStringShort()} (SR)", LogType.ModulePlacement);
} }
/// <summary> /// <summary>
@@ -109,7 +111,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
Logger.Log($"Instantiating {this}", LogType.ModuleInstantiation); Logger.Log($"Instantiating {this}", LogType.ModuleInstantiation);
State = Object.Instantiate(description.modulePrefab, parent, false); State = Object.Instantiate(description.modulePrefab, parent, false);
State.transform.localPosition = new Vector3(SrPosition.x + .5f, 0, SrPosition.z + .5f); State.transform.localPosition = new Vector3(SrPosition.x + .5f, SrPosition.y, SrPosition.z + .5f);
State.transform.Rotate(Vector3.up, Orientation.Angle()); State.transform.Rotate(Vector3.up, Orientation.Angle());
State.name = ToString(); State.name = ToString();
State.SetModule(this); State.SetModule(this);

View File

@@ -1,4 +1,6 @@
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Modules.Description;
using EscapeRoomEngine.Engine.Runtime.Modules.State;
using EscapeRoomEngine.Engine.Runtime.Utilities;
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4cc6fbbfd1284b65841ac814a9936b9f
timeCreated: 1683591527

View File

@@ -1,7 +1,7 @@
using EscapeRoomEngine.Engine.Runtime.Utilities; using EscapeRoomEngine.Engine.Runtime.Utilities;
using NaughtyAttributes; using NaughtyAttributes;
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules.State
{ {
public enum DoorEventType public enum DoorEventType
{ {

View File

@@ -1,10 +1,11 @@
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules.State
{ {
/// <summary> /// <summary>
/// An abstract module state. Example implementations are <see cref="DoorState"/> and <see cref="PuzzleState"/>. /// An abstract module state. Example implementations are <see cref="DoorState"/> and <see cref="PuzzleState"/>.
/// </summary> /// </summary>
[SelectionBase]
public abstract class ModuleState : MonoBehaviour public abstract class ModuleState : MonoBehaviour
{ {
[Tooltip("The size of this module in meters.")] [Tooltip("The size of this module in meters.")]

View File

@@ -6,7 +6,7 @@ using UnityEngine;
using Logger = EscapeRoomEngine.Engine.Runtime.Utilities.Logger; using Logger = EscapeRoomEngine.Engine.Runtime.Utilities.Logger;
using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType; using LogType = EscapeRoomEngine.Engine.Runtime.Utilities.LogType;
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules.State
{ {
public enum PuzzleEventType public enum PuzzleEventType
{ {
@@ -32,9 +32,11 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
/// <summary> /// <summary>
/// The <see cref="ModuleState"/> of a <see cref="PuzzleModule"/>. Handles all events that can occur for a door. /// The <see cref="ModuleState"/> of a <see cref="PuzzleModule"/>. Handles all events that can occur for a door.
/// </summary> /// </summary>
[SelectionBase]
public class PuzzleState : ModuleState public class PuzzleState : ModuleState
{ {
[BoxGroup("Internal")]
public AudioSource solvedAudioSource;
/// <summary> /// <summary>
/// Add event handlers to this hook to receive all events concerning this puzzle. /// Add event handlers to this hook to receive all events concerning this puzzle.
/// </summary> /// </summary>
@@ -55,6 +57,11 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
: None<PuzzleEventType>.New(); : None<PuzzleEventType>.New();
_solved = value; _solved = value;
type.Match(some: OnPuzzleEvent); type.Match(some: OnPuzzleEvent);
if (type.Contains(PuzzleEventType.Solved))
{
solvedAudioSource.Play();
}
} }
} }

View File

@@ -1,4 +1,4 @@
namespace EscapeRoomEngine.Engine.Runtime.Modules namespace EscapeRoomEngine.Engine.Runtime.Modules.State
{ {
/// <summary> /// <summary>
/// The spawn door is used in the first room. /// The spawn door is used in the first room.

View File

@@ -1,18 +0,0 @@
using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules;
using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Requirements
{
/// <summary>
/// This requirement places a module exactly in the same position as its first related module.
/// </summary>
[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: 730542e39b51427399729e60f1405d5c
timeCreated: 1683591635

View File

@@ -1,8 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Modules;
using EscapeRoomEngine.Engine.Runtime.Utilities;
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Requirements namespace EscapeRoomEngine.Engine.Runtime.Requirements.Placement
{ {
/// <summary> /// <summary>
/// This requirement guarantees that the module faces the center of the space. /// This requirement guarantees that the module faces the center of the space.
@@ -10,7 +11,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
[CreateAssetMenu(menuName = "Requirements/Face Space Center")] [CreateAssetMenu(menuName = "Requirements/Face Space Center")]
public class FaceSpaceCenter : PlacementRequirement public class FaceSpaceCenter : PlacementRequirement
{ {
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space) protected override List<Utilities.Placement> FilterCandidates(List<Utilities.Placement> candidates, Module module, Space space)
{ {
float width = space.rrPlacement.size.x; float width = space.rrPlacement.size.x;
float length = space.rrPlacement.size.y; float length = space.rrPlacement.size.y;

View File

@@ -1,8 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Modules;
using EscapeRoomEngine.Engine.Runtime.Utilities;
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Requirements namespace EscapeRoomEngine.Engine.Runtime.Requirements.Placement
{ {
/// <summary> /// <summary>
/// This requirement forces a specific orientation. /// This requirement forces a specific orientation.
@@ -12,7 +13,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
{ {
public Orientation orientation; public Orientation orientation;
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space) protected override List<Utilities.Placement> FilterCandidates(List<Utilities.Placement> candidates, Module module, Space space)
{ {
candidates.RemoveAll(candidate => candidate.orientation != orientation); candidates.RemoveAll(candidate => candidate.orientation != orientation);

View File

@@ -2,7 +2,7 @@
using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Modules;
using UnityEngine; using UnityEngine;
namespace EscapeRoomEngine.Engine.Runtime.Requirements namespace EscapeRoomEngine.Engine.Runtime.Requirements.Placement
{ {
/// <summary> /// <summary>
/// This requirement prevents modules from overlapping. For two models not to overlap, both of them need this requirement. /// This requirement prevents modules from overlapping. For two models not to overlap, both of them need this requirement.
@@ -10,7 +10,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
[CreateAssetMenu(menuName = "Requirements/No Overlap")] [CreateAssetMenu(menuName = "Requirements/No Overlap")]
public class NoOverlap : PlacementRequirement public class NoOverlap : PlacementRequirement
{ {
protected override List<Placement> FilterCandidates(List<Placement> candidates, Module module, Space space) protected override List<Utilities.Placement> FilterCandidates(List<Utilities.Placement> candidates, Module module, Space space)
{ {
space.AllModules.ForEach(other => // for all other module ... space.AllModules.ForEach(other => // for all other module ...
other.srPlacement.ForEachPosition(otherPosition => // ... positions ... other.srPlacement.ForEachPosition(otherPosition => // ... positions ...

Some files were not shown because too many files have changed in this diff Show More