Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
2d7a427ba2 | |||
19e64e3948 |
@ -10,7 +10,7 @@ func print(text):
|
||||
$AnimationPlayer.play("Flash")
|
||||
|
||||
func _on_AnimationPlayer_animation_finished(anim_name):
|
||||
texts.resize(0)
|
||||
texts = PoolStringArray()
|
||||
|
||||
func _on_Stats_flash_text(text):
|
||||
self.print(text)
|
||||
|
@ -83,20 +83,9 @@ func _unhandled_input(event):
|
||||
$AutoShiftDelay.stop()
|
||||
$AutoShiftTimer.stop()
|
||||
autoshift_action = ""
|
||||
for action in movements:
|
||||
if Input.is_action_pressed(action):
|
||||
autoshift_action = action
|
||||
process_autoshift()
|
||||
$AutoShiftDelay.start()
|
||||
break
|
||||
for action in movements:
|
||||
if action != autoshift_action:
|
||||
if event.is_action_pressed(action):
|
||||
$AutoShiftTimer.stop()
|
||||
autoshift_action = action
|
||||
process_autoshift()
|
||||
$AutoShiftDelay.start()
|
||||
break
|
||||
process_new_action(Input)
|
||||
else:
|
||||
process_new_action(event)
|
||||
if event.is_action_pressed("hard_drop"):
|
||||
hard_drop()
|
||||
if event.is_action_pressed("rotate_clockwise"):
|
||||
@ -105,6 +94,15 @@ func _unhandled_input(event):
|
||||
current_piece.turn(Tetromino.COUNTERCLOCKWISE)
|
||||
if event.is_action_pressed("hold"):
|
||||
hold()
|
||||
|
||||
func process_new_action(event):
|
||||
for action in movements:
|
||||
if action != autoshift_action and event.is_action_pressed(action):
|
||||
$AutoShiftTimer.stop()
|
||||
autoshift_action = action
|
||||
process_autoshift()
|
||||
$AutoShiftDelay.start()
|
||||
break
|
||||
|
||||
func _on_AutoShiftDelay_timeout():
|
||||
if autoshift_action:
|
||||
|
@ -443,10 +443,10 @@ anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -215.0
|
||||
margin_top = -100.0
|
||||
margin_right = -90.0
|
||||
margin_bottom = -60.0
|
||||
margin_left = -170.0
|
||||
margin_top = -90.0
|
||||
margin_right = -45.0
|
||||
margin_bottom = -50.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user