more improvements
This commit is contained in:
parent
4f8a301cde
commit
86218ffd84
@ -36,8 +36,10 @@ func new_game(level):
|
||||
if held_piece:
|
||||
remove_child(held_piece)
|
||||
held_piece = null
|
||||
autoshift_action = ""
|
||||
if next_piece:
|
||||
remove_child(next_piece)
|
||||
next_piece = random_piece()
|
||||
autoshift_action = ""
|
||||
$MidiPlayer.position = 0
|
||||
$Stats.new_game(level)
|
||||
new_piece()
|
||||
@ -133,11 +135,9 @@ func hard_drop():
|
||||
lock()
|
||||
|
||||
func _on_DropTimer_timeout():
|
||||
current_piece.move(movements["soft_drop"])
|
||||
|
||||
func _on_LockDelay_timeout():
|
||||
if not current_piece.move(movements["soft_drop"]):
|
||||
lock()
|
||||
if $LockDelay.is_stopped():
|
||||
lock()
|
||||
|
||||
func lock():
|
||||
if $Matrix/GridMap.lock(current_piece):
|
||||
|
@ -426,7 +426,7 @@ autostart = false
|
||||
[node name="AutoShiftTimer" type="Timer" parent="." index="9"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 0.03
|
||||
wait_time = 0.02
|
||||
one_shot = false
|
||||
autostart = false
|
||||
|
||||
@ -550,8 +550,6 @@ _sections_unfolded = [ "Margin", "custom_colors", "custom_fonts" ]
|
||||
|
||||
[connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"]
|
||||
|
||||
[connection signal="timeout" from="LockDelay" to="." method="_on_LockDelay_timeout"]
|
||||
|
||||
[connection signal="timeout" from="AutoShiftDelay" to="." method="_on_AutoShiftDelay_timeout"]
|
||||
|
||||
[connection signal="timeout" from="AutoShiftTimer" to="." method="_on_AutoShiftTimer_timeout"]
|
||||
|
@ -77,7 +77,7 @@ func piece_locked(lines, t_spin):
|
||||
ds = SCORES[lines][t_spin]
|
||||
goal -= ds
|
||||
$VBC/Goal.text = str(goal)
|
||||
ds *= 100
|
||||
ds *= 100 * level
|
||||
emit_signal("flash_text", str(ds))
|
||||
score += ds
|
||||
$VBC/Score.text = str(score)
|
||||
|
Loading…
x
Reference in New Issue
Block a user