diff options
author | miakata <miakata@gmail.com> | 2019-04-27 18:08:27 +0200 |
---|---|---|
committer | miakata <miakata@gmail.com> | 2019-04-27 18:08:27 +0200 |
commit | a5df3253047945b54a5ec25c3661b2c4967460e7 (patch) | |
tree | c5b42f3f39c2a65aa644d8d51542ee983a60edfd /nGJ2019/Assets/Scripts/LevelScrolling.cs | |
parent | 7568372af43405a0d2b1d1a3adb7f817527098db (diff) | |
parent | 53a8d342ee667d1b28c1dc1e173ad73338a930b9 (diff) |
Merge branch 'master' of https://github.com/marcinzelent/ngj2019
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;
}
}
|