diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2019-04-27 14:59:32 +0200 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2019-04-27 14:59:32 +0200 |
commit | 0cfee1d1f1a2a06c86080f62ce26a3eabe6b5ffd (patch) | |
tree | f2d48e92f581ac3649d695df8e1b4a96a40c96e7 /nGJ2019/Assets | |
parent | 4f868dfa15c552cd8b436c5b78fc2254f380ce8f (diff) |
Refactoring
Diffstat (limited to 'nGJ2019/Assets')
-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;
}
}
|