diff --git a/Assets/Engine/Assets/Prefabs/UI/Gamemaster Canvas.prefab b/Assets/Engine/Assets/Prefabs/UI/Gamemaster Canvas.prefab index da42ef3..4d32aa0 100644 --- a/Assets/Engine/Assets/Prefabs/UI/Gamemaster Canvas.prefab +++ b/Assets/Engine/Assets/Prefabs/UI/Gamemaster Canvas.prefab @@ -1,5 +1,65 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &2801345200061880593 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7578302057580157030} + - component: {fileID: 6766262628066891748} + m_Layer: 5 + m_Name: Puzzle Plan + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7578302057580157030 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2801345200061880593} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8009434559142878411} + - {fileID: 4003649744034896024} + - {fileID: 6274503117580424567} + - {fileID: 6774799649923343634} + m_Father: {fileID: 4522052738963994966} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 20, y: -205} + m_SizeDelta: {x: 320, y: 385} + m_Pivot: {x: 0, y: 1} +--- !u!114 &6766262628066891748 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2801345200061880593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad95894771b8478591e5f5abbe1d0244, type: 3} + m_Name: + m_EditorClassIdentifier: + entryOffset: {x: 0, y: -54} + plan: {fileID: 6774799649923343634} + currentPuzzle: {fileID: 2204590716513089870} + entryPrefab: {fileID: 286020777690709323, guid: cad05994b2fb37746988912bce5a31f5, + type: 3} + currentPuzzleTitle: {fileID: 8009434559142878412} + planTitle: {fileID: 6274503117580424560} --- !u!1 &3089832883842308742 GameObject: m_ObjectHideFlags: 0 @@ -47,7 +107,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 20, y: -10} - m_SizeDelta: {x: 110, y: 200} + m_SizeDelta: {x: 110, y: 189} m_Pivot: {x: 0, y: 1} --- !u!1 &3745094239397758703 GameObject: @@ -155,13 +215,15 @@ RectTransform: m_Children: - {fileID: 2787558276881847208} - {fileID: 3462504880841960080} + - {fileID: 2514376435689683197} + - {fileID: 6754372771656696047} m_Father: {fileID: 4522052738963994966} m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: -20, y: -10} - m_SizeDelta: {x: 110, y: 200} + m_SizeDelta: {x: 180, y: 200} m_Pivot: {x: 1, y: 1} --- !u!1 &4522052738963994969 GameObject: @@ -196,6 +258,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 7182894751559651105} + - {fileID: 7578302057580157030} - {fileID: 9062548758054197003} m_Father: {fileID: 0} m_RootOrder: 0 @@ -279,6 +342,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 676ef7e7d34646dbb24b1978563ab63b, type: 3} m_Name: m_EditorClassIdentifier: + uiUpdateInterval: 1 + planUpdateInterval: 1 startButton: {fileID: 4759128159024176925} stopButton: {fileID: 1891571209360683320} pauseButton: {fileID: 6434422615423022380} @@ -288,7 +353,8 @@ MonoBehaviour: roomTimeText: {fileID: 1606827657543776965} estimateTimeText: {fileID: 5237193151499999206} targetTimeText: {fileID: 7086005505455629096} - uiUpdateInterval: 1 + percentileText: {fileID: 6754372771656696046} + puzzlePlan: {fileID: 6766262628066891748} gameState: 0 --- !u!1 &5267753817356931382 GameObject: @@ -324,11 +390,11 @@ RectTransform: m_Father: {fileID: 3462504880841960080} m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -3} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -49, y: -3} m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0, y: 1} + m_Pivot: {x: 1, y: 1} --- !u!222 &8086160962991272604 CanvasRenderer: m_ObjectHideFlags: 0 @@ -404,7 +470,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: -34} - m_SizeDelta: {x: 110, y: 30} + m_SizeDelta: {x: 180, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &7511283043026536990 MonoBehaviour: @@ -467,6 +533,42 @@ MonoBehaviour: m_BoolArgument: 0 m_CallState: 2 m_IsOn: 1 +--- !u!1 &8812200079196013201 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6774799649923343634} + m_Layer: 5 + m_Name: Plan + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &6774799649923343634 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8812200079196013201} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7578302057580157030} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 320, y: 271} + m_Pivot: {x: 0.5, y: 0} --- !u!1001 &177056593356364422 PrefabInstance: m_ObjectHideFlags: 0 @@ -518,7 +620,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_SizeDelta.x - value: 110 + value: 180 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -585,6 +687,11 @@ PrefabInstance: propertyPath: m_Text value: Measurements objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_FontData.m_Alignment + value: 2 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -596,6 +703,140 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 177056593356364422} m_PrefabAsset: {fileID: 0} +--- !u!1001 &449992144505991635 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 9062548758054197003} + m_Modifications: + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Name + value: Percentile Label + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.x + value: 126 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -64 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Text + value: 'Mean Percentile:' + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} +--- !u!224 &2514376435689683197 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 449992144505991635} + m_PrefabAsset: {fileID: 0} --- !u!1001 &596244725760480134 PrefabInstance: m_ObjectHideFlags: 0 @@ -620,6 +861,11 @@ PrefabInstance: propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} + - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, + type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, type: 3} propertyPath: m_RootOrder @@ -648,7 +894,7 @@ PrefabInstance: - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, type: 3} propertyPath: m_AnchoredPosition.x - value: -30 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, type: 3} @@ -1032,7 +1278,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_Pivot.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1112,7 +1358,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_AnchoredPosition.x - value: -46 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1287,6 +1533,11 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Text + value: 'Time:' + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -1298,6 +1549,152 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 1881346252679449620} m_PrefabAsset: {fileID: 0} +--- !u!1001 &2116799517952066565 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 7578302057580157030} + m_Modifications: + - target: {fileID: 3093889143253032090, guid: cad05994b2fb37746988912bce5a31f5, + type: 3} + propertyPath: m_Name + value: Current Puzzle + objectReference: {fileID: 0} + - target: {fileID: 3093889143253032090, guid: cad05994b2fb37746988912bce5a31f5, + type: 3} + propertyPath: m_IsActive + value: 0 + 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: 54 + 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: -30 + 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: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: cad05994b2fb37746988912bce5a31f5, type: 3} +--- !u!114 &2204590716513089870 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 286020777690709323, guid: cad05994b2fb37746988912bce5a31f5, + type: 3} + m_PrefabInstance: {fileID: 2116799517952066565} + 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 &4003649744034896024 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3093889143253032093, guid: cad05994b2fb37746988912bce5a31f5, + type: 3} + m_PrefabInstance: {fileID: 2116799517952066565} + m_PrefabAsset: {fileID: 0} --- !u!1001 &2501054174014209494 PrefabInstance: m_ObjectHideFlags: 0 @@ -1314,7 +1711,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_Pivot.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1329,7 +1726,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_AnchorMax.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1339,7 +1736,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_AnchorMin.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1349,7 +1746,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_SizeDelta.x - value: 80 + value: 43 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1394,7 +1791,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_AnchoredPosition.x - value: 30 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1421,6 +1818,11 @@ PrefabInstance: propertyPath: m_Text value: Store objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_FontData.m_Alignment + value: 2 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -1448,7 +1850,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_Pivot.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1528,7 +1930,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_AnchoredPosition.x - value: -46 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -1792,7 +2194,7 @@ PrefabInstance: - target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5, type: 3} propertyPath: m_Pivot.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5, type: 3} @@ -1872,7 +2274,7 @@ PrefabInstance: - target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5, type: 3} propertyPath: m_AnchoredPosition.x - value: -50 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3635623840709501521, guid: c7b840466ebfae1468d75282ab9334f5, type: 3} @@ -1973,7 +2375,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_Pivot.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -2053,7 +2455,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_AnchoredPosition.x - value: -46 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -2134,6 +2536,11 @@ PrefabInstance: propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} + - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, type: 3} propertyPath: m_RootOrder @@ -2162,7 +2569,7 @@ PrefabInstance: - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, type: 3} propertyPath: m_AnchoredPosition.x - value: -15 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5840570772713645737, guid: a0d402627dc805e42ab9e84487b9871b, type: 3} @@ -2242,6 +2649,151 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 5426228225588893586} m_PrefabAsset: {fileID: 0} +--- !u!1001 &5475628624166606309 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 7578302057580157030} + m_Modifications: + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Name + value: Current Puzzle Title + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.x + value: 320 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Text + value: 'Current Puzzle:' + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} +--- !u!224 &8009434559142878411 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 5475628624166606309} + m_PrefabAsset: {fileID: 0} +--- !u!1 &8009434559142878412 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 5475628624166606309} + m_PrefabAsset: {fileID: 0} --- !u!1001 &5967568217610869408 PrefabInstance: m_ObjectHideFlags: 0 @@ -2392,7 +2944,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_Pivot.x - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -2472,7 +3024,7 @@ PrefabInstance: - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} propertyPath: m_AnchoredPosition.x - value: -46 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} @@ -2663,3 +3215,299 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 8073688616030330156} m_PrefabAsset: {fileID: 0} +--- !u!1001 &8343461623963180121 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 7578302057580157030} + m_Modifications: + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Name + value: Plan Title + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.x + value: 320 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -84 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Text + value: 'Planned Puzzles:' + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} +--- !u!1 &6274503117580424560 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 8343461623963180121} + m_PrefabAsset: {fileID: 0} +--- !u!224 &6274503117580424567 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 8343461623963180121} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &8747740128642894273 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 9062548758054197003} + m_Modifications: + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Name + value: Percentile + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.x + value: 54 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.y + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -64 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Text + value: 50.0 % + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_FontData.m_Alignment + value: 2 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} +--- !u!114 &6754372771656696046 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 8747740128642894273} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &6754372771656696047 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 8747740128642894273} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Engine/Assets/Prefabs/UI/Puzzle Plan Entry.prefab b/Assets/Engine/Assets/Prefabs/UI/Puzzle Plan Entry.prefab new file mode 100644 index 0000000..feb0259 --- /dev/null +++ b/Assets/Engine/Assets/Prefabs/UI/Puzzle Plan Entry.prefab @@ -0,0 +1,332 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &1023969388561388979 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Name + value: Puzzle Plan Entry + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.x + value: 320 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.y + value: 54 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Text + value: Puzzle name + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + insertIndex: -1 + addedObject: {fileID: 8821617704014446116} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + insertIndex: -1 + addedObject: {fileID: 286020777690709323} + m_SourcePrefab: {fileID: 100100000, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} +--- !u!1 &3093889143253032090 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 1023969388561388979} + m_PrefabAsset: {fileID: 0} +--- !u!114 &286020777690709323 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3093889143253032090} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ef80fc9016c4a46a190769f3b771bfa, type: 3} + m_Name: + m_EditorClassIdentifier: + puzzleName: {fileID: 3093889143253032092} + estimatedTime: {fileID: 8821617704014446117} +--- !u!114 &3093889143253032092 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 1023969388561388979} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3093889143253032090} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &3093889143253032093 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 1023969388561388979} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &6824857666461398794 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 3093889143253032093} + m_Modifications: + - target: {fileID: 2655555272253868329, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Name + value: Estimated Time + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.x + value: 320 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_SizeDelta.y + value: 24 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -30 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_Text + value: 'Time Estimate: ' + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_FontData.m_MinSize + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + propertyPath: m_FontData.m_FontSize + value: 16 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fa44f6047bc35a141a84d1b4e0919ff9, type: 3} +--- !u!224 &8821617704014446116 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2655555272253868334, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 6824857666461398794} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8821617704014446117 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 2655555272253868335, guid: fa44f6047bc35a141a84d1b4e0919ff9, + type: 3} + m_PrefabInstance: {fileID: 6824857666461398794} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Engine/Assets/Prefabs/UI/Puzzle Plan Entry.prefab.meta b/Assets/Engine/Assets/Prefabs/UI/Puzzle Plan Entry.prefab.meta new file mode 100644 index 0000000..f6246f6 --- /dev/null +++ b/Assets/Engine/Assets/Prefabs/UI/Puzzle Plan Entry.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cad05994b2fb37746988912bce5a31f5 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Engine/Assets/Prefabs/UI/Text.prefab b/Assets/Engine/Assets/Prefabs/UI/Text.prefab index cea2688..6dd72f2 100644 --- a/Assets/Engine/Assets/Prefabs/UI/Text.prefab +++ b/Assets/Engine/Assets/Prefabs/UI/Text.prefab @@ -79,4 +79,4 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: 'Time:' + m_Text: Text diff --git a/Assets/Engine/Runtime/Engine.cs b/Assets/Engine/Runtime/Engine.cs index 55a2beb..a4f5944 100644 --- a/Assets/Engine/Runtime/Engine.cs +++ b/Assets/Engine/Runtime/Engine.cs @@ -22,7 +22,7 @@ namespace EscapeRoomEngine.Engine.Runtime [InfoBox("If a space was generated without any puzzles in it, the engine will try generating another new space. To prevent infinite loops, the amount of retries is bound.")] public int maxSpaceGenerationTries = 1000; [Tooltip("The engine will try to generate a room that takes approximately this many seconds to complete.")] - public float initialTargetTime = 5 * 60; + public float initialTargetTime = 10 * 60; public Vector3 roomOffset = new(0, 1000, 0); [Required] public EngineTheme theme; @@ -83,7 +83,11 @@ namespace EscapeRoomEngine.Engine.Runtime var tries = 0; Space space; Passage exit = null; - var puzzle = PlanPuzzles(); + + // choose the next puzzle + // PlanPuzzles(); + var puzzle = ChoosePuzzle(); + GameControl.Instance.CurrentPuzzle = puzzle; do { @@ -119,21 +123,41 @@ namespace EscapeRoomEngine.Engine.Runtime room.AddSpace(space, exit); } - /// - /// Updates the list of puzzles planned for this run and returns the puzzle to put in the next room. - /// - private PuzzleModuleDescription PlanPuzzles() + private PuzzleModuleDescription ChoosePuzzle() { - - var nextPuzzle = _plannedPuzzles.PopRandomElement(); - - EstimatedTimeRemaining = Measure.AverageTime(_plannedPuzzles); - - return nextPuzzle; + // 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 = _plannedPuzzles.PopRandomElement(); + _availablePuzzles.Remove(puzzle); + return puzzle; } #endregion + /// + /// Updates the list of puzzles planned for this run. + /// + public void PlanPuzzles() + { + var n = _availablePuzzles.Count; + var estimates = new int[n]; + var indices = new Range(0, n).ToArray(); + var target = Mathf.RoundToInt(GameControl.Instance.TargetTime - GameControl.Instance.EstimatedTimeRoom); + _plannedPuzzles = new List(); + + for (var i = 0; i < n; i++) + { + estimates[i] = Mathf.RoundToInt(Measure.EstimateTime(_availablePuzzles[i])); + } + var chosen = Backtrack.Closest(indices, estimates, target); + foreach (var i in chosen) + { + _plannedPuzzles.Add(_availablePuzzles[i]); + } + + EstimatedTimeRemaining = Measure.EstimateTime(_plannedPuzzles); + GameControl.Instance.PlannedPuzzles = _plannedPuzzles; + } + public void HidePreviousRoom(bool destroy = true) { if (NumberOfRooms > 2) diff --git a/Assets/Engine/Runtime/Measurements/Measure.cs b/Assets/Engine/Runtime/Measurements/Measure.cs index 14f9855..3082520 100644 --- a/Assets/Engine/Runtime/Measurements/Measure.cs +++ b/Assets/Engine/Runtime/Measurements/Measure.cs @@ -18,13 +18,20 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements private static Dictionary _runningMeasurements; private static Session _currentSession; - public static float AverageTime(IEnumerable puzzles) => - puzzles.Sum(puzzle => PuzzleStorage.Instance.Load(puzzle).AverageTimeToSolve); public static float AverageTime(PuzzleModuleDescription puzzle) => PuzzleStorage.Instance.Load(puzzle).AverageTimeToSolve; + public static float AverageTime(IEnumerable puzzles) => puzzles.Sum(AverageTime); public static float AverageTime(Room room) => room.puzzles.Sum(puzzle => AverageTime((PuzzleModuleDescription)puzzle.description)); + public static float EstimateTime(PuzzleModuleDescription puzzle) => + PuzzleStorage.Instance.Load(puzzle).EstimateTimeToSolve(SessionPercentile()); + public static float EstimateTime(IEnumerable puzzles) => puzzles.Sum(EstimateTime); + public static float EstimateTime(Room room) => + room.puzzles.Sum(puzzle => EstimateTime((PuzzleModuleDescription)puzzle.description)); + + public static float SessionPercentile() => _currentSession?.MeanPercentile ?? 0.5f; + public static void StartMeasuring(PuzzleModuleDescription puzzle) { _runningMeasurements[puzzle.Id] = new PuzzleMeasurement diff --git a/Assets/Engine/Runtime/Measurements/Puzzle.cs b/Assets/Engine/Runtime/Measurements/Puzzle.cs index ddfc006..d9a2b3f 100644 --- a/Assets/Engine/Runtime/Measurements/Puzzle.cs +++ b/Assets/Engine/Runtime/Measurements/Puzzle.cs @@ -17,7 +17,8 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements public float TotalTimeSpentOnPuzzle => Measurements.Sum(measurement => measurement.Time); public float AverageTimeToSolve => Measurements.Count > 0 ? TotalTimeSpentOnPuzzle / Measurements.Count : 0f; - + public NormalDistribution Distribution => new(TimesAsSamples()); + [UsedImplicitly] public Puzzle() {} public Puzzle(PuzzleModuleDescription puzzle) @@ -25,6 +26,23 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements ID = puzzle.Id; } + /// + /// Estimate how long a player in the given percentile will take to solve this puzzle. + /// + public float EstimateTimeToSolve(float percentile) => Distribution.InverseCumulative(percentile); + + private float[] TimesAsSamples() + { + var samples = new float[Measurements.Count]; + + for (var i = 0; i < Measurements.Count; i++) + { + samples[i] = Measurements[i].Time; + } + + return samples; + } + public override string ToString() { return $"{Engine.Theme.GetPuzzle(ID)}: avg. {AverageTimeToSolve.ToTimeSpan():m':'ss} ({string.Join(", ", Measurements)})"; diff --git a/Assets/Engine/Runtime/Measurements/PuzzleStorage.cs b/Assets/Engine/Runtime/Measurements/PuzzleStorage.cs index 094844a..590bfed 100644 --- a/Assets/Engine/Runtime/Measurements/PuzzleStorage.cs +++ b/Assets/Engine/Runtime/Measurements/PuzzleStorage.cs @@ -8,6 +8,8 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements { public class PuzzleStorage : MonoBehaviour { + private const int SchemaVersion = 1; + public static PuzzleStorage Instance { get; private set; } [SerializeField] @@ -17,7 +19,20 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements private void OnEnable() { - _realm = Realm.GetInstance(databasePath); + var config = new RealmConfiguration + { + SchemaVersion = SchemaVersion, + MigrationCallback = (migration, oldSchemaVersion) => + { + if (oldSchemaVersion < 1) + { + // migration from version 0 to 1 + } + + Logger.Log($"Migrated database to version {SchemaVersion}", LogType.Measuring); + } + }; + _realm = Realm.GetInstance(config.ConfigWithPath(databasePath)); } private void Awake() @@ -41,10 +56,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements { session.Time = time; - _realm.Write(() => - { - _realm.Add(session); - }); + _realm.Write(() => _realm.Add(session)); } #endregion @@ -84,6 +96,9 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements // add solved puzzle to session session.PuzzlesSolved.Add(found); + + // add time percentile to session + session.Percentiles.Add(found.Distribution.Cumulative(measurement.Time)); }); } diff --git a/Assets/Engine/Runtime/Measurements/Session.cs b/Assets/Engine/Runtime/Measurements/Session.cs index 487ab72..a532401 100644 --- a/Assets/Engine/Runtime/Measurements/Session.cs +++ b/Assets/Engine/Runtime/Measurements/Session.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; using EscapeRoomEngine.Engine.Runtime.Utilities; using JetBrains.Annotations; using MongoDB.Bson; @@ -13,8 +14,11 @@ namespace EscapeRoomEngine.Engine.Runtime.Measurements [PrimaryKey] public ObjectId ID { get; set; } public float Time { get; set; } + public IList Percentiles { get; } public IList PuzzlesSolved { get; } + public float MeanPercentile => Percentiles.Count == 0 ? .5f : Probability.Mean(Percentiles.ToArray()); + [UsedImplicitly] public Session() { diff --git a/Assets/Engine/Runtime/UI/GameControl.cs b/Assets/Engine/Runtime/UI/GameControl.cs index d91a76e..b9ae5d1 100644 --- a/Assets/Engine/Runtime/UI/GameControl.cs +++ b/Assets/Engine/Runtime/UI/GameControl.cs @@ -1,4 +1,6 @@ -using EscapeRoomEngine.Engine.Runtime.Measurements; +using System.Collections.Generic; +using EscapeRoomEngine.Engine.Runtime.Measurements; +using EscapeRoomEngine.Engine.Runtime.Modules; using EscapeRoomEngine.Engine.Runtime.Utilities; using NaughtyAttributes; using UnityEngine; @@ -15,20 +17,31 @@ namespace EscapeRoomEngine.Engine.Runtime.UI { public static GameControl Instance { get; private set; } + [SerializeField] + private float uiUpdateInterval = 1, planUpdateInterval = 1; [BoxGroup("Internal")] [SerializeField] private Button startButton, stopButton, pauseButton, addTimeButton, removeTimeButton; [BoxGroup("Internal")] [SerializeField] - private Text timeText, roomTimeText, estimateTimeText, targetTimeText; + private Text timeText, roomTimeText, estimateTimeText, targetTimeText, percentileText; [BoxGroup("Internal")] [SerializeField] - private float uiUpdateInterval = 1; + private PuzzlePlan puzzlePlan; [HideInInspector] public GameState gameState = GameState.Stopped; + public PuzzleModuleDescription CurrentPuzzle + { + set => puzzlePlan.CurrentPuzzle = value; + } + public List PlannedPuzzles + { + set => puzzlePlan.Puzzles = value; + } public float TimeElapsed { get; private set; } public float TimeInRoom { get; set; } public float TargetTime { get; private set; } + public float EstimatedTimeRoom { get; private set; } - private float _previousUIUpdate; + private float _previousUIUpdate, _previousPlanUpdate; private void Awake() { @@ -57,6 +70,15 @@ namespace EscapeRoomEngine.Engine.Runtime.UI _previousUIUpdate = Time.time; SetTimeText(); + UpdateStats(); + } + + // update plan + if (Time.time > _previousPlanUpdate + planUpdateInterval) + { + _previousPlanUpdate = Time.time; + + Engine.Instance.PlanPuzzles(); } // enable or disable buttons @@ -129,15 +151,21 @@ namespace EscapeRoomEngine.Engine.Runtime.UI Engine.Instance.CurrentRoom.Match(some: room => { - estimateTimeText.text = TimeToText( - TimeElapsed - TimeInRoom - + Mathf.Max(TimeInRoom, Measure.AverageTime(room)) - + Engine.Instance.EstimatedTimeRemaining); + EstimatedTimeRoom = + TimeElapsed - TimeInRoom + Mathf.Max(TimeInRoom, Measure.EstimateTime(room)); + estimateTimeText.text = TimeToText(EstimatedTimeRoom + Engine.Instance.EstimatedTimeRemaining); }); } + private void UpdateStats() + { + percentileText.text = PercentageToText(Measure.SessionPercentile()); + } + private static string TimeToText(float time) => $"{time.ToTimeSpan():mm':'ss}"; + private static string PercentageToText(float percentage) => $"{percentage:P1}"; + #endregion #region Measurements diff --git a/Assets/Engine/Runtime/UI/PuzzlePlan.cs b/Assets/Engine/Runtime/UI/PuzzlePlan.cs new file mode 100644 index 0000000..fe08b73 --- /dev/null +++ b/Assets/Engine/Runtime/UI/PuzzlePlan.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using EscapeRoomEngine.Engine.Runtime.Modules; +using NaughtyAttributes; +using UnityEngine; +using UnityEngine.UI; + +namespace EscapeRoomEngine.Engine.Runtime.UI +{ + public class PuzzlePlan : MonoBehaviour + { + [SerializeField] + private Vector2 entryOffset; + [BoxGroup("Internal")] [SerializeField] + private RectTransform plan; + [BoxGroup("Internal")] [SerializeField] + private PuzzlePlanEntry currentPuzzle, entryPrefab; + [BoxGroup("Internal")] [SerializeField] + private GameObject currentPuzzleTitle, planTitle; + + public PuzzleModuleDescription CurrentPuzzle + { + set + { + currentPuzzleTitle.SetActive(true); + currentPuzzle.gameObject.SetActive(true); + + // set the current puzzle + currentPuzzle.Puzzle = value; + } + } + public List Puzzles + { + set + { + planTitle.SetActive(true); + plan.gameObject.SetActive(true); + + // remove the old children + foreach (RectTransform child in plan) + { + Destroy(child.gameObject); + } + + // add the new children + var offset = Vector2.zero; + value.ForEach(puzzle => + { + var entry = Instantiate(entryPrefab, plan, false); + entry.Position = offset; + entry.Puzzle = puzzle; + offset += entryOffset; + }); + } + } + } +} \ No newline at end of file diff --git a/Assets/Engine/Runtime/UI/PuzzlePlan.cs.meta b/Assets/Engine/Runtime/UI/PuzzlePlan.cs.meta new file mode 100644 index 0000000..ad34f02 --- /dev/null +++ b/Assets/Engine/Runtime/UI/PuzzlePlan.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ad95894771b8478591e5f5abbe1d0244 +timeCreated: 1671133031 \ No newline at end of file diff --git a/Assets/Engine/Runtime/UI/PuzzlePlanEntry.cs b/Assets/Engine/Runtime/UI/PuzzlePlanEntry.cs new file mode 100644 index 0000000..5b20314 --- /dev/null +++ b/Assets/Engine/Runtime/UI/PuzzlePlanEntry.cs @@ -0,0 +1,32 @@ +using System; +using EscapeRoomEngine.Engine.Runtime.Measurements; +using EscapeRoomEngine.Engine.Runtime.Modules; +using EscapeRoomEngine.Engine.Runtime.Utilities; +using NaughtyAttributes; +using UnityEngine; +using UnityEngine.UI; + +namespace EscapeRoomEngine.Engine.Runtime.UI +{ + public class PuzzlePlanEntry : MonoBehaviour + { + [BoxGroup("Internal")] [Required] [SerializeField] + private Text puzzleName, estimatedTime; + + public Vector2 Position + { + set + { + puzzleName.rectTransform.anchoredPosition = value; + } + } + public PuzzleModuleDescription Puzzle + { + set + { + puzzleName.text = value.puzzleName; + estimatedTime.text = $"Time Estimate: {Measure.EstimateTime(value).ToTimeSpan():mm':'ss}"; + } + } + } +} \ No newline at end of file diff --git a/Assets/Engine/Runtime/UI/PuzzlePlanEntry.cs.meta b/Assets/Engine/Runtime/UI/PuzzlePlanEntry.cs.meta new file mode 100644 index 0000000..ab204eb --- /dev/null +++ b/Assets/Engine/Runtime/UI/PuzzlePlanEntry.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8ef80fc9016c4a46a190769f3b771bfa +timeCreated: 1671136597 \ No newline at end of file diff --git a/Assets/Engine/Runtime/Utilities/Backtrack.cs b/Assets/Engine/Runtime/Utilities/Backtrack.cs new file mode 100644 index 0000000..d2d4c47 --- /dev/null +++ b/Assets/Engine/Runtime/Utilities/Backtrack.cs @@ -0,0 +1,127 @@ +using System; + +// ReSharper disable ReturnTypeCanBeEnumerable.Global +// ReSharper disable ParameterTypeCanBeEnumerable.Local + +namespace EscapeRoomEngine.Engine.Runtime.Utilities +{ + public struct Backtrack + { + private int[] indices; + private int[] values; + private int target; + + public Backtrack(int[] indices, int[] values, int target) + { + this.indices = indices; + this.values = values; + this.target = target; + } + + /// + /// Find any number of elements from the given set of indices and values with the maximum sum that doesn't exceed the target sum. + /// + /// This function uses a backtracking approach to find the sum. + public int[] BruteForceLower(int[] chosen = null, int pos = 0) + { + chosen ??= Array.Empty(); + + if (Sum(chosen) > target) + { + // if the sum of the chosen values exceeds the target, return nothing + return Array.Empty(); + } + if (pos >= indices.Length) + { + // if we cannot add any more elements, return all chosen + return chosen; + } + + // find the best indices when skipping the one at the current position + var leave = BruteForceLower(chosen, pos + 1); + // find the best indices when including the one at the current position + var next = new int[chosen.Length + 1]; + for (var i = 0; i < chosen.Length; i++) + { + next[i] = chosen[i]; + } + next[^1] = indices[pos]; + var pick = BruteForceLower(next, pos + 1); + + // return the best result + return Sum(leave) > Sum(pick) ? leave : pick; + } + + /// + /// Find any number of elements from the given set of indices and values with the minimum sum that is higher than the target sum. + /// + /// This function uses a backtracking approach to find the sum. + public int[] BruteForceHigher(int[] chosen = null, int pos = int.MaxValue) + { + chosen ??= indices; + if (pos == int.MaxValue) + { + pos = indices.Length - 1; + } + + if (Sum(chosen) < target) + { + // if the sum of the chosen values is lower than the target, return all indices (the maximum choice) + return indices; + } + if (pos < 0) + { + // if we cannot remove any more elements, return all chosen + return chosen; + } + + // find the best indices when not removing the one at the current position + var leave = BruteForceHigher(chosen, pos - 1); + // find the best indices when removing the one at the current position + var next = new int[chosen.Length - 1]; + for (var i = 0; i < chosen.Length; i++) + { + if (i < pos) + { + next[i] = chosen[i]; + } else if (i > pos) + { + next[i - 1] = chosen[i]; + } + } + var pick = BruteForceHigher(next, pos - 1); + + // return the best result + return Sum(leave) < Sum(pick) ? leave : pick; + } + + public int[] BruteForce() + { + var lower = BruteForceLower(); + var higher = BruteForceHigher(); + var errLower = Math.Abs(target - Sum(lower)); + var errHigher = Math.Abs(target - Sum(higher)); + + return errLower < errHigher ? lower : higher; + } + + /// + /// Get a subset of indices where the sum of their corresponding values is closest to a target sum. + /// + public static int[] Closest(int[] indices, int[] values, int target) => + new Backtrack(indices, values, target).BruteForce(); + + private int Sum(int[] chosen) + { + var sum = 0; + + // ReSharper disable once LoopCanBeConvertedToQuery + foreach (var i in chosen) + { + sum += values[i]; + } + + return sum; + } + } +} \ No newline at end of file diff --git a/Assets/Engine/Runtime/Utilities/Backtrack.cs.meta b/Assets/Engine/Runtime/Utilities/Backtrack.cs.meta new file mode 100644 index 0000000..2257dc8 --- /dev/null +++ b/Assets/Engine/Runtime/Utilities/Backtrack.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 313a79a04104480f931206ff7f57d0c5 +timeCreated: 1671126182 \ No newline at end of file diff --git a/Assets/Engine/Runtime/Utilities/Probability.cs b/Assets/Engine/Runtime/Utilities/Probability.cs index 14a6e09..043b593 100644 --- a/Assets/Engine/Runtime/Utilities/Probability.cs +++ b/Assets/Engine/Runtime/Utilities/Probability.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using MathNet.Numerics.Distributions; +using UnityEngine; using Random = System.Random; namespace EscapeRoomEngine.Engine.Runtime.Utilities @@ -8,19 +9,21 @@ namespace EscapeRoomEngine.Engine.Runtime.Utilities [Serializable] public struct NormalDistribution { - public double mean, σ; + public float μ, σ; - public static NormalDistribution Standard => new NormalDistribution { mean = 0, σ = 1 }; + public static NormalDistribution Standard => new NormalDistribution { μ = 0, σ = 1 }; - public NormalDistribution(double[] samples) : this() + public NormalDistribution(float[] samples) : this() { - mean = Probability.Mean(samples); - σ = Probability.StandardDeviation(samples, mean); + μ = Probability.Mean(samples); + σ = Probability.StandardDeviation(samples, μ); } - public double Sample() => σ * Probability.Normal() + mean; + public float Sample() => σ * Probability.Normal() + μ; - public double Cumulative(double x) => new Normal(mean, σ).CumulativeDistribution(x); + public float Cumulative(float x) => (float)new Normal(μ, σ).CumulativeDistribution(x); + + public float InverseCumulative(float x) => (float)new Normal(μ, σ).InverseCumulativeDistribution(x); } public static class Probability @@ -32,22 +35,22 @@ namespace EscapeRoomEngine.Engine.Runtime.Utilities /// For simplicity, the result is clamped between -3 and 3. This is accurate for 99.7% of all samples, by the three-σ rule. /// /// The calculation of the random variable is done by a Box-Muller transform. - public static double Normal() + public static float Normal() { - double u1, u2, square; + float u1, u2, square; // get two random points inside the unit circle do { - u1 = 2 * _random.NextDouble() - 1; - u2 = 2 * _random.NextDouble() - 1; + u1 = 2 * (float)_random.NextDouble() - 1; + u2 = 2 * (float)_random.NextDouble() - 1; square = u1 * u1 + u2 * u2; } while (square >= 1f); - return u1 * Math.Sqrt(-2 * Math.Log(square) / square); + return u1 * Mathf.Sqrt(-2 * Mathf.Log(square) / square); } - public static double Mean(double[] samples) + public static float Mean(float[] samples) { if (samples.Length == 0) { @@ -57,10 +60,10 @@ namespace EscapeRoomEngine.Engine.Runtime.Utilities return samples.Sum() / samples.Length; } - public static double StandardDeviation(double[] samples) => StandardDeviation(samples, Mean(samples)); - public static double StandardDeviation(double[] samples, double mean) + public static float StandardDeviation(float[] samples) => StandardDeviation(samples, Mean(samples)); + public static float StandardDeviation(float[] samples, float mean) { - var deviations = new double[samples.Length]; + var deviations = new float[samples.Length]; for (var i = 0; i < samples.Length; i++) { @@ -68,7 +71,7 @@ namespace EscapeRoomEngine.Engine.Runtime.Utilities deviations[i] = d * d; } - return Math.Sqrt(Mean(deviations)); + return Mathf.Sqrt(Mean(deviations)); } } } \ No newline at end of file diff --git a/Assets/Engine/Runtime/Utilities/Range.cs b/Assets/Engine/Runtime/Utilities/Range.cs index 0798f4c..d36a74f 100644 --- a/Assets/Engine/Runtime/Utilities/Range.cs +++ b/Assets/Engine/Runtime/Utilities/Range.cs @@ -12,6 +12,19 @@ this.max = max; } + public int[] ToArray(bool includeMax = false) + { + var count = includeMax ? Length + 1 : Length; + var array = new int[count]; + + for (var i = 0; i < count; i++) + { + array[i] = min + i; + } + + return array; + } + public override string ToString() => $"{{{min}, ..., {max}}}"; } } \ No newline at end of file diff --git a/Assets/Engine/Runtime/Utilities/Utilities.cs b/Assets/Engine/Runtime/Utilities/Utilities.cs index f7e7b8c..11a5943 100644 --- a/Assets/Engine/Runtime/Utilities/Utilities.cs +++ b/Assets/Engine/Runtime/Utilities/Utilities.cs @@ -25,8 +25,14 @@ namespace EscapeRoomEngine.Engine.Runtime.Utilities public static int RandomInclusive(int from, int to) => Random.Range(from, to + 1); - public static T RandomElement(this List list) => list[Random.Range(0, list.Count)]; + #endregion + } + public static class ListExtensions + { + /// + /// remove a random element from a list and return it. + /// public static T PopRandomElement(this List list) { var index = Random.Range(0, list.Count); @@ -35,7 +41,20 @@ namespace EscapeRoomEngine.Engine.Runtime.Utilities return element; } - #endregion + public static T RandomElement(this List list) => list[Random.Range(0, list.Count)]; + + /// + /// Perform a Fisher-Yates shuffle on a given list, leaving it in a random order. + /// + public static void Shuffle(this List list) + { + for (var n = list.Count - 1; n > 0; n--) + { + var i = Utilities.RandomInclusive(0, n); + var j = Utilities.RandomInclusive(0, n); + (list[i], list[j]) = (list[j], list[i]); + } + } } public static class Vector2IntExtensions diff --git a/Assets/NuGet.config.meta b/Assets/NuGet.config.meta index c5da09f..40952af 100644 --- a/Assets/NuGet.config.meta +++ b/Assets/NuGet.config.meta @@ -25,7 +25,7 @@ PluginImporter: - first: Windows Store Apps: WindowsStoreApps second: - enabled: 1 + enabled: 0 settings: {} userData: assetBundleName: diff --git a/Assets/Scenes/TestScene.unity b/Assets/Scenes/TestScene.unity index e136414..bc13952 100644 --- a/Assets/Scenes/TestScene.unity +++ b/Assets/Scenes/TestScene.unity @@ -547,6 +547,7 @@ GameObject: - component: {fileID: 1568048334} - component: {fileID: 1568048339} - component: {fileID: 1568048336} + - component: {fileID: 1568048340} m_Layer: 0 m_Name: Engine m_TagString: Untagged @@ -567,7 +568,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: maxSpaceGenerationTries: 1000 - initialTargetTime: 300 + initialTargetTime: 600 roomOffset: {x: 0, y: 1000, z: 0} theme: {fileID: 11400000, guid: 568d9a7d70f3edb4cb6db66a0010f105, type: 2} --- !u!4 &1568048335 @@ -598,7 +599,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: loggingEnabled: 1 - typeFilter: 00000000 + typeFilter: 0000000009000000 --- !u!114 &1568048339 MonoBehaviour: m_ObjectHideFlags: 0 @@ -612,3 +613,17 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: databasePath: measurements.realm +--- !u!114 &1568048340 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1568048333} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 599a288d4210437698dc391e5cc84a8a, type: 3} + m_Name: + m_EditorClassIdentifier: + values: a3000000110100007c0000002801000029000000 + target: 600 diff --git a/Assets/Test Assets/BacktrackingTest.cs b/Assets/Test Assets/BacktrackingTest.cs new file mode 100644 index 0000000..fda089c --- /dev/null +++ b/Assets/Test Assets/BacktrackingTest.cs @@ -0,0 +1,47 @@ +using EscapeRoomEngine.Engine.Runtime.Utilities; +using JetBrains.Annotations; +using NaughtyAttributes; +using UnityEngine; + +namespace Test_Assets +{ + public class BacktrackingTest : MonoBehaviour + { + public int[] values; + public int target; + + [Button] + [UsedImplicitly] + public void Closest() + { + PrintResult(Backtrack.Closest(new Range(0, values.Length).ToArray(), values, target)); + } + + [Button] + [UsedImplicitly] + public void ClosestLower() + { + var backtrack = new Backtrack(new Range(0, values.Length).ToArray(), values, target); + PrintResult(backtrack.BruteForceLower()); + } + + [Button] + [UsedImplicitly] + public void ClosestHigher() + { + var backtrack = new Backtrack(new Range(0, values.Length).ToArray(), values, target); + PrintResult(backtrack.BruteForceHigher()); + } + + private void PrintResult(int[] indices) + { + var sum = 0; + foreach (var i in indices) + { + Debug.Log(values[i]); + sum += values[i]; + } + Debug.Log($"sum: {sum}"); + } + } +} \ No newline at end of file diff --git a/Assets/Test Assets/BacktrackingTest.cs.meta b/Assets/Test Assets/BacktrackingTest.cs.meta new file mode 100644 index 0000000..9edd07d --- /dev/null +++ b/Assets/Test Assets/BacktrackingTest.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 599a288d4210437698dc391e5cc84a8a +timeCreated: 1671127266 \ No newline at end of file diff --git a/Assets/Test Assets/ProbabilityTest.cs b/Assets/Test Assets/ProbabilityTest.cs index 77b87de..22747f7 100644 --- a/Assets/Test Assets/ProbabilityTest.cs +++ b/Assets/Test Assets/ProbabilityTest.cs @@ -1,6 +1,5 @@ using EscapeRoomEngine.Engine.Runtime.Utilities; using JetBrains.Annotations; -using MathNet.Numerics.Distributions; using NaughtyAttributes; using UnityEngine; @@ -11,7 +10,8 @@ namespace Test_Assets public NormalDistribution distribution = NormalDistribution.Standard; public int steps = 24; public int n = 1000000; - public double sample; + public float sample; + public float percentile = 0.5f; [Button] [UsedImplicitly] @@ -62,9 +62,16 @@ namespace Test_Assets Debug.Log(distribution.Cumulative(sample)); } - private double[] Samples() + [Button] + [UsedImplicitly] + public void InversePercentile() { - var samples = new double[n]; + Debug.Log(distribution.InverseCumulative(percentile)); + } + + private float[] Samples() + { + var samples = new float[n]; for (var i = 0; i < n; i++) { samples[i] = distribution.Sample();