diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2019-04-27 10:11:06 +0200 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2019-04-27 10:11:06 +0200 |
commit | 52d510d483bf0063c4bfaf6fd1e2c7c7ed49e063 (patch) | |
tree | 6086b971b8132fed29e43109e4cd5d9f7759f12e /nGJ2019/Assets/Scripts | |
parent | 0ef7e7d16e955401131fb2110c3b3dda66ccc0e3 (diff) |
Integrated obstacles with level scrolling script
Diffstat (limited to 'nGJ2019/Assets/Scripts')
-rw-r--r-- | nGJ2019/Assets/Scripts/LevelScrolling.cs | 8 |
1 files changed, 4 insertions, 4 deletions
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()
|