RAIDER_GameJam/ui/start_button.gd
Felix Kaiser 3f62e5e31d blergh
2025-02-17 16:46:19 +01:00

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")