redo trail

This commit is contained in:
adrienmalin
2019-01-01 14:46:49 +01:00
parent 23afbdfdbe
commit c8e8890e30
5 changed files with 254 additions and 4 deletions

View File

@ -85,6 +85,7 @@ func random_piece():
func new_piece():
current_piece = next_piece
current_piece.translation = START_POSITION
current_piece.emit_trail(true)
autoshift_action = ""
next_piece = random_piece()
next_piece.translation = NEXT_POSITION
@ -220,11 +221,13 @@ func line_clear():
func hold():
if not current_piece_held:
current_piece.emit_trail(false)
if held_piece:
var tmp = held_piece
held_piece = current_piece
current_piece = tmp
current_piece.translation = START_POSITION
current_piece.emit_trail(true)
else:
held_piece = current_piece
new_piece()

View File

@ -15,7 +15,7 @@ subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
[node name="GridMap" type="GridMap" index="0"]
[node name="GridMap" type="GridMap"]
editor/display_folded = true
theme = ExtResource( 1 )