From 52d510d483bf0063c4bfaf6fd1e2c7c7ed49e063 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Sat, 27 Apr 2019 10:11:06 +0200 Subject: Integrated obstacles with level scrolling script --- nGJ2019/Assets/Scripts/LevelScrolling.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nGJ2019/Assets/Scripts') diff --git a/nGJ2019/Assets/Scripts/LevelScrolling.cs b/nGJ2019/Assets/Scripts/LevelScrolling.cs index dd413f8..b40f70e 100644 --- a/nGJ2019/Assets/Scripts/LevelScrolling.cs +++ b/nGJ2019/Assets/Scripts/LevelScrolling.cs @@ -5,7 +5,7 @@ using UnityEngine; public class LevelScrolling : MonoBehaviour { public int updateRate = 1; - public Transform longcat; + public Transform obstacles; public Transform background; private Vector3 initialBgPos; @@ -26,7 +26,7 @@ public class LevelScrolling : MonoBehaviour void FixedUpdate() { MoveBackground(); - MoveLongcat(); + MoveObstacles(); } private void ResizeBackground() @@ -52,9 +52,9 @@ public class LevelScrolling : MonoBehaviour initialBgPos = background.position; } - private void MoveLongcat() + private void MoveObstacles() { - longcat.Translate(new Vector2(0.1f * updateRate, 0)); + obstacles.Translate(new Vector2(0.1f * updateRate, 0)); } private void MoveBackground() -- cgit v1.2.3