From 0e9aa8e83b2c2dff5b71882070e9686f84b046c7 Mon Sep 17 00:00:00 2001 From: Prown0 <100746335+Prown0@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:06:41 +0900 Subject: [PATCH] Implement pausing and resuming --- 302/Assets/Scenes/DefaultGameScene.unity | 530 ++++++++++++++++++++++- 302/Assets/Scripts/FireExtinguisher.cs | 2 +- 302/Assets/Scripts/InteractionManager.cs | 2 +- 302/Assets/Scripts/PauseManager.cs | 1 + 302/Assets/Scripts/PlayerManager.cs | 4 +- 5 files changed, 518 insertions(+), 21 deletions(-) diff --git a/302/Assets/Scenes/DefaultGameScene.unity b/302/Assets/Scenes/DefaultGameScene.unity index b89ea73..1cf3909 100644 --- a/302/Assets/Scenes/DefaultGameScene.unity +++ b/302/Assets/Scenes/DefaultGameScene.unity @@ -1558,6 +1558,141 @@ Transform: m_CorrespondingSourceObject: {fileID: 7236329420339151181, guid: 2ad42fc20dee64e4ca84470ffa3fb42e, type: 3} m_PrefabInstance: {fileID: 91193543} m_PrefabAsset: {fileID: 0} +--- !u!1 &109632269 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 109632270} + - component: {fileID: 109632272} + - component: {fileID: 109632271} + m_Layer: 5 + m_Name: Text (TMP) (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &109632270 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 109632269} + 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: 353055344} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -100} + m_SizeDelta: {x: 400, y: 125} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &109632271 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 109632269} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Hold ESC to exit. + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 50 + m_fontSizeBase: 50 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &109632272 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 109632269} + m_CullTransparentMesh: 1 --- !u!1001 &111153334 PrefabInstance: m_ObjectHideFlags: 0 @@ -2268,7 +2403,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &131868639 PrefabInstance: @@ -7851,7 +7986,7 @@ Transform: - {fileID: 686324238} - {fileID: 1675446299} m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &346510890 PrefabInstance: @@ -7983,6 +8118,141 @@ Transform: m_CorrespondingSourceObject: {fileID: 1809372938388778512, guid: 474138867ca9be144953fa0ca636b7c9, type: 3} m_PrefabInstance: {fileID: 346510890} m_PrefabAsset: {fileID: 0} +--- !u!1 &351231062 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 351231063} + - component: {fileID: 351231065} + - component: {fileID: 351231064} + m_Layer: 5 + m_Name: Text (TMP) (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &351231063 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 351231062} + 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: 353055344} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 25} + m_SizeDelta: {x: 400, y: 125} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &351231064 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 351231062} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Paused! + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 100 + m_fontSizeBase: 100 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &351231065 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 351231062} + m_CullTransparentMesh: 1 --- !u!1001 &353015812 PrefabInstance: m_ObjectHideFlags: 0 @@ -8049,6 +8319,110 @@ Transform: m_CorrespondingSourceObject: {fileID: 7236329420339151181, guid: 2ad42fc20dee64e4ca84470ffa3fb42e, type: 3} m_PrefabInstance: {fileID: 353015812} m_PrefabAsset: {fileID: 0} +--- !u!1 &353055340 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 353055344} + - component: {fileID: 353055343} + - component: {fileID: 353055342} + - component: {fileID: 353055341} + m_Layer: 5 + m_Name: PauseCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &353055341 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 353055340} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &353055342 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 353055340} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &353055343 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 353055340} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 10 + m_TargetDisplay: 0 +--- !u!224 &353055344 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 353055340} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 775173258} + - {fileID: 351231063} + - {fileID: 109632270} + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} --- !u!1001 &357145081 PrefabInstance: m_ObjectHideFlags: 0 @@ -8637,7 +9011,7 @@ Transform: - {fileID: 1140758988} - {fileID: 564947111} m_Father: {fileID: 0} - m_RootOrder: 13 + m_RootOrder: 15 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &409596541 PrefabInstance: @@ -9906,7 +10280,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 1157955353405416223, guid: 7c34e61c4c1b39040bc8b4a56d34f904, type: 3} propertyPath: m_RootOrder - value: 17 + value: 19 objectReference: {fileID: 0} - target: {fileID: 1157955353405416223, guid: 7c34e61c4c1b39040bc8b4a56d34f904, type: 3} propertyPath: m_LocalScale.x @@ -10148,7 +10522,7 @@ Transform: - {fileID: 1996899819} - {fileID: 728370163} m_Father: {fileID: 0} - m_RootOrder: 16 + m_RootOrder: 18 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &470489866 stripped GameObject: @@ -18065,6 +18439,82 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 770351070} m_PrefabAsset: {fileID: 0} +--- !u!1 &775173257 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 775173258} + - component: {fileID: 775173260} + - component: {fileID: 775173259} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &775173258 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 775173257} + 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: 353055344} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 500, y: 250} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &775173259 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 775173257} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &775173260 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 775173257} + m_CullTransparentMesh: 1 --- !u!1 &776868653 GameObject: m_ObjectHideFlags: 0 @@ -22258,7 +22708,7 @@ RectTransform: - {fileID: 924724806} - {fileID: 210424746} m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -23715,7 +24165,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1087920892 GameObject: @@ -26117,7 +26567,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1169446209 GameObject: @@ -26183,7 +26633,7 @@ Transform: m_Children: - {fileID: 592683971} m_Father: {fileID: 0} - m_RootOrder: 11 + m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!114 &1169446214 MonoBehaviour: @@ -33130,7 +33580,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8773584364483337333, guid: 4dbfb06eecc5e57499f6ea0d7a944a7d, type: 3} propertyPath: m_RootOrder - value: 12 + value: 14 objectReference: {fileID: 0} - target: {fileID: 8773584364483337333, guid: 4dbfb06eecc5e57499f6ea0d7a944a7d, type: 3} propertyPath: m_LocalPosition.x @@ -34981,7 +35431,7 @@ Transform: - {fileID: 776868654} - {fileID: 746649503} m_Father: {fileID: 0} - m_RootOrder: 10 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1632629191 PrefabInstance: @@ -35305,7 +35755,7 @@ Transform: - {fileID: 951219931} - {fileID: 1983020638} m_Father: {fileID: 0} - m_RootOrder: 14 + m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1646071858 GameObject: @@ -35352,6 +35802,52 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1650518897 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1650518899} + - component: {fileID: 1650518898} + m_Layer: 0 + m_Name: PauseManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1650518898 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650518897} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ca352e3a141129743824a83b5d7a231f, type: 3} + m_Name: + m_EditorClassIdentifier: + nameCanvas: PauseCanvas + timeExit: 1.5 +--- !u!4 &1650518899 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650518897} + 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: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1651976774 PrefabInstance: m_ObjectHideFlags: 0 @@ -40909,7 +41405,7 @@ Transform: - {fileID: 1312744305} - {fileID: 248584500} m_Father: {fileID: 0} - m_RootOrder: 8 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1874864534 PrefabInstance: @@ -43255,7 +43751,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1967068472 PrefabInstance: @@ -44138,7 +44634,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &2000714622 PrefabInstance: @@ -47691,7 +48187,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6835821722049786628, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} propertyPath: m_RootOrder - value: 15 + value: 17 objectReference: {fileID: 0} - target: {fileID: 6835821722049786628, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} propertyPath: m_LocalPosition.x @@ -48008,7 +48504,7 @@ Transform: m_Children: - {fileID: 5060942477613140018} m_Father: {fileID: 0} - m_RootOrder: 18 + m_RootOrder: 20 m_LocalEulerAnglesHint: {x: -89.98, y: 180, z: 0} --- !u!4 &4951250094039373438 Transform: diff --git a/302/Assets/Scripts/FireExtinguisher.cs b/302/Assets/Scripts/FireExtinguisher.cs index c8ec3ce..1fb1ae6 100644 --- a/302/Assets/Scripts/FireExtinguisher.cs +++ b/302/Assets/Scripts/FireExtinguisher.cs @@ -44,7 +44,7 @@ private void Update() CheckFireCollision(); - if (Input.GetMouseButtonDown(1)) + if (Input.GetMouseButtonDown(1) && Time.timeScale != 0.0f) { PutDown(); } diff --git a/302/Assets/Scripts/InteractionManager.cs b/302/Assets/Scripts/InteractionManager.cs index 3a10bb1..57ff038 100644 --- a/302/Assets/Scripts/InteractionManager.cs +++ b/302/Assets/Scripts/InteractionManager.cs @@ -46,7 +46,7 @@ void OnDrawGizmos() void Update() { - if (cursor != null) { + if (cursor != null && Time.timeScale != 0.0f) { if (PlayerManager.Instance.State == PlayerManager.PlayerState.Normal) { Ray ray = playerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0.0f)); RaycastHit hit; diff --git a/302/Assets/Scripts/PauseManager.cs b/302/Assets/Scripts/PauseManager.cs index f946437..38a6aba 100644 --- a/302/Assets/Scripts/PauseManager.cs +++ b/302/Assets/Scripts/PauseManager.cs @@ -110,6 +110,7 @@ public override bool UpdateStage() _canvas = obj.GetComponent(); if (_canvas != null) { Log("Find `Canvas` success"); + _canvas.gameObject.SetActive(false); } else { Log("Find `Canvas` failed", mode: 1); res = false; diff --git a/302/Assets/Scripts/PlayerManager.cs b/302/Assets/Scripts/PlayerManager.cs index 6c16f8d..f31577e 100644 --- a/302/Assets/Scripts/PlayerManager.cs +++ b/302/Assets/Scripts/PlayerManager.cs @@ -89,14 +89,14 @@ public enum PlayerState void FixedUpdate() { - if (State == PlayerState.Normal) { + if (State == PlayerState.Normal && Time.timeScale != 0.0f) { HandleMovement(); } } void Update() { - if (State == PlayerState.Normal) { + if (State == PlayerState.Normal && Time.timeScale != 0.0f) { HandleInput(); HandleCamera(); }