16 lines
341 B
GDScript3
16 lines
341 B
GDScript3
|
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
|