diff --git a/Assets/Overcooked/Overcooked.unity b/Assets/Overcooked/Overcooked.unity index 6f2cc6d..681ce64 100644 --- a/Assets/Overcooked/Overcooked.unity +++ b/Assets/Overcooked/Overcooked.unity @@ -43,7 +43,7 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 @@ -96,8 +96,10 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaAO: 1 m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 4890085278179872738, guid: 3e319786d342ce240933c02e69a29b2d, + type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -117,6 +119,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -195,6 +199,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -219,6 +225,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &24636369 MeshFilter: m_ObjectHideFlags: 0 @@ -227,97 +234,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 24636364} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &116804720 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 116804722} - - component: {fileID: 116804721} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &116804721 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 116804720} - m_Enabled: 1 - serializedVersion: 9 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &116804722 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 116804720} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 4.37, y: 25.88, z: -19.64} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &168813907 GameObject: m_ObjectHideFlags: 0 @@ -379,6 +295,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -403,6 +321,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &168813911 MeshFilter: m_ObjectHideFlags: 0 @@ -425,6 +344,7 @@ MonoBehaviour: m_EditorClassIdentifier: onUpper: 1 onLower: 0 + isPassable: 0 --- !u!1 &177361184 GameObject: m_ObjectHideFlags: 0 @@ -472,6 +392,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -496,6 +418,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &177361187 MeshFilter: m_ObjectHideFlags: 0 @@ -580,6 +503,7 @@ MonoBehaviour: m_EditorClassIdentifier: onUpper: 1 onLower: 0 + isPassable: 0 --- !u!65 &284864642 BoxCollider: m_ObjectHideFlags: 0 @@ -607,6 +531,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -631,6 +557,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &284864644 MeshFilter: m_ObjectHideFlags: 0 @@ -686,6 +613,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -710,6 +639,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &369869938 MeshFilter: m_ObjectHideFlags: 0 @@ -746,89 +676,6 @@ MonoBehaviour: m_EditorClassIdentifier: ambientSound: {fileID: 8300000, guid: 6a469f017b77617418fa3e10a8143896, type: 3} successSound: {fileID: 8300000, guid: 609122a13e140764db1017d89e977e27, type: 3} ---- !u!1 &458973149 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 458973152} - - component: {fileID: 458973151} - - component: {fileID: 458973150} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &458973150 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 458973149} - m_Enabled: 1 ---- !u!20 &458973151 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 458973149} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 1 - orthographic size: 12 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &458973152 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 458973149} - m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 50, z: -8.3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!1 &714198826 GameObject: m_ObjectHideFlags: 0 @@ -890,6 +737,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -914,6 +763,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &714198830 MeshFilter: m_ObjectHideFlags: 0 @@ -936,6 +786,7 @@ MonoBehaviour: m_EditorClassIdentifier: onUpper: 1 onLower: 0 + isPassable: 0 --- !u!1 &770465923 GameObject: m_ObjectHideFlags: 0 @@ -983,6 +834,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1007,6 +860,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &770465926 MeshFilter: m_ObjectHideFlags: 0 @@ -1104,6 +958,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1128,6 +984,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &828892193 MeshFilter: m_ObjectHideFlags: 0 @@ -1150,6 +1007,7 @@ MonoBehaviour: m_EditorClassIdentifier: onUpper: 1 onLower: 0 + isPassable: 0 --- !u!1 &1219586480 GameObject: m_ObjectHideFlags: 0 @@ -1197,6 +1055,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1221,6 +1081,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1219586483 MeshFilter: m_ObjectHideFlags: 0 @@ -1264,6 +1125,11 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 826605487606422808, guid: f08d327e9fb42f94d97ba9d1d226d418, + type: 3} + propertyPath: debug + value: 1 + objectReference: {fileID: 0} - target: {fileID: 826605487606422809, guid: f08d327e9fb42f94d97ba9d1d226d418, type: 3} propertyPath: m_Name @@ -1307,7 +1173,7 @@ PrefabInstance: - target: {fileID: 826605487606422813, guid: f08d327e9fb42f94d97ba9d1d226d418, type: 3} propertyPath: m_RootOrder - value: 2 + value: 0 objectReference: {fileID: 0} - target: {fileID: 826605487606422813, guid: f08d327e9fb42f94d97ba9d1d226d418, type: 3} @@ -1324,9 +1190,9 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 826605487606422808, guid: f08d327e9fb42f94d97ba9d1d226d418, + - target: {fileID: 3282298869498686265, guid: f08d327e9fb42f94d97ba9d1d226d418, type: 3} - propertyPath: debug + propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] @@ -1378,6 +1244,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1402,6 +1270,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1344591156 MeshFilter: m_ObjectHideFlags: 0 @@ -1422,7 +1291,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1344591158 MonoBehaviour: @@ -1470,7 +1339,7 @@ Transform: - {fileID: 24636365} - {fileID: 369869939} m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1529072994 GameObject: @@ -1519,6 +1388,8 @@ MeshRenderer: m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -1543,6 +1414,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1529072997 MeshFilter: m_ObjectHideFlags: 0 @@ -1624,7 +1496,7 @@ Transform: - {fileID: 168813908} - {fileID: 828892190} m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1932745500 GameObject: @@ -1678,7 +1550,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1932745504 MonoBehaviour: diff --git a/Assets/PantoScripts/Level.cs b/Assets/PantoScripts/Level.cs index 03c6245..86981be 100644 --- a/Assets/PantoScripts/Level.cs +++ b/Assets/PantoScripts/Level.cs @@ -62,5 +62,9 @@ async private Task IntroduceObject(ObjectOfInterest objectOfInterest, int msDela await Task.WhenAll(tasks); await Task.Delay(msDelay); } + void OnApplicationQuit() + { + speechOut.Stop(); + } } } diff --git a/Assets/PantoScripts/PantoHandle.cs b/Assets/PantoScripts/PantoHandle.cs index c7d2cdf..ed01a6e 100644 --- a/Assets/PantoScripts/PantoHandle.cs +++ b/Assets/PantoScripts/PantoHandle.cs @@ -92,7 +92,9 @@ public float GetRotation() { if (userControlledRotation) { - return rotation; + //return rotation; + GameObject debugObject = pantoSync.GetDebugObject(isUpper); + return debugObject.transform.eulerAngles.y; } else { @@ -214,6 +216,10 @@ public bool IsUserControlled() { return userControlledPosition; } + public bool IsRotationUserControlled() + { + return userControlledRotation; + } float MaxMovementSpeed() { @@ -225,34 +231,35 @@ public void Rotate(float rotation) pantoSync.UpdateHandlePosition(null, rotation, isUpper); } - public void SetPositions(Vector3 newPosition, float newRotation, Vector3? newGodObjectPosition) + public void SetPositions(Vector3 newPosition, float? newRotation, Vector3? newGodObjectPosition) { GameObject debugGodObject = pantoSync.GetDebugGodObject(isUpper); - if (pantoSync.debug && userControlledRotation) + if (pantoSync.debug && newRotation != null) { + Debug.Log("setting rotation"); GameObject debugObject = pantoSync.GetDebugObject(isUpper); - debugObject.transform.eulerAngles = new Vector3(debugObject.transform.eulerAngles.x, newRotation, debugObject.transform.eulerAngles.z); + debugObject.transform.eulerAngles = new Vector3(debugObject.transform.eulerAngles.x, (float)newRotation, debugObject.transform.eulerAngles.z); } if (pantoSync.debug)// && userControlledPosition) { GameObject debugObject = pantoSync.GetDebugObject(isUpper); - debugObject.transform.position = position; - debugGodObject.transform.position = position; + debugObject.transform.position = newPosition; + debugGodObject.transform.position = newPosition; debugGodObject.transform.eulerAngles = new Vector3(debugGodObject.transform.eulerAngles.x, newRotation, debugGodObject.transform.eulerAngles.z); } if (!pantoSync.debug) { GameObject debugObject = pantoSync.GetDebugObject(isUpper); - debugObject.transform.eulerAngles = new Vector3(debugObject.transform.eulerAngles.x, newRotation, debugObject.transform.eulerAngles.z); + debugObject.transform.eulerAngles = new Vector3(debugObject.transform.eulerAngles.x, (float)newRotation, debugObject.transform.eulerAngles.z); debugObject.transform.position = position; if (newGodObjectPosition != null) { debugGodObject.transform.position = newGodObjectPosition.Value; - debugGodObject.transform.eulerAngles = new Vector3(debugGodObject.transform.eulerAngles.x, newRotation, debugGodObject.transform.eulerAngles.z); + debugGodObject.transform.eulerAngles = new Vector3(debugGodObject.transform.eulerAngles.x, (float)newRotation, debugGodObject.transform.eulerAngles.z); } } position = newPosition; - rotation = newRotation; + if (newRotation != null) rotation = (float)newRotation; godObjectPosition = newGodObjectPosition; } @@ -272,9 +279,6 @@ async public Task TraceObjectByPoints(List cornerObjects, float spee protected void FixedUpdate() { - if (pantoSync.debug) - { - } if (pantoSync.debug && handledGameObject != null) { if (Vector3.Distance(handledGameObject.transform.position, position) < 0.1f) @@ -284,8 +288,9 @@ protected void FixedUpdate() else { Vector3 goalPos = handledGameObject.transform.position; - //GetPantoSync().UpdateHandlePosition(position + (goalPos - position) * 0.1f, handledGameObject.transform.eulerAngles.y, isUpper); - SetPositions(position + (goalPos - position) * 0.05f, handledGameObject.transform.eulerAngles.y, null); + float? newRot = null; + if (!userControlledRotation) newRot = handledGameObject.transform.eulerAngles.y; + SetPositions(position + (goalPos - position) * 0.05f, newRot, null); } } else if (handledGameObject != null && !inTransition && !isFrozen)// reached gameobject initially