From 368cb904645b04b209761c3545ae146df252d3e6 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Thu, 25 Mar 2021 11:58:40 +0000 Subject: [PATCH 1/2] respawn in middle of safe zone --- game/Assets/Scripts/Checkpoint/SafeZone.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game/Assets/Scripts/Checkpoint/SafeZone.cs b/game/Assets/Scripts/Checkpoint/SafeZone.cs index cb35084..859b957 100644 --- a/game/Assets/Scripts/Checkpoint/SafeZone.cs +++ b/game/Assets/Scripts/Checkpoint/SafeZone.cs @@ -16,6 +16,9 @@ public class SafeZone : MonoBehaviour { if (other.gameObject.CompareTag(PLAYER)) { + // set position to middle of safe zone + _respawnPosition.Value = transform.position; + // start counting safe time when we enter a safe zone _safeTime.Value = 0; } @@ -26,8 +29,6 @@ public class SafeZone : MonoBehaviour // Check if other game object is Player. if (other.gameObject.CompareTag(PLAYER)) { - _respawnPosition.Value = other.gameObject.transform.position; - // TODO: does this have implications for the time freeze ability? _safeTime.Value += Time.deltaTime; } From 7041d71c6f58eb2e425d8e78f71cb0a7a3c69212 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Thu, 25 Mar 2021 17:24:17 +0000 Subject: [PATCH 2/2] fix safe zone scale and appearance in builds --- game/Assets/Prefabs/Zones/Safe Zone.prefab | 2 +- game/Assets/Scenes/Main.unity | 38 ++++++++++------------ 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/game/Assets/Prefabs/Zones/Safe Zone.prefab b/game/Assets/Prefabs/Zones/Safe Zone.prefab index f5fd885..55206b2 100644 --- a/game/Assets/Prefabs/Zones/Safe Zone.prefab +++ b/game/Assets/Prefabs/Zones/Safe Zone.prefab @@ -48,7 +48,7 @@ MeshRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1150255153773548759} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 diff --git a/game/Assets/Scenes/Main.unity b/game/Assets/Scenes/Main.unity index cfd5b10..b4f78a5 100644 --- a/game/Assets/Scenes/Main.unity +++ b/game/Assets/Scenes/Main.unity @@ -1485,10 +1485,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 3340651998927408399, guid: e182e6daf2f187b45a07e7c89e3f1b55, type: 3} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - target: {fileID: 3340651998927408401, guid: e182e6daf2f187b45a07e7c89e3f1b55, type: 3} propertyPath: m_Name value: Kill Plane @@ -2739,15 +2735,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.x - value: 0.32097137 + value: 2.072769 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.z - value: 0.15426409 + value: 1.5557534 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.x - value: 8.435 + value: 7.963 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.y @@ -2755,7 +2751,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.z - value: -0.523 + value: 0.1 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalRotation.w @@ -3374,15 +3370,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.x - value: 0.32097137 + value: 3.5285494 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.z - value: 0.09717957 + value: 1.2645004 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.x - value: 2.677 + value: 2.802 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.y @@ -3390,7 +3386,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.z - value: 7.077 + value: 6.911 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalRotation.w @@ -4210,15 +4206,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.x - value: 0.1499977 + value: 1.6366249 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.z - value: 0.37136212 + value: 1.8758615 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.x - value: -5.143 + value: -4.686 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.y @@ -4226,7 +4222,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.z - value: 22.181 + value: 21.23 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalRotation.w @@ -6045,23 +6041,23 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.x - value: 0.149289 + value: 1.7674171 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalScale.z - value: 0.37136212 + value: 1.8337119 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.x - value: -1.25 + value: -1.478 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.y - value: 3.023 + value: 3.111 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalPosition.z - value: 13.88 + value: 14.354 objectReference: {fileID: 0} - target: {fileID: 4449396798674854634, guid: 373acc46f7fa7eb4b9cfba9c3e17b6ca, type: 3} propertyPath: m_LocalRotation.w