Bug Fix
This commit is contained in:
		@@ -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);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user