GrappleTest/Core/Scripts/Fader.gd
2024-03-17 21:56:16 -05:00

15 lines
341 B
GDScript

extends CanvasLayer
@onready var fader = $Fader
func _ready():
get_viewport().connect("size_changed", _on_viewport_resize)
_on_viewport_resize()
func _on_viewport_resize():
fader.texture.width = get_viewport().size.x
fader.position.y = -get_viewport().size.y
fader.texture.height = get_viewport().size.y
func _process(delta):
pass