2018-05-23 21:35:16 -04:00
|
|
|
extends Node
|
|
|
|
|
|
|
|
signal restart
|
2018-05-26 02:55:17 -04:00
|
|
|
var rectangle_opacity = 0
|
2018-05-23 21:35:16 -04:00
|
|
|
|
|
|
|
func _ready():
|
|
|
|
# Called every time the node is added to the scene.
|
|
|
|
# Initialization here
|
|
|
|
pass
|
|
|
|
|
2018-05-26 02:55:17 -04:00
|
|
|
func _process(delta):
|
|
|
|
$ColorRect.color = Color(0, 0, 0, rectangle_opacity)
|
|
|
|
if rectangle_opacity < 1:
|
|
|
|
rectangle_opacity += delta/2
|
|
|
|
if (Input.is_action_pressed("ui_quit")):
|
|
|
|
get_tree().quit()
|
2018-05-23 21:35:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
func _on_Button_pressed():
|
|
|
|
emit_signal("restart")
|
|
|
|
queue_free()
|
2018-05-26 02:55:17 -04:00
|
|
|
|
|
|
|
func _on_Button_button_down():
|
|
|
|
$Restart.frame = 1
|