improve minigame timings
This commit is contained in:
parent
e894808313
commit
91500ed2e8
3 changed files with 12 additions and 10 deletions
|
@ -42,22 +42,23 @@ func set_mode(mode: String):
|
||||||
func start():
|
func start():
|
||||||
print("starting minigame")
|
print("starting minigame")
|
||||||
start_timer_UI.init()
|
start_timer_UI.init()
|
||||||
var t = Timer.new()
|
var t = Timer.new()
|
||||||
t.set_wait_time(1)
|
t.set_wait_time(0.5)
|
||||||
add_child(t)
|
add_child(t)
|
||||||
t.start()
|
t.start()
|
||||||
for n in range(3,0,-1):
|
for n in range(3,0,-1):
|
||||||
start_timer_UI.update_timer(String(n))
|
start_timer_UI.update_timer(String(n))
|
||||||
yield(t, "timeout")
|
yield(t, "timeout")
|
||||||
start_timer_UI.update_timer("GO !")
|
start_timer_UI.update_timer("GO !")
|
||||||
yield(t, "timeout")
|
instructionsUI._init()
|
||||||
t.queue_free()
|
|
||||||
foreground.start()
|
foreground.start()
|
||||||
player.start(game_mode)
|
player.start(game_mode)
|
||||||
spawner.start()
|
yield(t, "timeout")
|
||||||
instructionsUI._init()
|
yield(t, "timeout")
|
||||||
scoreUI.start(game_mode)
|
|
||||||
start_timer_UI.hide()
|
start_timer_UI.hide()
|
||||||
|
spawner.start()
|
||||||
|
scoreUI.start(game_mode)
|
||||||
|
t.queue_free()
|
||||||
|
|
||||||
|
|
||||||
func stop():
|
func stop():
|
||||||
|
|
|
@ -18,6 +18,7 @@ func _wait_for_jump():
|
||||||
hide()
|
hide()
|
||||||
else:
|
else:
|
||||||
show()
|
show()
|
||||||
|
yield(t, "timeout")
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
|
|
|
@ -31,7 +31,7 @@ __meta__ = {
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="MarginContainer"]
|
[node name="Label" type="Label" parent="MarginContainer"]
|
||||||
margin_top = 146.0
|
margin_top = 146.0
|
||||||
margin_right = 1921.0
|
margin_right = 1920.0
|
||||||
margin_bottom = 207.0
|
margin_bottom = 207.0
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 1 )
|
||||||
text = "Appuyer sur ESPACE pour sauter"
|
text = "Appuyer sur ESPACE pour sauter"
|
||||||
|
|
Loading…
Reference in a new issue