19 lines
534 B
GDScript
19 lines
534 B
GDScript
extends TextureButton
|
|
|
|
@onready var color_rect: ColorRect = $"../ColorRect"
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|
|
|
|
|
|
func _on_pressed() -> void:
|
|
get_tree().create_tween().tween_property(color_rect, "color", Color.BLACK, 1)
|
|
await get_tree().create_timer(1).timeout
|
|
get_tree().change_scene_to_file("res://level/level_2.tscn")
|