You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
583 B
GDScript
27 lines
583 B
GDScript
extends Control
|
|
|
|
@onready var animation: AnimationPlayer = $AnimationPlayer as AnimationPlayer
|
|
|
|
var color_material: ShaderMaterial
|
|
|
|
@export var duration: float:
|
|
set(value):
|
|
if color_material: color_material.set_shader_parameter("position", value)
|
|
|
|
|
|
func _ready():
|
|
color_material = $ColorRect.material as ShaderMaterial
|
|
|
|
SignalManager.level_loading_start.connect(on_level_loading_start)
|
|
SignalManager.level_loading_end.connect(on_level_loading_end)
|
|
visible = true
|
|
|
|
|
|
func on_level_loading_start():
|
|
animation.play("start")
|
|
|
|
|
|
func on_level_loading_end():
|
|
animation.play("end")
|
|
|