From 729751b57f7b867af12d7d8ad5ae2119e36185cf Mon Sep 17 00:00:00 2001 From: sebastianhampel1 Date: Mon, 3 Apr 2023 23:00:18 -0400 Subject: [PATCH] fixed item system --- .../Astronaut/AstronautWithCamera.prefab | 125 +- Assets/Scenes/ShootingScene.unity | 1156 +++++++++++++---- Assets/Scripts/Item/DoorInteractable.cs | 4 +- Assets/Scripts/Item/HeavyItemReceiver.cs | 13 + Assets/Scripts/Item/HeavyItemReceiver.cs.meta | 11 + Assets/Scripts/Pistol/PistolComponent.cs | 1 - .../Player/PlayerInteractionHandler.cs | 59 +- 7 files changed, 1115 insertions(+), 254 deletions(-) create mode 100644 Assets/Scripts/Item/HeavyItemReceiver.cs create mode 100644 Assets/Scripts/Item/HeavyItemReceiver.cs.meta diff --git a/Assets/Prefabs/Astronaut/AstronautWithCamera.prefab b/Assets/Prefabs/Astronaut/AstronautWithCamera.prefab index 88f15d1..03f38a4 100644 --- a/Assets/Prefabs/Astronaut/AstronautWithCamera.prefab +++ b/Assets/Prefabs/Astronaut/AstronautWithCamera.prefab @@ -226,7 +226,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 365318976786001977} - m_LocalRotation: {x: 0.0718026, y: -0.0602704, z: 0.016577827, w: 0.99545825} + m_LocalRotation: {x: 0.050803177, y: 0.24604334, z: -0.062553294, w: 0.9659031} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -474,7 +474,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 365318977167042193} m_LocalRotation: {x: 0.09804932, y: 0.000000017650475, z: -0.0000000017389965, w: 0.99518156} - m_LocalPosition: {x: 0, y: 1.32, z: -3} + m_LocalPosition: {x: -1.6996615, y: 1.32, z: -2.4720743} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -777,7 +777,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 365318977785173328} - m_LocalRotation: {x: 0.05368384, y: -0.060561996, z: 0.015478803, w: 0.9965996} + m_LocalRotation: {x: 0.03322547, y: 0.2471404, z: -0.05806753, w: 0.9666674} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -989,7 +989,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 365318978058098897} - m_LocalRotation: {x: 0.03559524, y: -0.060832832, z: 0.014377572, w: 0.9974095} + m_LocalRotation: {x: 0.015683249, y: 0.24815318, z: -0.053574488, w: 0.96711105} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -1078,8 +1078,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 365318978543542559} - m_LocalRotation: {x: 0.15114106, y: -0.061787855, z: 0.009466156, w: 0.9865339} - m_LocalPosition: {x: -0.000023298204, y: 1.3199862, z: -2.4649107} + m_LocalRotation: {x: 0.14482042, y: 0.14063732, z: -0.020799974, w: 0.97919124} + m_LocalPosition: {x: -1.0329641, y: 1.3199979, z: -2.4649105} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1149,8 +1149,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} m_Name: m_EditorClassIdentifier: - clearColorMode: 0 - backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} + clearColorMode: 1 + backgroundColorHDR: {r: 0, g: 0, b: 0, a: 0} clearDepth: 1 volumeLayerMask: serializedVersion: 2 @@ -1312,7 +1312,7 @@ MonoBehaviour: debug: 1 mask: serializedVersion: 2 - m_Bits: 0 + m_Bits: 64 range: 1 --- !u!1 &365318978817215852 GameObject: @@ -1905,14 +1905,30 @@ PrefabInstance: propertyPath: m_LocalPosition.x value: -3.1 objectReference: {fileID: 0} + - target: {fileID: 506506833991321686, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3} + propertyPath: m_Size.y + value: 1.5481672 + objectReference: {fileID: 0} + - target: {fileID: 506506833991321686, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3} + propertyPath: m_Center.y + value: -0.2740825 + objectReference: {fileID: 0} - target: {fileID: 800476564762967425, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3} propertyPath: m_Height value: 2.3 objectReference: {fileID: 0} + - target: {fileID: 1296952523545964610, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e1fe5134720cba140901cf75d1d6080f, type: 2} - target: {fileID: 1296952523545964610, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3} propertyPath: m_Materials.Array.data[1] value: objectReference: {fileID: 2100000, guid: 53ab8bcce7ce70342a13f65c0c773d03, type: 2} + - target: {fileID: 1830643123924126821, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3} + propertyPath: pistol + value: + objectReference: {fileID: 3430889494742284928} - target: {fileID: 1830643123924126821, guid: 10110e55c50520d42a4601f2a7d6542f, type: 3} propertyPath: flashlight value: @@ -2040,56 +2056,127 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 3442891603357720395} m_Modifications: + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2548026318584717246, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalPosition.x - value: -0.05 + value: -0.083 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalPosition.y - value: 0.213 + value: 0.232 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalPosition.z - value: 0.057 + value: 0.063 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalRotation.w - value: -0.61237246 + value: -0.7401139 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalRotation.x - value: -0.61237246 + value: -0.021586848 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalRotation.y - value: 0.35355335 + value: 0.6718124 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalRotation.z - value: -0.35355335 + value: 0.020823253 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalEulerAnglesHint.x - value: 90 + value: 179.772 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 180 + value: 95.532 objectReference: {fileID: 0} - target: {fileID: 2870092814380004342, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_LocalEulerAnglesHint.z - value: -120 + value: -183.43 objectReference: {fileID: 0} - target: {fileID: 3215375081412045132, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} propertyPath: m_Name value: Pistol1 objectReference: {fileID: 0} + - target: {fileID: 5870767500957406260, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalPosition.y + value: -0.78 + objectReference: {fileID: 0} + - target: {fileID: 5870767500957406260, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalPosition.z + value: 0.28 + objectReference: {fileID: 0} + - target: {fileID: 5870767500957406260, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 5870767500957406260, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 5870767500957406260, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -90 + objectReference: {fileID: 0} + - target: {fileID: 7836552235224166431, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + propertyPath: firePower + value: 40 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} +--- !u!114 &3430889494742284928 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7836552235224166431, guid: 396e7ba93ef9d4147a6a6c09b1abe39d, type: 3} + m_PrefabInstance: {fileID: 4854301426680056479} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0bc8aa373bfbe44e91f0625324088be, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &5526373308689778747 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/ShootingScene.unity b/Assets/Scenes/ShootingScene.unity index 5525145..83c5349 100644 --- a/Assets/Scenes/ShootingScene.unity +++ b/Assets/Scenes/ShootingScene.unity @@ -1301,6 +1301,90 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 6, y: 2, z: 2} m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &263191076 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 263191077} + - component: {fileID: 263191079} + - component: {fileID: 263191078} + m_Layer: 6 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &263191077 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 263191076} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071067} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 300, y: 100, z: 100} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1525959983} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &263191078 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 263191076} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: f069e13a4a4a541428ec1849320da3d2, type: 3} + - {fileID: 4874126678125670354, guid: f069e13a4a4a541428ec1849320da3d2, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &263191079 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 263191076} + m_Mesh: {fileID: -5495902117074765545, guid: f069e13a4a4a541428ec1849320da3d2, type: 3} --- !u!1 &275712039 GameObject: m_ObjectHideFlags: 0 @@ -1516,6 +1600,7 @@ MonoBehaviour: itemSize: 1 interactionCanvas: {fileID: 932189021} canPickup: 0 + searchString: Power Core powerCoreCenter: {fileID: 1884542419} minAttractDist: 5 nameSearched: Power Core @@ -1849,6 +1934,116 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &447601212 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 447601213} + - component: {fileID: 447601215} + - component: {fileID: 447601214} + m_Layer: 6 + m_Name: Visual Effect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &447601213 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447601212} + 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: 1525959983} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!73398921 &447601214 +VFXRenderer: + serializedVersion: 1 + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447601212} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!2083052967 &447601215 +VisualEffect: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447601212} + m_Enabled: 1 + m_Asset: {fileID: 8926484042661614526, guid: 8e3b3549d5d7b134c9328c54a846ef6f, type: 3} + m_InitialEventName: OnPlay + m_InitialEventNameOverriden: 0 + m_StartSeed: 0 + m_ResetSeedOnPlay: 1 + m_ResourceVersion: 1 + m_PropertySheet: + m_Float: + m_Array: [] + m_Vector2f: + m_Array: [] + m_Vector3f: + m_Array: [] + m_Vector4f: + m_Array: [] + m_Uint: + m_Array: [] + m_Int: + m_Array: [] + m_Matrix4x4f: + m_Array: [] + m_AnimationCurve: + m_Array: [] + m_Gradient: + m_Array: [] + m_NamedObject: + m_Array: [] + m_Bool: + m_Array: [] --- !u!1 &456355058 GameObject: m_ObjectHideFlags: 0 @@ -2207,7 +2402,7 @@ MeshRenderer: m_RenderingLayerMask: 257 m_RendererPriority: 0 m_Materials: - - {fileID: -6478536213147159724, guid: 5a1b5aacfbc242c4b998d66774454f6f, type: 3} + - {fileID: 2100000, guid: f9ea10f3715856a40886087ca7a992cc, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -2719,6 +2914,90 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 534814338} m_CullTransparentMesh: 1 +--- !u!1 &544546963 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 544546964} + - component: {fileID: 544546966} + - component: {fileID: 544546965} + m_Layer: 6 + m_Name: Icosphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &544546964 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 544546963} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071067} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 100, y: 100, z: 100} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1525959983} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &544546965 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 544546963} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: f069e13a4a4a541428ec1849320da3d2, type: 3} + - {fileID: -6478536213147159724, guid: f069e13a4a4a541428ec1849320da3d2, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &544546966 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 544546963} + m_Mesh: {fileID: 289301614986012343, guid: f069e13a4a4a541428ec1849320da3d2, type: 3} --- !u!1 &545829728 GameObject: m_ObjectHideFlags: 0 @@ -3546,7 +3825,7 @@ MeshRenderer: m_RenderingLayerMask: 257 m_RendererPriority: 0 m_Materials: - - {fileID: -6478536213147159724, guid: 5a1b5aacfbc242c4b998d66774454f6f, type: 3} + - {fileID: 2100000, guid: f9ea10f3715856a40886087ca7a992cc, type: 2} - {fileID: -3846018093981099296, guid: 5a1b5aacfbc242c4b998d66774454f6f, type: 3} m_StaticBatchInfo: firstSubMesh: 0 @@ -4466,14 +4745,6 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 150491138899967206, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_Size.y - value: 1.5481672 - objectReference: {fileID: 0} - - target: {fileID: 150491138899967206, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_Center.y - value: -0.2740825 - objectReference: {fileID: 0} - target: {fileID: 365318976786001927, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.x value: 0 @@ -4488,19 +4759,19 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 365318976786001927, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.w - value: 0.99545825 + value: 0.06735075 objectReference: {fileID: 0} - target: {fileID: 365318976786001927, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.x - value: 0.0718026 + value: 0.0031739888 objectReference: {fileID: 0} - target: {fileID: 365318976786001927, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.y - value: -0.0602704 + value: 0.9682902 objectReference: {fileID: 0} - target: {fileID: 365318976786001927, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.z - value: 0.016577827 + value: -0.24055758 objectReference: {fileID: 0} - target: {fileID: 365318977076093362, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_RootOrder @@ -4550,9 +4821,13 @@ PrefabInstance: propertyPath: m_Name value: AstronautWithCamera objectReference: {fileID: 0} - - target: {fileID: 365318977167042204, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_DistanceLimit - value: 0 + - target: {fileID: 365318977167042205, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} + propertyPath: m_XAxis.Value + value: 0.03 + objectReference: {fileID: 0} + - target: {fileID: 365318977167042207, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} + propertyPath: m_LocalPosition.x + value: -0.705899 objectReference: {fileID: 0} - target: {fileID: 365318977167042207, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.y @@ -4560,7 +4835,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 365318977167042207, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.z - value: -3 + value: 2.9157686 objectReference: {fileID: 0} - target: {fileID: 365318977785173342, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.x @@ -4576,35 +4851,19 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 365318977785173342, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.w - value: 0.9965996 + value: 0.06739733 objectReference: {fileID: 0} - target: {fileID: 365318977785173342, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.x - value: 0.05368384 + value: 0.001948386 objectReference: {fileID: 0} - target: {fileID: 365318977785173342, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.y - value: -0.06056196 + value: 0.9725056 objectReference: {fileID: 0} - target: {fileID: 365318977785173342, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.z - value: 0.0154787935 - objectReference: {fileID: 0} - - target: {fileID: 365318977786174402, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LookaheadTime - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365318977786174402, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_SoftZoneWidth - value: 0.8 - objectReference: {fileID: 0} - - target: {fileID: 365318977786174402, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_VerticalDamping - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365318977786174402, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_HorizontalDamping - value: 0 + value: -0.22290507 objectReference: {fileID: 0} - target: {fileID: 365318978058098911, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.x @@ -4620,225 +4879,50 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 365318978058098911, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.w - value: 0.9974095 + value: 0.06742161 objectReference: {fileID: 0} - target: {fileID: 365318978058098911, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.x - value: 0.03559524 + value: 0.0007253769 objectReference: {fileID: 0} - target: {fileID: 365318978058098911, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.y - value: -0.060832832 + value: 0.9763894 objectReference: {fileID: 0} - target: {fileID: 365318978058098911, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.z - value: 0.014377572 + value: -0.20522574 objectReference: {fileID: 0} - target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.x - value: -0.000023298204 + value: -0.705899 objectReference: {fileID: 0} - target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.y - value: 1.3199862 + value: 1.32 objectReference: {fileID: 0} - target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalPosition.z - value: -2.4649107 + value: 2.9157686 objectReference: {fileID: 0} - target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.w - value: 0.9865339 + value: 0.06688153 objectReference: {fileID: 0} - target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.x - value: 0.15114106 + value: 0.008547258 objectReference: {fileID: 0} - target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.y - value: -0.061787784 + value: 0.98967534 objectReference: {fileID: 0} - target: {fileID: 365318978543542555, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} propertyPath: m_LocalRotation.z - value: 0.009466145 - objectReference: {fileID: 0} - - target: {fileID: 365318978543542557, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: clearColorMode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 365318978543542557, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: backgroundColorHDR.b - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365318978543542557, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: backgroundColorHDR.g - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 365318978543542557, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: backgroundColorHDR.r - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1307405647097536171, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 1307405647097536171, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.y - value: -0.78 - objectReference: {fileID: 0} - - target: {fileID: 1307405647097536171, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.z - value: 0.28 - objectReference: {fileID: 0} - - target: {fileID: 1307405647097536171, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 1307405647097536171, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.x - value: -0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 1307405647097536171, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: -90 - objectReference: {fileID: 0} - - target: {fileID: 1508262627282076914, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: e1fe5134720cba140901cf75d1d6080f, type: 2} - - target: {fileID: 2050861402165868757, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: pistol - value: - objectReference: {fileID: 1000589093} - - target: {fileID: 2641769993692704567, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_text - value: Health:10 - objectReference: {fileID: 0} - - target: {fileID: 2641769993692704567, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_fontSize - value: 29.8 - objectReference: {fileID: 0} - - target: {fileID: 2641769993692704567, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_fontStyle - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2641769993692704567, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_enableWordWrapping - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2641769993692704567, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_overrideHtmlColors - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3430889494742284928, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: firePower - value: 40 - objectReference: {fileID: 0} - - target: {fileID: 3430889494742284928, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: targetObjectPrefab - value: - objectReference: {fileID: 7083481049935262560, guid: 25e7708870a1a78479d6e4df73bec788, type: 3} - - target: {fileID: 6315715599012510120, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: mask.m_Bits - value: 64 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6917978738172450081, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7149883119777549477, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.x - value: -0.108 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.y - value: 0.233 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalPosition.z - value: 0.063 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.w - value: -0.65604275 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.x - value: 0.0000001471489 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.y - value: 0.7547238 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalRotation.z - value: 0.00000005215404 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 180 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 81.998 - objectReference: {fileID: 0} - - target: {fileID: 7244443903517702505, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: -180 - objectReference: {fileID: 0} - - target: {fileID: 9088407379882215514, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - propertyPath: m_RootOrder - value: 2 + value: -0.12647751 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} ---- !u!114 &1000589093 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 3430889494742284928, guid: 57a1e0f3274302943993b8f55e87f3c9, type: 3} - m_PrefabInstance: {fileID: 1000589092} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a0bc8aa373bfbe44e91f0625324088be, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &1003663202 GameObject: m_ObjectHideFlags: 0 @@ -5086,6 +5170,7 @@ Transform: m_Children: - {fileID: 1383407761} - {fileID: 258067241} + - {fileID: 1525959983} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -5672,6 +5757,223 @@ Light: m_UseViewFrustumForShadowCasterCull: 1 m_ShadowRadius: 0 m_ShadowAngle: 0 +--- !u!1 &1185757970 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1185757971} + - component: {fileID: 1185757973} + - component: {fileID: 1185757972} + m_Layer: 6 + m_Name: Point Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1185757971 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1185757970} + 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: 1525959983} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1185757972 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1185757970} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Intensity: 600 + m_EnableSpotReflector: 1 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_SpotIESCutoffPercent: 100 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 0 + m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0.025 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 0.99 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + m_IESPoint: {fileID: 0} + m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 + m_AreaLightShadowCone: 120 + m_UseScreenSpaceShadows: 0 + m_InteractsWithSky: 1 + m_AngularDiameter: 0.5 + m_FlareSize: 2 + m_FlareTint: {r: 1, g: 1, b: 1, a: 1} + m_FlareFalloff: 4 + m_SurfaceTexture: {fileID: 0} + m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} + m_Distance: 1.5e+11 + m_UseRayTracedShadows: 0 + m_NumRayTracingSamples: 4 + m_FilterTracedShadow: 1 + m_FilterSizeTraced: 16 + m_SunLightConeAngle: 0.5 + m_LightShadowRadius: 0.5 + m_SemiTransparentShadow: 0 + m_ColorShadow: 1 + m_DistanceBasedFiltering: 0 + m_EvsmExponent: 15 + m_EvsmLightLeakBias: 0 + m_EvsmVarianceBias: 0.00001 + m_EvsmBlurPasses: 0 + m_LightlayersMask: 1 + m_LinkShadowLayers: 1 + m_ShadowNearPlane: 0.1 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 16 + m_MinFilterSize: 0.1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 0 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 0 + m_UseOverride: 1 + m_Level: 0 + m_RayTracedContactShadow: 0 + m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} + m_PenumbraTint: 0 + m_NormalBias: 0.75 + m_SlopeBias: 0.5 + m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 + m_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_preserveCachedShadow: 0 + m_OnDemandShadowRenderOnPlacement: 1 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 0 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 +--- !u!108 &1185757973 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1185757970} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 47.746483 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + 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: 2 + m_AreaSize: {x: 0.5, y: 0.5} + m_BounceIntensity: 1 + m_ColorTemperature: 20000 + m_UseColorTemperature: 1 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 --- !u!1 &1217425171 GameObject: m_ObjectHideFlags: 0 @@ -6595,6 +6897,107 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1383407760} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1393335908 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1393335909} + - component: {fileID: 1393335912} + - component: {fileID: 1393335911} + - component: {fileID: 1393335910} + m_Layer: 6 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1393335909 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1393335908} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 2.2000027} + m_LocalScale: {x: 0.010000001, y: 0.010000001, z: 0.010000001} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2074586584} + m_Father: {fileID: 1525959983} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: -2.7, y: 15.610002} + m_SizeDelta: {x: 1920, y: 1080} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1393335910 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1393335908} + 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 &1393335911 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1393335908} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 1 +--- !u!223 &1393335912 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1393335908} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 --- !u!1 &1397528922 GameObject: m_ObjectHideFlags: 0 @@ -7901,6 +8304,91 @@ Transform: m_Father: {fileID: 1300796347} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1525959982 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525959983} + - component: {fileID: 1525959986} + - component: {fileID: 1525959985} + - component: {fileID: 1525959984} + m_Layer: 6 + m_Name: PowerCore_LowPoly (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1525959983 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525959982} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.109, y: -3.799, z: 7.284} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1393335909} + - {fileID: 263191077} + - {fileID: 544546964} + - {fileID: 1878585193} + - {fileID: 447601213} + - {fileID: 1185757971} + m_Father: {fileID: 1009124658} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1525959984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525959982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 051ddd707f17e1040b0fbe15645f75b6, type: 3} + m_Name: + m_EditorClassIdentifier: + itemName: Power Core 2 + itemSize: 1 + interactionCanvas: {fileID: 1393335912} + canPickup: 1 +--- !u!54 &1525959985 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525959982} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 112 + m_CollisionDetection: 0 +--- !u!65 &1525959986 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525959982} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 6, y: 2, z: 2} + m_Center: {x: 0, y: 0, z: 0} --- !u!1 &1530488905 GameObject: m_ObjectHideFlags: 0 @@ -8963,6 +9451,89 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1842812956} m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1878585192 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1878585193} + - component: {fileID: 1878585195} + - component: {fileID: 1878585194} + m_Layer: 6 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1878585193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1878585192} + m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071067} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 124.4, y: 124.4, z: 124.4} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 1525959983} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1878585194 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1878585192} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 097826b1552b779408ce530fd64c6cef, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1878585195 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1878585192} + m_Mesh: {fileID: 4711208715938537054, guid: f069e13a4a4a541428ec1849320da3d2, type: 3} --- !u!1 &1884542418 GameObject: m_ObjectHideFlags: 0 @@ -9089,7 +9660,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1936100424} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 6.87, y: 3.1178, z: -5.8628845} + m_LocalPosition: {x: 3.5, y: 3.1178, z: -5.8628845} m_LocalScale: {x: 5.3, y: 9.3756, z: 0.1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -9506,6 +10077,141 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!1 &2074586583 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2074586584} + - component: {fileID: 2074586586} + - component: {fileID: 2074586585} + m_Layer: 6 + m_Name: Interaction Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2074586584 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2074586583} + 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: 1393335909} + 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: 1394, y: -1189} + m_SizeDelta: {x: 1000, y: 500} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2074586585 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2074586583} + 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: Collect Power Core + 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: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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: 245.6 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 1000 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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: -207.84943, y: -213.57129, z: -243.51343, w: -115.010254} + 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 &2074586586 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2074586583} + m_CullTransparentMesh: 1 --- !u!1 &211466217955286311 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Item/DoorInteractable.cs b/Assets/Scripts/Item/DoorInteractable.cs index 60813ba..541a074 100644 --- a/Assets/Scripts/Item/DoorInteractable.cs +++ b/Assets/Scripts/Item/DoorInteractable.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class DoorInteractable : InteractableItem +public class DoorInteractable : HeavyItemReceiver { [SerializeField] private Transform powerCoreCenter; @@ -91,6 +91,8 @@ public class DoorInteractable : InteractableItem else if(insertedCore!=null&&heavyInvent==null) { heavyInvent = insertedCore; + print("Picked up:" + heavyInvent.name); + insertedCore = null; //get ref of player perhaps return true; } diff --git a/Assets/Scripts/Item/HeavyItemReceiver.cs b/Assets/Scripts/Item/HeavyItemReceiver.cs new file mode 100644 index 0000000..42e0510 --- /dev/null +++ b/Assets/Scripts/Item/HeavyItemReceiver.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public abstract class HeavyItemReceiver : InteractableItem +{ + protected HeavyInteractableItem item; + [SerializeField] + [Tooltip("Specify the keyword search in the name of the item!")] + protected string searchString; + + +} diff --git a/Assets/Scripts/Item/HeavyItemReceiver.cs.meta b/Assets/Scripts/Item/HeavyItemReceiver.cs.meta new file mode 100644 index 0000000..2cc85d6 --- /dev/null +++ b/Assets/Scripts/Item/HeavyItemReceiver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aef7fff75652a9a499e312b65c8f91b1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Pistol/PistolComponent.cs b/Assets/Scripts/Pistol/PistolComponent.cs index 4d561bc..da5b919 100644 --- a/Assets/Scripts/Pistol/PistolComponent.cs +++ b/Assets/Scripts/Pistol/PistolComponent.cs @@ -43,7 +43,6 @@ public class PistolComponent : MonoBehaviour RaycastHit hit; if (Physics.Raycast(ray, out hit, 50)) { - print(hit.transform.name); targetObject.gameObject.transform.position = hit.point; } } diff --git a/Assets/Scripts/Player/PlayerInteractionHandler.cs b/Assets/Scripts/Player/PlayerInteractionHandler.cs index db4233d..1b50c64 100644 --- a/Assets/Scripts/Player/PlayerInteractionHandler.cs +++ b/Assets/Scripts/Player/PlayerInteractionHandler.cs @@ -50,6 +50,21 @@ public class PlayerInteractionHandler : MonoBehaviour flashlightEnabled = this.flashlight.gameObject.activeSelf; } + private bool receiverInRange(out int index) + { + int i = 0; + foreach(InteractableItem item in this.itemsInRange) + { + if(item is HeavyItemReceiver) + { + index = i; + return true; + } + i++; + } + index = -1; + return false; + } // Update is called once per frame void Update() { @@ -87,6 +102,8 @@ public class PlayerInteractionHandler : MonoBehaviour else if (heavyItemsInRange.Count > 0) { pickupFound = true; + + heavyInvent = heavyItemsInRange[0]; heavyInvent.transform.parent = carryingPos; @@ -95,6 +112,7 @@ public class PlayerInteractionHandler : MonoBehaviour heavyItemsInRange.Remove(heavyItemsInRange[0]); heavyInvent.Disable(); heavyInvent.DisableAll(); + } if (!pickupFound) { @@ -105,6 +123,20 @@ public class PlayerInteractionHandler : MonoBehaviour if (!item.Interact(ref invent, ref heavyInvent)) { item.Interact(); + }else if(item is HeavyItemReceiver) + { + if(heavyInvent != null) + { + heavyInvent.transform.parent = carryingPos; + heavyInvent.transform.localPosition = Vector3.zero; + heavyInvent.transform.localEulerAngles = Vector3.zero; + heavyItemsInRange.Remove(heavyInvent); + heavyInvent.GetComponent().constraints = RigidbodyConstraints.FreezeRotation; + heavyInvent.GetComponent().isKinematic = true; + heavyInvent.Disable(); + heavyInvent.DisableAll(); + + } } } @@ -113,10 +145,21 @@ public class PlayerInteractionHandler : MonoBehaviour } else { - heavyInvent.transform.parent = null; - heavyInvent.GetComponent().isKinematic = false; - heavyInvent.EnableAll(); - heavyInvent = null; + int refIndex; + if (itemsInRange.Count > 0&&receiverInRange(out refIndex)) { + ((HeavyItemReceiver)itemsInRange[refIndex]).Interact(ref this.invent, ref heavyInvent); + heavyInvent = null; + + } + else + { + heavyInvent.transform.parent = null; + heavyInvent.GetComponent().isKinematic = false; + heavyInvent.EnableAll(); + heavyInvent = null; + } + + } @@ -126,7 +169,7 @@ public class PlayerInteractionHandler : MonoBehaviour } if (Input.GetButtonDown("Fire2")) { - print(this.GunEnabled); + //print(this.GunEnabled); if (!this.GunEnabled) { @@ -170,7 +213,7 @@ public class PlayerInteractionHandler : MonoBehaviour } public void EnableFlashlight() { - print("Enabling Flashlight..."); + flashlight.gameObject.SetActive(true); flashlight3D.GetComponent().materials[materialIndex].SetColor("_BaseColor", initColor); selMaterial.SetColor("_EmissionColor", new Color(255, 255, 255, 255)); @@ -179,7 +222,7 @@ public class PlayerInteractionHandler : MonoBehaviour } public void DisableFlashlight() { - print("Disabling Flashlight..."); + flashlight.gameObject.SetActive(false); flashlight3D.GetComponent().materials[materialIndex].SetColor("_BaseColor", new Color(0, 0, 0)); selMaterial.SetColor("_EmissionColor", new Color(0, 0, 0, 0)); @@ -188,7 +231,7 @@ public class PlayerInteractionHandler : MonoBehaviour } - + private void OnTriggerEnter(Collider other) { if(other.gameObject.GetComponent() != null)