From 01576b7facd3ccb9193dc413dbf9af0c71abcd1f Mon Sep 17 00:00:00 2001 From: DrCash-KMark <69468683+DrCash-KMark@users.noreply.github.com> Date: Thu, 12 Aug 2021 08:36:02 +0200 Subject: [PATCH] fix for scroller fixed out of array problem when the bg loop should start --- Assets/Scripts/BackgroundRoller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/BackgroundRoller.cs b/Assets/Scripts/BackgroundRoller.cs index dfbb816..6dcb852 100644 --- a/Assets/Scripts/BackgroundRoller.cs +++ b/Assets/Scripts/BackgroundRoller.cs @@ -32,7 +32,7 @@ public class BackgroundRoller : MonoBehaviour if (currentSprite >= bgSprites.Count - 1) { - currentSprite = -1; //never do this at home kids + currentSprite = 0; //never do this at home kids } //if there are sprites left & we are over half the height, we instantiate another sprite at the top -- GitLab