21 lines
457 B
GDScript3
21 lines
457 B
GDScript3
|
|
extends Panel
|
||
|
|
class_name Curtain
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
print_debug("curtain.gd: ready()")
|
||
|
|
show()
|
||
|
|
|
||
|
|
func show() -> void:
|
||
|
|
visible = true
|
||
|
|
print_debug("curtain.gd: show()")
|
||
|
|
var tween := create_tween()
|
||
|
|
tween.tween_property(self, "modulate:a", 1.0, 2.0)
|
||
|
|
await tween.finished
|
||
|
|
|
||
|
|
func hide() -> void:
|
||
|
|
print_debug("curtain.gd: hide()")
|
||
|
|
var tween := create_tween()
|
||
|
|
tween.tween_property(self, "modulate:a", 0.0, 2.0)
|
||
|
|
await tween.finished
|
||
|
|
visible = false
|