- adding coins

- performance improvements
- shake effect
- keyboard support
This commit is contained in:
megamichi 2024-11-04 19:10:10 +01:00
parent 78b4a3bba2
commit 45193fc27f
48 changed files with 609 additions and 74 deletions

View file

@ -0,0 +1,23 @@
extends Marker2D
var speed
func _ready() -> void:
speed = $"/root/Global".speed #get_parent().speed
func _spawn() -> void:
var hindernis = preload("res://scenes/hurdle/hurdle.tscn").instantiate()
speed = $"/root/Global".speed
hindernis.speed = speed
var v1 = 1.5 - (speed / 260)
var v2 = 2.0 - (speed / 260)
#print(str(v1)," ",str(v2))
$"../SpawnTimer".wait_time = randf_range(v1,v2)
add_child(hindernis)
func del_all():
for child in get_children():
child.queue_free()