From 91c0fc68d780b87e9fdeaeb97a4d19a7e0989b61 Mon Sep 17 00:00:00 2001 From: GamerClassN7 Date: Sun, 30 Jan 2022 11:57:52 +0100 Subject: [PATCH] Bug Fix --- Assets/Scripts/ProceduralGeneration.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/ProceduralGeneration.cs b/Assets/Scripts/ProceduralGeneration.cs index 51ade37..5adf886 100644 --- a/Assets/Scripts/ProceduralGeneration.cs +++ b/Assets/Scripts/ProceduralGeneration.cs @@ -109,6 +109,12 @@ public class ProceduralGeneration : MonoBehaviour // Update is called once per frame void Update() { + + // if (playerControlsSript.isFalling) + // { + // return; + // } + Vector3 playerPosition = this.player.transform.position; PlayerController playerControlsSript = this.player.GetComponent(); @@ -120,11 +126,6 @@ public class ProceduralGeneration : MonoBehaviour } } - if (playerControlsSript.isFalling) - { - return; - } - for (var i = 0; i < this.backgroundLevelBlocks.Count; i++) { float distance = Vector3.Distance(this.backgroundLevelBlocks[i].transform.position, playerPosition);