2025-12-13 23:53:48 +00:00
|
|
|
extends Panel
|
|
|
|
|
class_name Curtain
|
|
|
|
|
|
2025-12-15 16:57:26 +00:00
|
|
|
var _tween : Tween = null
|
|
|
|
|
|
2025-12-13 23:53:48 +00:00
|
|
|
func _ready() -> void:
|
|
|
|
|
print_debug("curtain.gd: ready()")
|
2026-01-18 20:53:19 +00:00
|
|
|
visible = true
|
2026-01-20 21:47:44 +00:00
|
|
|
|
|
|
|
|
## Conceals the Game Stage
|
2026-01-18 20:53:19 +00:00
|
|
|
func close() -> void:
|
|
|
|
|
visible = true
|
2025-12-13 23:53:48 +00:00
|
|
|
print_debug("curtain.gd: show()")
|
2026-01-18 20:53:19 +00:00
|
|
|
if _tween: _tween.kill()
|
2025-12-15 16:57:26 +00:00
|
|
|
_tween = create_tween()
|
2026-01-18 21:06:08 +00:00
|
|
|
_tween.tween_property(self, "modulate", Color.WHITE, 0.7)
|
|
|
|
|
await _tween.finished
|
|
|
|
|
|
2026-01-20 21:47:44 +00:00
|
|
|
## Conceals the Game Stage
|
2026-01-18 21:06:08 +00:00
|
|
|
func black() -> void:
|
|
|
|
|
visible = true
|
|
|
|
|
print_debug("curtain.gd: show()")
|
|
|
|
|
if _tween: _tween.kill()
|
|
|
|
|
_tween = create_tween()
|
|
|
|
|
_tween.tween_property(self, "modulate", Color.BLACK, 0.7)
|
2025-12-15 16:57:26 +00:00
|
|
|
await _tween.finished
|
2025-12-13 23:53:48 +00:00
|
|
|
|
2026-01-20 21:47:44 +00:00
|
|
|
## Makes the Game Stage Visible
|
|
|
|
|
func open() -> void:
|
2025-12-13 23:53:48 +00:00
|
|
|
print_debug("curtain.gd: hide()")
|
2026-01-18 20:53:19 +00:00
|
|
|
if _tween: _tween.kill()
|
2025-12-15 16:57:26 +00:00
|
|
|
_tween = create_tween()
|
2026-01-18 21:06:08 +00:00
|
|
|
_tween.tween_property(self, "modulate", Color.TRANSPARENT, 0.7)
|
2025-12-15 16:57:26 +00:00
|
|
|
await _tween.finished
|
2025-12-13 23:53:48 +00:00
|
|
|
visible = false
|