T-Spin and lines clear on a single line, fix time on resume
This commit is contained in:
parent
72b8d8bc1d
commit
de54f89abb
1
Main.gd
1
Main.gd
@ -187,6 +187,7 @@ func pause(show_controls_ui=true):
|
|||||||
playing = false
|
playing = false
|
||||||
$DropTimer.stop()
|
$DropTimer.stop()
|
||||||
$LockDelay.stop()
|
$LockDelay.stop()
|
||||||
|
$Stats.time = OS.get_system_time_secs() - $Stats.time
|
||||||
$Stats/Clock.stop()
|
$Stats/Clock.stop()
|
||||||
if show_controls_ui:
|
if show_controls_ui:
|
||||||
$controls_ui.visible = true
|
$controls_ui.visible = true
|
||||||
|
9
Stats.gd
9
Stats.gd
@ -50,10 +50,11 @@ func _on_Main_piece_dropped(ds):
|
|||||||
func _on_Main_piece_locked(lines, t_spin):
|
func _on_Main_piece_locked(lines, t_spin):
|
||||||
var ds
|
var ds
|
||||||
if lines or t_spin:
|
if lines or t_spin:
|
||||||
if t_spin:
|
var text = T_SPIN_NAMES[t_spin]
|
||||||
emit_signal("flash_text", T_SPIN_NAMES[t_spin])
|
if text:
|
||||||
if lines:
|
text += " "
|
||||||
emit_signal("flash_text", LINES_CLEARED_NAMES[lines])
|
text += LINES_CLEARED_NAMES[lines]
|
||||||
|
emit_signal("flash_text", text)
|
||||||
ds = SCORES[lines][t_spin]
|
ds = SCORES[lines][t_spin]
|
||||||
goal -= ds
|
goal -= ds
|
||||||
$HBC/VBC1/Goal.text = str(goal)
|
$HBC/VBC1/Goal.text = str(goal)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user