aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'nGJ2019/Assets')
-rw-r--r--nGJ2019/Assets/Scripts/LevelScrolling.cs27
-rw-r--r--nGJ2019/Assets/Scripts/ObstacleSpawner.cs12
2 files changed, 22 insertions, 17 deletions
diff --git a/nGJ2019/Assets/Scripts/LevelScrolling.cs b/nGJ2019/Assets/Scripts/LevelScrolling.cs
index b40f70e..025bf40 100644
--- a/nGJ2019/Assets/Scripts/LevelScrolling.cs
+++ b/nGJ2019/Assets/Scripts/LevelScrolling.cs
@@ -4,9 +4,9 @@ using UnityEngine;
public class LevelScrolling : MonoBehaviour
{
- public int updateRate = 1;
- public Transform obstacles;
- public Transform background;
+ public int UpdateRate = 1;
+ public List<Transform> Obstacles;
+ public Transform Background;
private Vector3 initialBgPos;
private float[] backgroundSize;
@@ -31,10 +31,10 @@ public class LevelScrolling : MonoBehaviour
private void ResizeBackground()
{
- var sr = background.GetComponent<SpriteRenderer>();
+ var sr = Background.GetComponent<SpriteRenderer>();
if (sr == null) return;
- background.localScale = new Vector3(1, 1, 1);
+