From 31ee6e6a3703cb039d7a6b8480a58a8c085a26e1 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Thu, 21 Sep 2023 19:11:24 +0200 Subject: [PATCH 01/13] Created some platforms --- Assets/Scenes/CraterTown.unity | 214 ++++++++++++++++++++++++++++++++- 1 file changed, 212 insertions(+), 2 deletions(-) diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index 2dd1ae173..2d4b41bf6 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.22455092, g: 0.06513601, b: 0.04186028, a: 1} + m_IndirectSpecularColor: {r: 0.22455077, g: 0.06513595, b: 0.04186021, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1258,6 +1258,111 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} m_PrefabInstance: {fileID: 411048690} m_PrefabAsset: {fileID: 0} +--- !u!1 &418722612 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 418722616} + - component: {fileID: 418722615} + - component: {fileID: 418722614} + - component: {fileID: 418722613} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &418722613 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 418722612} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &418722614 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 418722612} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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 &418722615 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 418722612} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &418722616 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 418722612} + m_LocalRotation: {x: 0.30801025, y: 0.86235243, z: 0.12713209, w: 0.38120264} + m_LocalPosition: {x: 212.49, y: 64.83, z: 264.16} + m_LocalScale: {x: 12.028497, y: 0, z: 4.3434367} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0.892, y: 132.619, z: 38.92} --- !u!1001 &511965792 PrefabInstance: m_ObjectHideFlags: 0 @@ -2753,7 +2858,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 915472774} m_LocalRotation: {x: -0, y: -0.2714832, z: -0, w: 0.9624432} - m_LocalPosition: {x: 38.7, y: -33.21, z: 76.6} + m_LocalPosition: {x: 29.2, y: -33.21, z: 90} m_LocalScale: {x: 15.09417, y: 8, z: 35} m_ConstrainProportionsScale: 0 m_Children: [] @@ -4915,6 +5020,111 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1731240611} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1746097624 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1746097628} + - component: {fileID: 1746097627} + - component: {fileID: 1746097626} + - component: {fileID: 1746097625} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1746097625 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746097624} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1746097626 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746097624} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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 &1746097627 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746097624} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1746097628 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746097624} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 262.23, y: 67.31, z: 224.57} + m_LocalScale: {x: 3.723864, y: 0.46772423, z: 3.723864} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1776951674 PrefabInstance: m_ObjectHideFlags: 0 From cde366f16a82c889db0f0a403a0b4a6877999e3b Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:34:28 +0200 Subject: [PATCH 02/13] Added a platform and a bridge --- Assets/Scenes/CraterTown.unity | 226 +++++++++++++++++++- Assets/Scripts/Gamestate/MatchController.cs | 2 +- 2 files changed, 219 insertions(+), 9 deletions(-) diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index 2d4b41bf6..276498cd8 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -355,14 +355,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 89579459} - m_LocalRotation: {x: -0, y: -0.82801354, z: -0, w: 0.5607081} - m_LocalPosition: {x: 18.91, y: -32.24, z: -69.65} - m_LocalScale: {x: 9.469095, y: 20, z: 11.055124} + m_LocalRotation: {x: 0, y: -0.519519, z: 0, w: 0.85445887} + m_LocalPosition: {x: 6.7, y: -32.24, z: -92.2} + m_LocalScale: {x: 28.01, y: 8, z: 26.13} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1240377018} m_RootOrder: -1 - m_LocalEulerAnglesHint: {x: 0, y: -111.79, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: -62.6, z: 0} --- !u!65 &89579461 BoxCollider: m_ObjectHideFlags: 0 @@ -1363,6 +1363,111 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0.892, y: 132.619, z: 38.92} +--- !u!1 &438877658 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 438877662} + - component: {fileID: 438877661} + - component: {fileID: 438877660} + - component: {fileID: 438877659} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &438877659 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 438877658} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &438877660 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 438877658} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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 &438877661 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 438877658} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &438877662 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 438877658} + m_LocalRotation: {x: 0, y: 0.20441061, z: 0, w: 0.97888523} + m_LocalPosition: {x: 222.6, y: 70.23, z: 171.6} + m_LocalScale: {x: 4, y: 0.5, z: 3} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 16 + m_LocalEulerAnglesHint: {x: 0, y: 23.59, z: 0} --- !u!1001 &511965792 PrefabInstance: m_ObjectHideFlags: 0 @@ -3813,6 +3918,111 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} m_PrefabInstance: {fileID: 1204032307} m_PrefabAsset: {fileID: 0} +--- !u!1 &1224013787 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1224013791} + - component: {fileID: 1224013790} + - component: {fileID: 1224013789} + - component: {fileID: 1224013788} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1224013788 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1224013787} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1224013789 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1224013787} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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 &1224013790 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1224013787} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1224013791 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1224013787} + m_LocalRotation: {x: 0.038593344, y: -0.4903754, z: -0.06831085, w: 0.86797243} + m_LocalPosition: {x: 240.69, y: 68.98, z: 181.42} + m_LocalScale: {x: 17.6, y: 0.4, z: 3} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 15 + m_LocalEulerAnglesHint: {x: 0, y: -58.93, z: -9} --- !u!1 &1240377017 GameObject: m_ObjectHideFlags: 0 @@ -4941,14 +5151,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1731240611} - m_LocalRotation: {x: -0, y: 0.45073414, z: -0, w: 0.8926583} - m_LocalPosition: {x: -90.71814, y: -34.89, z: -51.6203} + m_LocalRotation: {x: 0, y: 0.8422643, z: 0, w: 0.5390648} + m_LocalPosition: {x: -83.2, y: -34.89, z: -50.7} m_LocalScale: {x: 35.6, y: 6.6, z: 12.800001} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1240377018} m_RootOrder: -1 - m_LocalEulerAnglesHint: {x: 0, y: 53.582, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 114.76, z: 0} --- !u!65 &1731240613 BoxCollider: m_ObjectHideFlags: 0 @@ -5119,7 +5329,7 @@ Transform: m_GameObject: {fileID: 1746097624} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 262.23, y: 67.31, z: 224.57} - m_LocalScale: {x: 3.723864, y: 0.46772423, z: 3.723864} + m_LocalScale: {x: 4, y: 0.5, z: 3.723864} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} diff --git a/Assets/Scripts/Gamestate/MatchController.cs b/Assets/Scripts/Gamestate/MatchController.cs index 06cf99143..41640ed24 100644 --- a/Assets/Scripts/Gamestate/MatchController.cs +++ b/Assets/Scripts/Gamestate/MatchController.cs @@ -94,7 +94,7 @@ void Start() // Makes shooting end quickly if testing with 1 player #if UNITY_EDITOR if (PlayerInputManagerController.Singleton.playerInputs.Count == 1) - roundLength = 5f; + roundLength = 60f; #endif StartNextRound(); From c0c17821145e0216dec0a09a853672cc3d2c911a Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:28:14 +0200 Subject: [PATCH 03/13] Added bridges and platforms --- Assets/Scenes/CraterTown.unity | 406 +++++++++++++++----- Assets/Scripts/Gamestate/MatchController.cs | 2 +- 2 files changed, 309 insertions(+), 99 deletions(-) diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index 276498cd8..6a5867c9a 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -561,7 +561,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 990b37a517a0e82f991f733add8d7c72, type: 3} propertyPath: m_LocalPosition.x - value: 54.19 + value: -15.5 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 990b37a517a0e82f991f733add8d7c72, type: 3} propertyPath: m_LocalPosition.y @@ -569,7 +569,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 990b37a517a0e82f991f733add8d7c72, type: 3} propertyPath: m_LocalPosition.z - value: 28.13 + value: 74.4 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 990b37a517a0e82f991f733add8d7c72, type: 3} propertyPath: m_LocalRotation.w @@ -1206,7 +1206,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalPosition.x - value: -63.35 + value: -53.3 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalPosition.y @@ -1214,7 +1214,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalPosition.z - value: 48.51 + value: 45.5 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalRotation.w @@ -1357,7 +1357,7 @@ Transform: m_GameObject: {fileID: 418722612} m_LocalRotation: {x: 0.30801025, y: 0.86235243, z: 0.12713209, w: 0.38120264} m_LocalPosition: {x: 212.49, y: 64.83, z: 264.16} - m_LocalScale: {x: 12.028497, y: 0, z: 4.3434367} + m_LocalScale: {x: 12.028497, y: 0.03, z: 4.3434367} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} @@ -1972,73 +1972,7 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} m_PrefabInstance: {fileID: 559232727} m_PrefabAsset: {fileID: 0} ---- !u!1001 &591597037 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1855439318} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_RootOrder - value: -1 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalPosition.x - value: -26.203674 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalPosition.y - value: 27.56187 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalPosition.z - value: -126.10419 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalRotation.x - value: -0.7071068 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - propertyPath: m_Name - value: BigRock (1) - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 385c92570d3a124bf91554552e3464a1, type: 3} ---- !u!4 &591597038 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} - m_PrefabInstance: {fileID: 591597037} - m_PrefabAsset: {fileID: 0} ---- !u!1 &643123745 +--- !u!1 &589078551 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2046,39 +1980,39 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 643123746} - - component: {fileID: 643123749} - - component: {fileID: 643123748} - - component: {fileID: 643123747} + - component: {fileID: 589078552} + - component: {fileID: 589078555} + - component: {fileID: 589078554} + - component: {fileID: 589078553} m_Layer: 0 - m_Name: Cube (11) + m_Name: Cube (22) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &643123746 +--- !u!4 &589078552 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 643123745} - m_LocalRotation: {x: -0, y: -0.534783, z: -0, w: 0.8449895} - m_LocalPosition: {x: -87.818146, y: -35.43, z: 7.979706} - m_LocalScale: {x: 9.469096, y: 8, z: 11.055125} + m_GameObject: {fileID: 589078551} + m_LocalRotation: {x: 0, y: -0.99912286, z: 0, w: 0.041875802} + m_LocalPosition: {x: 48.4, y: -27.19, z: 46.7} + m_LocalScale: {x: 9.469095, y: 20, z: 11.055124} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1240377018} m_RootOrder: -1 - m_LocalEulerAnglesHint: {x: 0, y: -64.658, z: 0} ---- !u!65 &643123747 + m_LocalEulerAnglesHint: {x: 0, y: -175.2, z: 0} +--- !u!65 &589078553 BoxCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 643123745} + m_GameObject: {fileID: 589078551} m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -2093,13 +2027,13 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &643123748 +--- !u!23 &589078554 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 643123745} + m_GameObject: {fileID: 589078551} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -2135,14 +2069,80 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &643123749 +--- !u!33 &589078555 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 643123745} + m_GameObject: {fileID: 589078551} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &591597037 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1855439318} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalPosition.x + value: -26.203674 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalPosition.y + value: 27.56187 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalPosition.z + value: -126.10419 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + propertyPath: m_Name + value: BigRock (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 385c92570d3a124bf91554552e3464a1, type: 3} +--- !u!4 &591597038 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} + m_PrefabInstance: {fileID: 591597037} + m_PrefabAsset: {fileID: 0} --- !u!1001 &659858187 PrefabInstance: m_ObjectHideFlags: 0 @@ -3317,6 +3317,111 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 931047345} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1002049212 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1002049216} + - component: {fileID: 1002049215} + - component: {fileID: 1002049214} + - component: {fileID: 1002049213} + m_Layer: 0 + m_Name: Cube (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1002049213 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002049212} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1002049214 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002049212} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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 &1002049215 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002049212} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1002049216 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002049212} + m_LocalRotation: {x: 0.10487443, y: 0.41107816, z: 0.20602956, w: 0.88179815} + m_LocalPosition: {x: 179.97, y: 66.37, z: 220.24} + m_LocalScale: {x: 17.3, y: 0.03, z: 4.3434367} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 17 + m_LocalEulerAnglesHint: {x: 0.892, y: 50.2, z: 26.72} --- !u!1001 &1067453934 PrefabInstance: m_ObjectHideFlags: 0 @@ -4053,7 +4158,6 @@ Transform: m_Children: - {fileID: 2037260232} - {fileID: 536118886} - - {fileID: 643123746} - {fileID: 89579460} - {fileID: 1098713481} - {fileID: 915472775} @@ -4072,6 +4176,7 @@ Transform: - {fileID: 559232728} - {fileID: 6922103} - {fileID: 131371762} + - {fileID: 589078552} m_Father: {fileID: 0} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -5327,14 +5432,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1746097624} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 262.23, y: 67.31, z: 224.57} + m_LocalRotation: {x: 0, y: 0.016928874, z: 0, w: 0.99985677} + m_LocalPosition: {x: 252.6, y: 67.31, z: 231.7} m_LocalScale: {x: 4, y: 0.5, z: 3.723864} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 14 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 1.94, z: 0} --- !u!1001 &1776951674 PrefabInstance: m_ObjectHideFlags: 0 @@ -5688,7 +5793,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalPosition.x - value: 21.8 + value: 22.4 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalPosition.y @@ -5696,7 +5801,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalPosition.z - value: 41.6 + value: 36 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} propertyPath: m_LocalRotation.w @@ -6043,6 +6148,111 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 385c92570d3a124bf91554552e3464a1, type: 3} m_PrefabInstance: {fileID: 2005143899} m_PrefabAsset: {fileID: 0} +--- !u!1 &2011518138 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2011518142} + - component: {fileID: 2011518141} + - component: {fileID: 2011518140} + - component: {fileID: 2011518139} + m_Layer: 0 + m_Name: Cube (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &2011518139 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2011518138} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2011518140 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2011518138} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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 &2011518141 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2011518138} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2011518142 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2011518138} + m_LocalRotation: {x: 0.014223322, y: 0.8099101, z: 0.045803595, w: 0.58458984} + m_LocalPosition: {x: 198.29, y: 69.32, z: 241.54} + m_LocalScale: {x: 17.3, y: 0.03, z: 4.3434367} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 18 + m_LocalEulerAnglesHint: {x: -3.3, y: 108.23, z: 4.4} --- !u!1001 &2021918642 PrefabInstance: m_ObjectHideFlags: 0 @@ -6136,7 +6346,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2037260231} m_LocalRotation: {x: -0, y: -0.299779, z: -0, w: 0.95400876} - m_LocalPosition: {x: -75.71814, y: -32.48, z: 27.8797} + m_LocalPosition: {x: -67.8, y: -32.48, z: 23.5} m_LocalScale: {x: 18.2, y: 8, z: 24.473396} m_ConstrainProportionsScale: 0 m_Children: [] @@ -6468,7 +6678,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7135334762222197563, guid: dcca19286c3b3ec44bf7ef4f91238ce2, type: 3} propertyPath: m_LocalPosition.x - value: 17.045547 + value: 17.5 objectReference: {fileID: 0} - target: {fileID: 7135334762222197563, guid: dcca19286c3b3ec44bf7ef4f91238ce2, type: 3} propertyPath: m_LocalPosition.y @@ -6476,7 +6686,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7135334762222197563, guid: dcca19286c3b3ec44bf7ef4f91238ce2, type: 3} propertyPath: m_LocalPosition.z - value: 11.722351 + value: 9.2 objectReference: {fileID: 0} - target: {fileID: 7135334762222197563, guid: dcca19286c3b3ec44bf7ef4f91238ce2, type: 3} propertyPath: m_LocalRotation.w diff --git a/Assets/Scripts/Gamestate/MatchController.cs b/Assets/Scripts/Gamestate/MatchController.cs index 41640ed24..06cf99143 100644 --- a/Assets/Scripts/Gamestate/MatchController.cs +++ b/Assets/Scripts/Gamestate/MatchController.cs @@ -94,7 +94,7 @@ void Start() // Makes shooting end quickly if testing with 1 player #if UNITY_EDITOR if (PlayerInputManagerController.Singleton.playerInputs.Count == 1) - roundLength = 60f; + roundLength = 5f; #endif StartNextRound(); From 3cef4f8d5298e85e3c82a5703778f7aab162bab9 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Tue, 10 Oct 2023 12:26:22 +0200 Subject: [PATCH 04/13] Added platform --- Assets/Scenes/CraterTown.unity | 113 +++++++++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 4 deletions(-) diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index 6a5867c9a..98f2e8438 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -3414,14 +3414,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1002049212} - m_LocalRotation: {x: 0.10487443, y: 0.41107816, z: 0.20602956, w: 0.88179815} - m_LocalPosition: {x: 179.97, y: 66.37, z: 220.24} - m_LocalScale: {x: 17.3, y: 0.03, z: 4.3434367} + m_LocalRotation: {x: 0.1447904, y: 0.5827152, z: 0.18022925, w: 0.7790995} + m_LocalPosition: {x: 181.47, y: 66.18, z: 221.42} + m_LocalScale: {x: 19.8, y: 0.03, z: 4.3434367} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 17 - m_LocalEulerAnglesHint: {x: 0.892, y: 50.2, z: 26.72} + m_LocalEulerAnglesHint: {x: 0.892, y: 73.8, z: 26.72} --- !u!1001 &1067453934 PrefabInstance: m_ObjectHideFlags: 0 @@ -5705,6 +5705,111 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1867870028 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1867870032} + - component: {fileID: 1867870031} + - component: {fileID: 1867870030} + - component: {fileID: 1867870029} + m_Layer: 0 + m_Name: Cube (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1867870029 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1867870028} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1867870030 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1867870028} + 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: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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 &1867870031 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1867870028} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1867870032 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1867870028} + m_LocalRotation: {x: 0, y: 0.016928874, z: 0, w: 0.99985677} + m_LocalPosition: {x: 197.4, y: 67.31, z: 203} + m_LocalScale: {x: 4, y: 0.5, z: 3.723864} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 19 + m_LocalEulerAnglesHint: {x: 0, y: 1.94, z: 0} --- !u!1001 &1879931544 PrefabInstance: m_ObjectHideFlags: 0 From 1ce230135e068794179133c94a53cc995f1398f8 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Tue, 10 Oct 2023 14:03:54 +0200 Subject: [PATCH 05/13] Created and added script to platform for vertical movement --- Assets/Scenes/CraterTown.unity | 81 ++++++++++++++++++- Assets/Scripts/Gamestate/MatchController.cs | 2 +- Assets/Scripts/Platforms.meta | 8 ++ Assets/Scripts/Platforms/PlatformMovement.cs | 41 ++++++++++ .../Platforms/PlatformMovement.cs.meta | 11 +++ 5 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 Assets/Scripts/Platforms.meta create mode 100644 Assets/Scripts/Platforms/PlatformMovement.cs create mode 100644 Assets/Scripts/Platforms/PlatformMovement.cs.meta diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index 98f2e8438..cd0e95868 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -4464,6 +4464,37 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} m_PrefabInstance: {fileID: 1453964790} m_PrefabAsset: {fileID: 0} +--- !u!1 &1501441467 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1501441468} + m_Layer: 0 + m_Name: GameObject (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1501441468 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1501441467} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 252.6, y: 62.03, z: 231.7} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 20 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1504285091 PrefabInstance: m_ObjectHideFlags: 0 @@ -5347,6 +5378,7 @@ GameObject: - component: {fileID: 1746097627} - component: {fileID: 1746097626} - component: {fileID: 1746097625} + - component: {fileID: 1746097629} m_Layer: 0 m_Name: Cube (1) m_TagString: Untagged @@ -5433,13 +5465,29 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1746097624} m_LocalRotation: {x: 0, y: 0.016928874, z: 0, w: 0.99985677} - m_LocalPosition: {x: 252.6, y: 67.31, z: 231.7} + m_LocalPosition: {x: 252.6, y: 62.03, z: 231.7} m_LocalScale: {x: 4, y: 0.5, z: 3.723864} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 14 m_LocalEulerAnglesHint: {x: 0, y: 1.94, z: 0} +--- !u!114 &1746097629 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746097624} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb340f72f7467764ab2b1a9e79bde3bf, type: 3} + m_Name: + m_EditorClassIdentifier: + routepoints: + - {fileID: 1501441468} + - {fileID: 1785816777} + moveSpeed: 5 --- !u!1001 &1776951674 PrefabInstance: m_ObjectHideFlags: 0 @@ -5506,6 +5554,37 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e82874ba34dffc64f840e8d7656aac9b, type: 3} m_PrefabInstance: {fileID: 1776951674} m_PrefabAsset: {fileID: 0} +--- !u!1 &1785816776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1785816777} + m_Layer: 0 + m_Name: GameObject (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1785816777 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1785816776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 252.6, y: 83, z: 231.7} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 21 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1841240306 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Gamestate/MatchController.cs b/Assets/Scripts/Gamestate/MatchController.cs index 06cf99143..41640ed24 100644 --- a/Assets/Scripts/Gamestate/MatchController.cs +++ b/Assets/Scripts/Gamestate/MatchController.cs @@ -94,7 +94,7 @@ void Start() // Makes shooting end quickly if testing with 1 player #if UNITY_EDITOR if (PlayerInputManagerController.Singleton.playerInputs.Count == 1) - roundLength = 5f; + roundLength = 60f; #endif StartNextRound(); diff --git a/Assets/Scripts/Platforms.meta b/Assets/Scripts/Platforms.meta new file mode 100644 index 000000000..11c03591a --- /dev/null +++ b/Assets/Scripts/Platforms.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d74d655be5569d448683f88df12e65c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs b/Assets/Scripts/Platforms/PlatformMovement.cs new file mode 100644 index 000000000..708e6f660 --- /dev/null +++ b/Assets/Scripts/Platforms/PlatformMovement.cs @@ -0,0 +1,41 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class PlatformMovement : MonoBehaviour +{ + +[SerializeField] private List routepoints; +[SerializeField] private float moveSpeed = 5f; +private int nextRoutepointIndex; + +private void Start() +{ + if (routepoints.Count <= 0){ + Debug.LogError("No waypoints specified"); + return; + } + nextRoutepointIndex = 0; +} + +private void FixedUpdate() { + + MovePlatform(); +} +private void MovePlatform() +{ + + transform.position = Vector3.MoveTowards(transform.position, routepoints[nextRoutepointIndex].transform.position, + (moveSpeed * Time.deltaTime)); + + if (Vector3.Distance(routepoints[nextRoutepointIndex].transform.position, transform.position) <= 0) + { + nextRoutepointIndex++; + } + + if (nextRoutepointIndex != routepoints.Count) return; + routepoints.Reverse(); + nextRoutepointIndex = 0; +} + +} \ No newline at end of file diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs.meta b/Assets/Scripts/Platforms/PlatformMovement.cs.meta new file mode 100644 index 000000000..d68cd9a04 --- /dev/null +++ b/Assets/Scripts/Platforms/PlatformMovement.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eb340f72f7467764ab2b1a9e79bde3bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 5f05cf00f2fdb2e386346ed4a1650f605fd89d54 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Wed, 11 Oct 2023 20:50:25 +0200 Subject: [PATCH 06/13] Player may now travel vertically and horizontally with platforms --- Assets/Prefabs/Input/Player.prefab | 2 +- Assets/Scenes/CraterTown.unity | 481 ++++++++++++++++--- Assets/Scripts/Platforms/PlatformMovement.cs | 20 +- 3 files changed, 420 insertions(+), 83 deletions(-) diff --git a/Assets/Prefabs/Input/Player.prefab b/Assets/Prefabs/Input/Player.prefab index 9916f8661..c8661e814 100644 --- a/Assets/Prefabs/Input/Player.prefab +++ b/Assets/Prefabs/Input/Player.prefab @@ -19,7 +19,7 @@ GameObject: - component: {fileID: 7607358150439154286} m_Layer: 0 m_Name: Player - m_TagString: Untagged + m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index cd0e95868..e31ba437a 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -1374,7 +1374,9 @@ GameObject: - component: {fileID: 438877662} - component: {fileID: 438877661} - component: {fileID: 438877660} - - component: {fileID: 438877659} + - component: {fileID: 438877663} + - component: {fileID: 438877664} + - component: {fileID: 438877665} m_Layer: 0 m_Name: Cube (3) m_TagString: Untagged @@ -1382,27 +1384,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!65 &438877659 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 438877658} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} --- !u!23 &438877660 MeshRenderer: m_ObjectHideFlags: 0 @@ -1460,14 +1441,73 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 438877658} - m_LocalRotation: {x: 0, y: 0.20441061, z: 0, w: 0.97888523} - m_LocalPosition: {x: 222.6, y: 70.23, z: 171.6} - m_LocalScale: {x: 4, y: 0.5, z: 3} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 0.5, z: 4} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 16 - m_LocalEulerAnglesHint: {x: 0, y: 23.59, z: 0} + m_Father: {fileID: 1483779470} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!64 &438877663 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 438877658} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &438877664 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 438877658} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 0.8065547, y: 1.3174896, z: 0.8583039} + m_Center: {x: 0.02532053, y: 0.2642746, z: 0.00078386086} +--- !u!114 &438877665 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 438877658} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb340f72f7467764ab2b1a9e79bde3bf, type: 3} + m_Name: + m_EditorClassIdentifier: + routepoints: + - {fileID: 1042958924} + - {fileID: 1369593602} + moveSpeed: 5 --- !u!1001 &511965792 PrefabInstance: m_ObjectHideFlags: 0 @@ -3317,6 +3357,40 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 931047345} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &974049642 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 974049643} + m_Layer: 0 + m_Name: Platform + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &974049643 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 974049642} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 252.6, y: 62.03, z: 231.7} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1746097628} + - {fileID: 1501441468} + - {fileID: 1785816777} + m_Father: {fileID: 0} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1002049212 GameObject: m_ObjectHideFlags: 0 @@ -3422,6 +3496,37 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0.892, y: 73.8, z: 26.72} +--- !u!1 &1042958923 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1042958924} + m_Layer: 0 + m_Name: Routepoint + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1042958924 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1042958923} + 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: 1483779470} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1067453934 PrefabInstance: m_ObjectHideFlags: 0 @@ -3891,6 +3996,37 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e82874ba34dffc64f840e8d7656aac9b, type: 3} m_PrefabInstance: {fileID: 1111088551} m_PrefabAsset: {fileID: 0} +--- !u!1 &1142988779 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1142988780} + m_Layer: 0 + m_Name: Routepoint + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1142988780 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1142988779} + 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: 1716348243} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1176838281 PrefabInstance: m_ObjectHideFlags: 0 @@ -4390,6 +4526,37 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e82874ba34dffc64f840e8d7656aac9b, type: 3} m_PrefabInstance: {fileID: 1339472852} m_PrefabAsset: {fileID: 0} +--- !u!1 &1369593601 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1369593602} + m_Layer: 0 + m_Name: Routepoint (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1369593602 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1369593601} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -35.79, y: 0.39, z: -4.39} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1483779470} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1453964790 PrefabInstance: m_ObjectHideFlags: 0 @@ -4464,6 +4631,40 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 1ac318640a1ef4d7bbcaa7005a0fc42a, type: 3} m_PrefabInstance: {fileID: 1453964790} m_PrefabAsset: {fileID: 0} +--- !u!1 &1483779469 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1483779470} + m_Layer: 0 + m_Name: Platform (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1483779470 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1483779469} + m_LocalRotation: {x: 0, y: 0.23344536, z: 0, w: 0.97236997} + m_LocalPosition: {x: 222.6, y: 70.23, z: 171.6} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 438877662} + - {fileID: 1042958924} + - {fileID: 1369593602} + m_Father: {fileID: 0} + m_RootOrder: 16 + m_LocalEulerAnglesHint: {x: 0, y: 27, z: 0} --- !u!1 &1501441467 GameObject: m_ObjectHideFlags: 0 @@ -4474,7 +4675,7 @@ GameObject: m_Component: - component: {fileID: 1501441468} m_Layer: 0 - m_Name: GameObject (1) + m_Name: Routepoint m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4487,13 +4688,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1501441467} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 252.6, y: 62.03, z: 231.7} + 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: 20 + m_Father: {fileID: 974049643} + m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1504285091 PrefabInstance: @@ -5261,6 +5462,40 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1716348242 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1716348243} + m_Layer: 0 + m_Name: Platform (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1716348243 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1716348242} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 197.4, y: 69.95, z: 203} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1867870032} + - {fileID: 1142988780} + - {fileID: 1978721098} + m_Father: {fileID: 0} + m_RootOrder: 19 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1731240611 GameObject: m_ObjectHideFlags: 0 @@ -5288,8 +5523,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1731240611} m_LocalRotation: {x: 0, y: 0.8422643, z: 0, w: 0.5390648} - m_LocalPosition: {x: -83.2, y: -34.89, z: -50.7} - m_LocalScale: {x: 35.6, y: 6.6, z: 12.800001} + m_LocalPosition: {x: -83.2, y: -32.24, z: -50.7} + m_LocalScale: {x: 35.6, y: 8, z: 12.800001} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1240377018} @@ -5377,8 +5612,9 @@ GameObject: - component: {fileID: 1746097628} - component: {fileID: 1746097627} - component: {fileID: 1746097626} - - component: {fileID: 1746097625} - component: {fileID: 1746097629} + - component: {fileID: 1746097630} + - component: {fileID: 1746097631} m_Layer: 0 m_Name: Cube (1) m_TagString: Untagged @@ -5386,27 +5622,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!65 &1746097625 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1746097624} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} --- !u!23 &1746097626 MeshRenderer: m_ObjectHideFlags: 0 @@ -5464,15 +5679,58 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1746097624} - m_LocalRotation: {x: 0, y: 0.016928874, z: 0, w: 0.99985677} - m_LocalPosition: {x: 252.6, y: 62.03, z: 231.7} - m_LocalScale: {x: 4, y: 0.5, z: 3.723864} + m_LocalRotation: {x: -0, y: 0.016928874, z: -0, w: 0.99985677} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 0.5, z: 4} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 14 + m_Father: {fileID: 974049643} + m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 1.94, z: 0} ---- !u!114 &1746097629 +--- !u!64 &1746097629 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746097624} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &1746097630 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1746097624} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 0.7955951, y: 1.2296982, z: 0.9519615} + m_Center: {x: 0.02009657, y: 0.3348354, z: -0.001423955} +--- !u!114 &1746097631 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -5564,7 +5822,7 @@ GameObject: m_Component: - component: {fileID: 1785816777} m_Layer: 0 - m_Name: GameObject (2) + m_Name: Routepoint (1) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -5577,13 +5835,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1785816776} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 252.6, y: 83, z: 231.7} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 20.970001, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 21 + m_Father: {fileID: 974049643} + m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1841240306 PrefabInstance: @@ -5796,6 +6054,8 @@ GameObject: - component: {fileID: 1867870031} - component: {fileID: 1867870030} - component: {fileID: 1867870029} + - component: {fileID: 1867870034} + - component: {fileID: 1867870033} m_Layer: 0 m_Name: Cube (6) m_TagString: Untagged @@ -5818,12 +6078,12 @@ BoxCollider: serializedVersion: 2 m_Bits: 0 m_LayerOverridePriority: 0 - m_IsTrigger: 0 + m_IsTrigger: 1 m_ProvidesContacts: 0 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} + m_Size: {x: 0.83177525, y: 1.3268893, z: 0.72569287} + m_Center: {x: -0.0037823024, y: 0.32190537, z: 0.032009274} --- !u!23 &1867870030 MeshRenderer: m_ObjectHideFlags: 0 @@ -5881,14 +6141,52 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1867870028} - m_LocalRotation: {x: 0, y: 0.016928874, z: 0, w: 0.99985677} - m_LocalPosition: {x: 197.4, y: 67.31, z: 203} - m_LocalScale: {x: 4, y: 0.5, z: 3.723864} + m_LocalRotation: {x: -0, y: 0.016928874, z: -0, w: 0.99985677} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4, y: 0.5, z: 4} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 19 + m_Father: {fileID: 1716348243} + m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 1.94, z: 0} +--- !u!114 &1867870033 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1867870028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb340f72f7467764ab2b1a9e79bde3bf, type: 3} + m_Name: + m_EditorClassIdentifier: + routepoints: + - {fileID: 1142988780} + - {fileID: 1978721098} + moveSpeed: 5 +--- !u!64 &1867870034 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1867870028} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1001 &1879931544 PrefabInstance: m_ObjectHideFlags: 0 @@ -6266,6 +6564,37 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e82874ba34dffc64f840e8d7656aac9b, type: 3} m_PrefabInstance: {fileID: 1951892089} m_PrefabAsset: {fileID: 0} +--- !u!1 &1978721097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1978721098} + m_Layer: 0 + m_Name: Routepoint (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1978721098 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1978721097} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 57.62, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1716348243} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &2005143899 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs b/Assets/Scripts/Platforms/PlatformMovement.cs index 708e6f660..d15b03d85 100644 --- a/Assets/Scripts/Platforms/PlatformMovement.cs +++ b/Assets/Scripts/Platforms/PlatformMovement.cs @@ -4,7 +4,6 @@ public class PlatformMovement : MonoBehaviour { - [SerializeField] private List routepoints; [SerializeField] private float moveSpeed = 5f; private int nextRoutepointIndex; @@ -26,7 +25,7 @@ private void MovePlatform() { transform.position = Vector3.MoveTowards(transform.position, routepoints[nextRoutepointIndex].transform.position, - (moveSpeed * Time.deltaTime)); + (moveSpeed * Time.deltaTime)); if (Vector3.Distance(routepoints[nextRoutepointIndex].transform.position, transform.position) <= 0) { @@ -34,8 +33,17 @@ private void MovePlatform() } if (nextRoutepointIndex != routepoints.Count) return; - routepoints.Reverse(); - nextRoutepointIndex = 0; -} - + routepoints.Reverse(); + nextRoutepointIndex = 0; + } + private void OnTriggerEnter(Collider other) { + if(other.CompareTag("Player")){ + other.transform.SetParent(transform); + } + } + private void OnTriggerExit(Collider other) { + if(other.CompareTag("Player")){ + other.transform.SetParent(null); + } + } } \ No newline at end of file From dc9077925b3baa76f41af3614d707a1a5ddf313a Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:35:39 +0200 Subject: [PATCH 07/13] Improved box collider size of platforms --- Assets/Scenes/CraterTown.unity | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index e31ba437a..d824f3140 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -1490,8 +1490,8 @@ BoxCollider: m_ProvidesContacts: 0 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 0.8065547, y: 1.3174896, z: 0.8583039} - m_Center: {x: 0.02532053, y: 0.2642746, z: 0.00078386086} + m_Size: {x: 0.9682832, y: 1.3174896, z: 0.926227} + m_Center: {x: -0.028060379, y: 0.2642746, z: -0.0014521034} --- !u!114 &438877665 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5728,8 +5728,8 @@ BoxCollider: m_ProvidesContacts: 0 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 0.7955951, y: 1.2296982, z: 0.9519615} - m_Center: {x: 0.02009657, y: 0.3348354, z: -0.001423955} + m_Size: {x: 0.94927436, y: 1.2296982, z: 0.9567163} + m_Center: {x: 0.004025668, y: 0.3348354, z: 0.0009534359} --- !u!114 &1746097631 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6082,8 +6082,8 @@ BoxCollider: m_ProvidesContacts: 0 m_Enabled: 1 serializedVersion: 3 - m_Size: {x: 0.83177525, y: 1.3268893, z: 0.72569287} - m_Center: {x: -0.0037823024, y: 0.32190537, z: 0.032009274} + m_Size: {x: 0.91678363, y: 1.3268893, z: 0.96191365} + m_Center: {x: 0.00009521839, y: 0.32190537, z: 0.0075095003} --- !u!23 &1867870030 MeshRenderer: m_ObjectHideFlags: 0 From bef82cc1f6539dfe6baa8d67e4bfe7db3db06974 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:26:39 +0200 Subject: [PATCH 08/13] Implemented variation of platform speed --- Assets/Scenes/CraterTown.unity | 18 +++++++-------- Assets/Scripts/Platforms/PlatformMovement.cs | 23 +++++++++++++++----- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index d824f3140..f0f7aceea 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -1442,7 +1442,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 438877658} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 1.23, y: -0.34, z: -0.24} m_LocalScale: {x: 4, y: 0.5, z: 4} m_ConstrainProportionsScale: 0 m_Children: [] @@ -3520,7 +3520,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1042958923} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 1.23, y: -0.34, z: -0.24} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -4020,7 +4020,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1142988779} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: -2.27, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -4550,7 +4550,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1369593601} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -35.79, y: 0.39, z: -4.39} + m_LocalPosition: {x: -34.73, y: -0.41, z: -0.37} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -4689,7 +4689,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1501441467} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: -0.64, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -5680,7 +5680,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1746097624} m_LocalRotation: {x: -0, y: 0.016928874, z: -0, w: 0.99985677} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: -0.64, z: 0} m_LocalScale: {x: 4, y: 0.5, z: 4} m_ConstrainProportionsScale: 0 m_Children: [] @@ -6141,14 +6141,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1867870028} - m_LocalRotation: {x: -0, y: 0.016928874, z: -0, w: 0.99985677} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: 0, y: 0.003665198, z: 0, w: 0.9999933} + m_LocalPosition: {x: -2.27, y: 0, z: 0} m_LocalScale: {x: 4, y: 0.5, z: 4} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1716348243} m_RootOrder: -1 - m_LocalEulerAnglesHint: {x: 0, y: 1.94, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0.42, z: 0} --- !u!114 &1867870033 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs b/Assets/Scripts/Platforms/PlatformMovement.cs index d15b03d85..30e034537 100644 --- a/Assets/Scripts/Platforms/PlatformMovement.cs +++ b/Assets/Scripts/Platforms/PlatformMovement.cs @@ -7,14 +7,16 @@ public class PlatformMovement : MonoBehaviour [SerializeField] private List routepoints; [SerializeField] private float moveSpeed = 5f; private int nextRoutepointIndex; - +private float travelDistance; private void Start() { + nextRoutepointIndex = 0; + + travelDistance = Vector3.Distance(routepoints[nextRoutepointIndex + 1].transform.position, transform.position); if (routepoints.Count <= 0){ - Debug.LogError("No waypoints specified"); + Debug.LogWarning("No routepoints specified"); return; } - nextRoutepointIndex = 0; } private void FixedUpdate() { @@ -23,14 +25,25 @@ private void FixedUpdate() { } private void MovePlatform() { - + float currentDistance = Vector3.Distance(routepoints[nextRoutepointIndex].transform.position, transform.position); + transform.position = Vector3.MoveTowards(transform.position, routepoints[nextRoutepointIndex].transform.position, (moveSpeed * Time.deltaTime)); - if (Vector3.Distance(routepoints[nextRoutepointIndex].transform.position, transform.position) <= 0) + if (currentDistance <= 0) { nextRoutepointIndex++; } + if (currentDistance < 2 || currentDistance + 2 >= travelDistance) + { + moveSpeed = 2f; + + Debug.Log("travel:" + travelDistance); + Debug.Log("current:" + currentDistance); + + }else{ + moveSpeed = 5f; + } if (nextRoutepointIndex != routepoints.Count) return; routepoints.Reverse(); From c956e42492a53a9a5d405ae41c81f7ff60fd1bad Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Sun, 15 Oct 2023 18:07:08 +0200 Subject: [PATCH 09/13] Platform movement is reversed upon player collision below --- Assets/Scenes/CraterTown.unity | 68 +++++++++++++++++++ Assets/Scripts/Platforms/PlatformCollision.cs | 17 +++++ .../Platforms/PlatformCollision.cs.meta | 11 +++ Assets/Scripts/Platforms/PlatformMovement.cs | 12 ++-- 4 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 Assets/Scripts/Platforms/PlatformCollision.cs create mode 100644 Assets/Scripts/Platforms/PlatformCollision.cs.meta diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index f0f7aceea..124c0746d 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -3388,6 +3388,7 @@ Transform: - {fileID: 1746097628} - {fileID: 1501441468} - {fileID: 1785816777} + - {fileID: 1041212752} m_Father: {fileID: 0} m_RootOrder: 14 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -3496,6 +3497,73 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0.892, y: 73.8, z: 26.72} +--- !u!1 &1041212751 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1041212752} + - component: {fileID: 1041212753} + - component: {fileID: 1041212754} + m_Layer: 0 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1041212752 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1041212751} + 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: 974049643} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1041212753 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1041212751} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 3.6315613, y: 0.43898773, z: 3.6156006} + m_Center: {x: 0.0256958, y: -0.8325424, z: 0.008285522} +--- !u!114 &1041212754 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1041212751} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 99aed0618e383a64abfb9827baa90149, type: 3} + m_Name: + m_EditorClassIdentifier: + platformMovement: {fileID: 1746097631} --- !u!1 &1042958923 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Platforms/PlatformCollision.cs b/Assets/Scripts/Platforms/PlatformCollision.cs new file mode 100644 index 000000000..23c619d5f --- /dev/null +++ b/Assets/Scripts/Platforms/PlatformCollision.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +public class PlatformCollision: MonoBehaviour +{ + + [SerializeField] private PlatformMovement platformMovement; + private List startRoutepoints; + private void Start() { + startRoutepoints = platformMovement.routepoints; + } + private void OnTriggerEnter(Collider other) { + if(other.CompareTag("Player")){ + platformMovement.routepoints.Reverse(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Platforms/PlatformCollision.cs.meta b/Assets/Scripts/Platforms/PlatformCollision.cs.meta new file mode 100644 index 000000000..ccc4d437a --- /dev/null +++ b/Assets/Scripts/Platforms/PlatformCollision.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 99aed0618e383a64abfb9827baa90149 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs b/Assets/Scripts/Platforms/PlatformMovement.cs index 30e034537..c2bb2686f 100644 --- a/Assets/Scripts/Platforms/PlatformMovement.cs +++ b/Assets/Scripts/Platforms/PlatformMovement.cs @@ -4,12 +4,18 @@ public class PlatformMovement : MonoBehaviour { -[SerializeField] private List routepoints; +public List routepoints; [SerializeField] private float moveSpeed = 5f; private int nextRoutepointIndex; private float travelDistance; +private Collider sphereCollider; +private Collider meshCollider; + private void Start() { + sphereCollider = GetComponent(); + meshCollider = GetComponent(); + nextRoutepointIndex = 0; travelDistance = Vector3.Distance(routepoints[nextRoutepointIndex + 1].transform.position, transform.position); @@ -38,9 +44,6 @@ private void MovePlatform() { moveSpeed = 2f; - Debug.Log("travel:" + travelDistance); - Debug.Log("current:" + currentDistance); - }else{ moveSpeed = 5f; } @@ -49,6 +52,7 @@ private void MovePlatform() routepoints.Reverse(); nextRoutepointIndex = 0; } + private void OnTriggerEnter(Collider other) { if(other.CompareTag("Player")){ other.transform.SetParent(transform); From b21682d1fd47a33d4c170b45dad0e85d4a4717bf Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:43:34 +0200 Subject: [PATCH 10/13] Code clean up --- Assets/Scripts/Platforms/PlatformCollision.cs | 8 ++------ Assets/Scripts/Platforms/PlatformMovement.cs | 8 +------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Assets/Scripts/Platforms/PlatformCollision.cs b/Assets/Scripts/Platforms/PlatformCollision.cs index 23c619d5f..ae7436009 100644 --- a/Assets/Scripts/Platforms/PlatformCollision.cs +++ b/Assets/Scripts/Platforms/PlatformCollision.cs @@ -3,15 +3,11 @@ using UnityEngine; public class PlatformCollision: MonoBehaviour { - [SerializeField] private PlatformMovement platformMovement; - private List startRoutepoints; - private void Start() { - startRoutepoints = platformMovement.routepoints; - } + private void OnTriggerEnter(Collider other) { if(other.CompareTag("Player")){ platformMovement.routepoints.Reverse(); } } -} \ No newline at end of file +} diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs b/Assets/Scripts/Platforms/PlatformMovement.cs index c2bb2686f..98ff8dbe6 100644 --- a/Assets/Scripts/Platforms/PlatformMovement.cs +++ b/Assets/Scripts/Platforms/PlatformMovement.cs @@ -8,14 +8,8 @@ public class PlatformMovement : MonoBehaviour [SerializeField] private float moveSpeed = 5f; private int nextRoutepointIndex; private float travelDistance; -private Collider sphereCollider; -private Collider meshCollider; - private void Start() { - sphereCollider = GetComponent(); - meshCollider = GetComponent(); - nextRoutepointIndex = 0; travelDistance = Vector3.Distance(routepoints[nextRoutepointIndex + 1].transform.position, transform.position); @@ -63,4 +57,4 @@ private void OnTriggerExit(Collider other) { other.transform.SetParent(null); } } -} \ No newline at end of file +} From f080c78e3a6d9745fca4f28d7c801f8ff6f3aca1 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Sun, 15 Oct 2023 20:19:49 +0200 Subject: [PATCH 11/13] Improved code based on feedback --- Assets/Prefabs/Input/Player.prefab | 2 +- Assets/Scenes/CraterTown.unity | 2 +- Assets/Scripts/Platforms/PlatformCollision.cs | 5 +- Assets/Scripts/Platforms/PlatformMovement.cs | 77 ++++++++++--------- 4 files changed, 45 insertions(+), 41 deletions(-) diff --git a/Assets/Prefabs/Input/Player.prefab b/Assets/Prefabs/Input/Player.prefab index c8661e814..9916f8661 100644 --- a/Assets/Prefabs/Input/Player.prefab +++ b/Assets/Prefabs/Input/Player.prefab @@ -19,7 +19,7 @@ GameObject: - component: {fileID: 7607358150439154286} m_Layer: 0 m_Name: Player - m_TagString: Player + m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index 124c0746d..deb32f0aa 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -3509,7 +3509,7 @@ GameObject: - component: {fileID: 1041212753} - component: {fileID: 1041212754} m_Layer: 0 - m_Name: GameObject + m_Name: CollisionDetector m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/Scripts/Platforms/PlatformCollision.cs b/Assets/Scripts/Platforms/PlatformCollision.cs index ae7436009..82c7ee181 100644 --- a/Assets/Scripts/Platforms/PlatformCollision.cs +++ b/Assets/Scripts/Platforms/PlatformCollision.cs @@ -3,10 +3,11 @@ using UnityEngine; public class PlatformCollision: MonoBehaviour { - [SerializeField] private PlatformMovement platformMovement; + [SerializeField] + private PlatformMovement platformMovement; private void OnTriggerEnter(Collider other) { - if(other.CompareTag("Player")){ + if(other.gameObject.TryGetComponent(out PlayerManager playerManager)){ platformMovement.routepoints.Reverse(); } } diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs b/Assets/Scripts/Platforms/PlatformMovement.cs index 98ff8dbe6..0fed34bfe 100644 --- a/Assets/Scripts/Platforms/PlatformMovement.cs +++ b/Assets/Scripts/Platforms/PlatformMovement.cs @@ -4,56 +4,59 @@ public class PlatformMovement : MonoBehaviour { -public List routepoints; -[SerializeField] private float moveSpeed = 5f; -private int nextRoutepointIndex; -private float travelDistance; -private void Start() -{ - nextRoutepointIndex = 0; - - travelDistance = Vector3.Distance(routepoints[nextRoutepointIndex + 1].transform.position, transform.position); - if (routepoints.Count <= 0){ - Debug.LogWarning("No routepoints specified"); - return; - } -} - -private void FixedUpdate() { - - MovePlatform(); -} -private void MovePlatform() -{ - float currentDistance = Vector3.Distance(routepoints[nextRoutepointIndex].transform.position, transform.position); + public List routepoints; - transform.position = Vector3.MoveTowards(transform.position, routepoints[nextRoutepointIndex].transform.position, - (moveSpeed * Time.deltaTime)); - - if (currentDistance <= 0) + [SerializeField] + private float moveSpeed = 5f; + private int nextRoutepointIndex; + private float travelDistance; + private void Start() { - nextRoutepointIndex++; + nextRoutepointIndex = 0; + + travelDistance = Vector3.Distance(routepoints[nextRoutepointIndex + 1].transform.position, transform.position); + if (routepoints.Count <= 0){ + Debug.LogWarning("No routepoints specified"); + return; + } } - if (currentDistance < 2 || currentDistance + 2 >= travelDistance) - { - moveSpeed = 2f; - }else{ - moveSpeed = 5f; + private void FixedUpdate() { + MovePlatform(); } - if (nextRoutepointIndex != routepoints.Count) return; - routepoints.Reverse(); - nextRoutepointIndex = 0; + private void MovePlatform() + { + float currentDistance = Vector3.Distance(routepoints[nextRoutepointIndex].transform.position, transform.position); + + transform.position = Vector3.MoveTowards(transform.position, routepoints[nextRoutepointIndex].transform.position, + moveSpeed * Time.deltaTime); + + if (currentDistance <= 0) + { + nextRoutepointIndex++; + } + if (currentDistance < 2 || currentDistance + 2 >= travelDistance) + { + moveSpeed = 2f; + + }else{ + moveSpeed = 5f; + } + + if (nextRoutepointIndex != routepoints.Count) return; + + routepoints.Reverse(); + nextRoutepointIndex = 0; } private void OnTriggerEnter(Collider other) { - if(other.CompareTag("Player")){ + if(other.gameObject.TryGetComponent(out PlayerManager playerManager)){ other.transform.SetParent(transform); } } private void OnTriggerExit(Collider other) { - if(other.CompareTag("Player")){ + if(other.gameObject.TryGetComponent(out PlayerManager playerManager)){ other.transform.SetParent(null); } } From 72d93971178a16e898e394c7222f39a24521da27 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Sun, 15 Oct 2023 20:42:49 +0200 Subject: [PATCH 12/13] Fixed indent in PlatformMovement.cs --- Assets/Scripts/Platforms/PlatformMovement.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Platforms/PlatformMovement.cs b/Assets/Scripts/Platforms/PlatformMovement.cs index 0fed34bfe..90388e046 100644 --- a/Assets/Scripts/Platforms/PlatformMovement.cs +++ b/Assets/Scripts/Platforms/PlatformMovement.cs @@ -46,8 +46,8 @@ private void MovePlatform() if (nextRoutepointIndex != routepoints.Count) return; - routepoints.Reverse(); - nextRoutepointIndex = 0; + routepoints.Reverse(); + nextRoutepointIndex = 0; } private void OnTriggerEnter(Collider other) { From 6b460e462871f6a66a1c9ca528215be28e8a9a83 Mon Sep 17 00:00:00 2001 From: Karo Mahmoud <116388350+karofmah@users.noreply.github.com> Date: Sun, 15 Oct 2023 21:01:20 +0200 Subject: [PATCH 13/13] Improved file and gameobject name --- Assets/Scenes/CraterTown.unity | 4 ++-- .../{PlatformCollision.cs => SquishCollisionHandler.cs} | 2 +- ...atformCollision.cs.meta => SquishCollisionHandler.cs.meta} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename Assets/Scripts/Platforms/{PlatformCollision.cs => SquishCollisionHandler.cs} (87%) rename Assets/Scripts/Platforms/{PlatformCollision.cs.meta => SquishCollisionHandler.cs.meta} (83%) diff --git a/Assets/Scenes/CraterTown.unity b/Assets/Scenes/CraterTown.unity index deb32f0aa..8ea097b44 100644 --- a/Assets/Scenes/CraterTown.unity +++ b/Assets/Scenes/CraterTown.unity @@ -3509,7 +3509,7 @@ GameObject: - component: {fileID: 1041212753} - component: {fileID: 1041212754} m_Layer: 0 - m_Name: CollisionDetector + m_Name: SquishDetector m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -3560,7 +3560,7 @@ MonoBehaviour: m_GameObject: {fileID: 1041212751} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 99aed0618e383a64abfb9827baa90149, type: 3} + m_Script: {fileID: 11500000, guid: b0618cfc4c641414499db68532cc682f, type: 3} m_Name: m_EditorClassIdentifier: platformMovement: {fileID: 1746097631} diff --git a/Assets/Scripts/Platforms/PlatformCollision.cs b/Assets/Scripts/Platforms/SquishCollisionHandler.cs similarity index 87% rename from Assets/Scripts/Platforms/PlatformCollision.cs rename to Assets/Scripts/Platforms/SquishCollisionHandler.cs index 82c7ee181..ef663ede1 100644 --- a/Assets/Scripts/Platforms/PlatformCollision.cs +++ b/Assets/Scripts/Platforms/SquishCollisionHandler.cs @@ -1,7 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class PlatformCollision: MonoBehaviour +public class SquishCollisionHandler: MonoBehaviour { [SerializeField] private PlatformMovement platformMovement; diff --git a/Assets/Scripts/Platforms/PlatformCollision.cs.meta b/Assets/Scripts/Platforms/SquishCollisionHandler.cs.meta similarity index 83% rename from Assets/Scripts/Platforms/PlatformCollision.cs.meta rename to Assets/Scripts/Platforms/SquishCollisionHandler.cs.meta index ccc4d437a..cef697cc1 100644 --- a/Assets/Scripts/Platforms/PlatformCollision.cs.meta +++ b/Assets/Scripts/Platforms/SquishCollisionHandler.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 99aed0618e383a64abfb9827baa90149 +guid: b0618cfc4c641414499db68532cc682f MonoImporter: externalObjects: {} serializedVersion: 2