aboutsummaryrefslogtreecommitdiff
path: root/lawsuit/miles.gd
diff options
context:
space:
mode:
Diffstat (limited to 'lawsuit/miles.gd')
-rw-r--r--lawsuit/miles.gd9
1 files changed, 9 insertions, 0 deletions
diff --git a/lawsuit/miles.gd b/lawsuit/miles.gd
new file mode 100644
index 0000000..7ea8213
--- /dev/null
+++ b/lawsuit/miles.gd
@@ -0,0 +1,9 @@
+extends Node2D
+onready var speed = rand_range(80, 200)
+func _physics_process(delta):
+ position += Vector2(-speed, 0) * delta
+ if position.x < 0:
+ get_parent().lose()
+
+func _on_Area2D_area_shape_entered(area_id, area, area_shape, self_shape):
+ queue_free()