From 83cd280778454856417177aec361d0fedf008eb2 Mon Sep 17 00:00:00 2001 From: Programmer-DField Date: Wed, 24 Feb 2021 23:41:33 +0000 Subject: [PATCH] Working to get the trap system working. Added a prototype for the spike trap. Need to work on the code to get the floor to fall away under the player. --- game/Assets/FallawayFloor.cs | 12 + game/Assets/FallawayFloor.cs.meta | 11 + game/Assets/Prefabs/Player.prefab | 4 +- game/Assets/Scenes/Main.unity | 922 ++++++++++++++++-- game/Assets/Scripts/Checkpoint/SafeZone.cs | 4 +- .../Scripts/Death & Respawn/DeathZone.cs | 2 +- 6 files changed, 893 insertions(+), 62 deletions(-) create mode 100644 game/Assets/FallawayFloor.cs create mode 100644 game/Assets/FallawayFloor.cs.meta diff --git a/game/Assets/FallawayFloor.cs b/game/Assets/FallawayFloor.cs new file mode 100644 index 0000000..ad1747f --- /dev/null +++ b/game/Assets/FallawayFloor.cs @@ -0,0 +1,12 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class FallawayFloor : MonoBehaviour +{ + IEnumerator OnCollisionEnter(Collision coll) + { + yield return new WaitForSeconds(2); + Destroy(gameObject); + } +} diff --git a/game/Assets/FallawayFloor.cs.meta b/game/Assets/FallawayFloor.cs.meta new file mode 100644 index 0000000..db87b1f --- /dev/null +++ b/game/Assets/FallawayFloor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 425c126c97ce3fb438fa3ef015d37317 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Prefabs/Player.prefab b/game/Assets/Prefabs/Player.prefab index 25cbdd5..2a5c0e6 100644 --- a/game/Assets/Prefabs/Player.prefab +++ b/game/Assets/Prefabs/Player.prefab @@ -98,7 +98,7 @@ GameObject: - component: {fileID: 3320306143821152633} m_Layer: 0 m_Name: Player - m_TagString: Untagged + m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -111,7 +111,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 13726836969441781} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.157, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 13726837642651460} diff --git a/game/Assets/Scenes/Main.unity b/game/Assets/Scenes/Main.unity index dda3c83..c1c7432 100644 --- a/game/Assets/Scenes/Main.unity +++ b/game/Assets/Scenes/Main.unity @@ -123,6 +123,257 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &34418842 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 34418844} + - component: {fileID: 34418843} + - component: {fileID: 34418845} + m_Layer: 0 + m_Name: GameManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &34418843 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 34418842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4a7f7dc8ddb842944abcbcbb1d4995f5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &34418844 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 34418842} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 4.3810477, y: -1.0937972, z: 60.18017} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1509348081} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &34418845 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 34418842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4a7f7dc8ddb842944abcbcbb1d4995f5, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &38412567 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 38412568} + - component: {fileID: 38412571} + - component: {fileID: 38412570} + - component: {fileID: 38412569} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &38412568 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 38412567} + m_LocalRotation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5} + m_LocalPosition: {x: 9.936016, y: 4.1548176, z: 3.5365372} + m_LocalScale: {x: 3.1289, y: 1, z: 9.605558} + m_Children: [] + m_Father: {fileID: 2018660589} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 90} +--- !u!65 &38412569 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 38412567} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &38412570 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 38412567} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + 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 &38412571 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 38412567} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &114717650 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 114717651} + - component: {fileID: 114717654} + - component: {fileID: 114717653} + - component: {fileID: 114717652} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &114717651 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114717650} + m_LocalRotation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5} + m_LocalPosition: {x: 9.936016, y: 4.1548176, z: -5.0034637} + m_LocalScale: {x: 3.1289, y: 1, z: 9.605558} + m_Children: [] + m_Father: {fileID: 2018660589} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 90} +--- !u!65 &114717652 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114717650} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &114717653 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114717650} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + 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 &114717654 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114717650} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &155900315 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + m_PrefabInstance: {fileID: 1316034057} + m_PrefabAsset: {fileID: 0} --- !u!1 &349701919 GameObject: m_ObjectHideFlags: 0 @@ -407,6 +658,118 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &519958730 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 519958731} + - component: {fileID: 519958735} + - component: {fileID: 519958734} + - component: {fileID: 519958732} + - component: {fileID: 519958733} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &519958731 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519958730} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.44, z: 0} + m_LocalScale: {x: 0.69935423, y: 1, z: 0.68767} + m_Children: [] + m_Father: {fileID: 1544718415} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &519958732 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519958730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f1d0f28dfb6a7245ac9ab4193aaed55, type: 3} + m_Name: + m_EditorClassIdentifier: + animator: {fileID: 1646361029} + fadeScreen: {fileID: 0} + respawnManager: {fileID: 34418843} + _playerInput: {fileID: 1646361025} +--- !u!65 &519958733 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519958730} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 10, y: 2.220446e-16, z: 9.999999} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &519958734 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519958730} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + 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 &519958735 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519958730} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1148358018 GameObject: m_ObjectHideFlags: 0 @@ -550,6 +913,71 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1316034057 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 2018660589} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalScale.x + value: 2.4528294 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalScale.z + value: 3.529492 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalPosition.x + value: 9.816017 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalPosition.y + value: 2.6648173 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalPosition.z + value: -0.43346405 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: c05280569c267224f87de839cb102b18, type: 3} + propertyPath: m_Name + value: SpikeTrap_low (7) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c05280569c267224f87de839cb102b18, type: 3} --- !u!1 &1509348080 GameObject: m_ObjectHideFlags: 0 @@ -584,8 +1012,97 @@ Transform: - {fileID: 1148358022} - {fileID: 1908415563} - {fileID: 470223360} + - {fileID: 34418844} m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1528237030 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalPosition.y + value: 0.157 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 13726836969441781, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + propertyPath: m_Name + value: Player + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} +--- !u!1 &1544718414 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1544718415} + m_Layer: 0 + m_Name: DeathZones + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1544718415 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1544718414} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.95, y: 0.15, z: 65.07} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 519958731} + m_Father: {fileID: 0} + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1551303224 GameObject: @@ -724,7 +1241,182 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1644003337 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1644003338} + - component: {fileID: 1644003342} + - component: {fileID: 1644003341} + - component: {fileID: 1644003340} + - component: {fileID: 1644003339} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1644003338 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1644003337} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 17.644665, y: 2.59, z: 2.562397} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1841136307} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1644003339 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1644003337} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45048530c51ef5e4196d4fa70972441c, type: 3} + m_Name: + m_EditorClassIdentifier: + _respawnManager: {fileID: 34418843} +--- !u!65 &1644003340 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1644003337} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 10, y: 2.220446e-16, z: 10} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1644003341 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1644003337} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + 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 &1644003342 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1644003337} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1646361021 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 13726836969441781, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + m_PrefabInstance: {fileID: 1528237030} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1646361025 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 13726836969441780, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + m_PrefabInstance: {fileID: 1528237030} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1646361021} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!95 &1646361029 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1646361021} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: bd12efafa4115114f90ba79feeb4e8b0, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &1841136306 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1841136307} + m_Layer: 0 + m_Name: SafeZones + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1841136307 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1841136306} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.6846654, y: -2.1454198, z: 52.347603} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1644003338} + m_Father: {fileID: 0} + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1908415559 GameObject: @@ -821,60 +1513,176 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &13726837176080777 -PrefabInstance: +--- !u!1 &1995811568 +GameObject: m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1995811569} + - component: {fileID: 1995811572} + - component: {fileID: 1995811571} + - component: {fileID: 1995811570} + - component: {fileID: 1995811573} + - component: {fileID: 1995811574} + - component: {fileID: 1995811575} + m_Layer: 0 + m_Name: Floor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1995811569 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1995811568} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 10.216017, y: 5.48, z: -0.8434677} + m_LocalScale: {x: 3.1289, y: 0.13889, z: 6.7626376} + m_Children: [] + m_Father: {fileID: 2018660589} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1995811570 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1995811568} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441544, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13726836969441781, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} - propertyPath: m_Name - value: Player - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 1, z: 0} +--- !u!23 &1995811571 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1995811568} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + 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 &1995811572 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1995811568} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &1995811573 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1995811568} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &1995811574 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1995811568} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 425c126c97ce3fb438fa3ef015d37317, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!65 &1995811575 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1995811568} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1.0000001, z: 0.99999994} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &2018660588 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2018660589} + m_Layer: 0 + m_Name: Traps + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2018660589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2018660588} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.8960166, y: -2.6448174, z: 65.653465} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1995811569} + - {fileID: 38412568} + - {fileID: 114717651} + - {fileID: 155900315} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/game/Assets/Scripts/Checkpoint/SafeZone.cs b/game/Assets/Scripts/Checkpoint/SafeZone.cs index 5739af9..0eb198a 100644 --- a/game/Assets/Scripts/Checkpoint/SafeZone.cs +++ b/game/Assets/Scripts/Checkpoint/SafeZone.cs @@ -13,7 +13,7 @@ public class SafeZone : MonoBehaviour private void OnTriggerEnter(Collider other) { // Check to see if other collider is Player. If true set player to other game object. - if (other.gameObject.name == "Player") + if (other.gameObject.tag == "Player") { isSafe = true; player = other.gameObject; @@ -23,7 +23,7 @@ public class SafeZone : MonoBehaviour private void OnTriggerExit(Collider other) { // Check if other game object is Player. - if (other.gameObject.name == "Player") + if (other.gameObject.tag == "Player") { isSafe = false; } diff --git a/game/Assets/Scripts/Death & Respawn/DeathZone.cs b/game/Assets/Scripts/Death & Respawn/DeathZone.cs index 08f9a64..df498f0 100644 --- a/game/Assets/Scripts/Death & Respawn/DeathZone.cs +++ b/game/Assets/Scripts/Death & Respawn/DeathZone.cs @@ -14,7 +14,7 @@ public class DeathZone : MonoBehaviour private void OnTriggerEnter(Collider other) { // Checks to make sure other collider is the Player. Sets player variable as Player game object and starts the coroutine. - if (other.gameObject.name == "Player") + if (other.gameObject.tag == "Player") { player = other.gameObject; StartCoroutine(RespawnPlayer());