summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrom <romangraef@gmail.com>2021-04-24 16:29:15 +0200
committerrom <romangraef@gmail.com>2021-04-24 16:29:15 +0200
commit260b64c8400699d7e3442ed5aef046bc716c388d (patch)
treeb827c61109f404f39ee71c5190965393d08e0174
parent7a215e3ce5f74036e41a1f3eb1e3243ebbd1eb05 (diff)
downloadldjam48-260b64c8400699d7e3442ed5aef046bc716c388d.tar.gz
ldjam48-260b64c8400699d7e3442ed5aef046bc716c388d.tar.bz2
ldjam48-260b64c8400699d7e3442ed5aef046bc716c388d.zip
points are every 5pixels you doofus
-rw-r--r--Camera2D.gd1
-rw-r--r--hackingscene.tscn1
2 files changed, 2 insertions, 0 deletions
diff --git a/Camera2D.gd b/Camera2D.gd
index 69524a8..84a5faa 100644
--- a/Camera2D.gd
+++ b/Camera2D.gd
@@ -22,6 +22,7 @@ func _process(delta):
pidx += 1
if pidx >= points.size():
pidx = -1
+ _process(delta - dist.length() / current_speed )
return
var velocity = dist.normalized() * current_speed * delta
position += velocity
diff --git a/hackingscene.tscn b/hackingscene.tscn
index 8afc31e..fe87162 100644
--- a/hackingscene.tscn
+++ b/hackingscene.tscn
@@ -15,6 +15,7 @@ _data = {
current = true
script = ExtResource( 3 )
speedup = 150
+speedup_time = 10
[node name="Sprite" type="Sprite" parent="Camera2D"]
position = Vector2( 1.49817, -0.0841775 )