improve minigame timings

This commit is contained in:
Arnaud Vergnet 2021-04-12 10:48:46 +02:00
parent e894808313
commit 91500ed2e8
3 changed files with 12 additions and 10 deletions

View file

@ -42,22 +42,23 @@ func set_mode(mode: String):
func start():
print("starting minigame")
start_timer_UI.init()
var t = Timer.new()
t.set_wait_time(1)
add_child(t)
t.start()
var t = Timer.new()
t.set_wait_time(0.5)
add_child(t)
t.start()
for n in range(3,0,-1):
start_timer_UI.update_timer(String(n))
yield(t, "timeout")
start_timer_UI.update_timer("GO !")
yield(t, "timeout")
t.queue_free()
instructionsUI._init()
foreground.start()
player.start(game_mode)
spawner.start()
instructionsUI._init()
scoreUI.start(game_mode)
yield(t, "timeout")
yield(t, "timeout")
start_timer_UI.hide()
spawner.start()
scoreUI.start(game_mode)
t.queue_free()
func stop():

View file

@ -18,6 +18,7 @@ func _wait_for_jump():
hide()
else:
show()
yield(t, "timeout")
hide()
func _input(event):

View file

@ -31,7 +31,7 @@ __meta__ = {
[node name="Label" type="Label" parent="MarginContainer"]
margin_top = 146.0
margin_right = 1921.0
margin_right = 1920.0
margin_bottom = 207.0
custom_fonts/font = SubResource( 1 )
text = "Appuyer sur ESPACE pour sauter"