This commit is contained in:
GamerClassN7 2022-01-30 11:57:52 +01:00
parent 1282b4c8cb
commit 91c0fc68d7

View File

@ -109,6 +109,12 @@ public class ProceduralGeneration : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
// if (playerControlsSript.isFalling)
// {
// return;
// }
Vector3 playerPosition = this.player.transform.position; Vector3 playerPosition = this.player.transform.position;
PlayerController playerControlsSript = this.player.GetComponent<PlayerController>(); PlayerController playerControlsSript = this.player.GetComponent<PlayerController>();
@ -120,11 +126,6 @@ public class ProceduralGeneration : MonoBehaviour
} }
} }
if (playerControlsSript.isFalling)
{
return;
}
for (var i = 0; i < this.backgroundLevelBlocks.Count; i++) for (var i = 0; i < this.backgroundLevelBlocks.Count; i++)
{ {
float distance = Vector3.Distance(this.backgroundLevelBlocks[i].transform.position, playerPosition); float distance = Vector3.Distance(this.backgroundLevelBlocks[i].transform.position, playerPosition);