diff options
author | Mikkel Bybjerg <mikkel.bybjerg@hotmail.com> | 2019-04-27 16:32:53 +0200 |
---|---|---|
committer | Mikkel Bybjerg <mikkel.bybjerg@hotmail.com> | 2019-04-27 16:32:53 +0200 |
commit | ccef7ba8bcd3d27715d509564601174017fc41f8 (patch) | |
tree | fce5ec6093f7d7b69b33f7ca00137b9c3e178b5a /nGJ2019/Assets/Scripts/LevelScrolling.cs | |
parent | 29ea8fd1b67042ced673a3e53c12823d8aee2783 (diff) | |
parent | 70c0792ee952d2690fac411ca3240fcb50f7a7b0 (diff) |
merge
Diffstat (limited to 'nGJ2019/Assets/Scripts/LevelScrolling.cs')
-rw-r--r-- | nGJ2019/Assets/Scripts/LevelScrolling.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nGJ2019/Assets/Scripts/LevelScrolling.cs b/nGJ2019/Assets/Scripts/LevelScrolling.cs index 025bf40..0122a69 100644 --- a/nGJ2019/Assets/Scripts/LevelScrolling.cs +++ b/nGJ2019/Assets/Scripts/LevelScrolling.cs @@ -4,7 +4,7 @@ using UnityEngine; public class LevelScrolling : MonoBehaviour
{
- public int UpdateRate = 1;
+ public int UpdateRate = -5;
public List<Transform> Obstacles;
public Transform Background;
@@ -56,14 +56,14 @@ public class LevelScrolling : MonoBehaviour {
foreach (var o in Obstacles)
{
- o.Translate(new Vector2(0.01f * UpdateRate, 0));
+ o.Translate(0.01f * UpdateRate, 0, 0);
}
}
private void MoveBackground()
{
if (Background.position.x > -initialBgPos.x)
- Background.Translate(new Vector2(0.01f * UpdateRate, 0));
+ Background.Translate(0.01f * UpdateRate, 0, 0);
else Background.position = initialBgPos;
}
}
|