diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2019-04-27 21:29:07 +0200 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2019-04-27 21:29:07 +0200 |
commit | 529f858949fb2aef71692cc127c22a9a20008ada (patch) | |
tree | a07f11cb2d2dce01cf33930e80df10d16a1b6f2e | |
parent | 0461d20e8e074d24c71a49516e68681ad0dc81dd (diff) |
Fixed errors after cave walls run out
-rw-r--r-- | nGJ2019/Assets/Scripts/LevelScrolling.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nGJ2019/Assets/Scripts/LevelScrolling.cs b/nGJ2019/Assets/Scripts/LevelScrolling.cs index fac0a13..9835f0e 100644 --- a/nGJ2019/Assets/Scripts/LevelScrolling.cs +++ b/nGJ2019/Assets/Scripts/LevelScrolling.cs @@ -63,7 +63,7 @@ public class LevelScrolling : MonoBehaviour void DestroyObstacles()
{
- if (Obstacles[0].transform.position.x < -30)
+ if (Obstacles.Count > 0 && Obstacles[0].transform.position.x < -30)
{
Destroy(Obstacles[0]);
Obstacles.RemoveAt(0);
|