feat: black curtain mode

This commit is contained in:
tiger tiger tiger 2026-01-18 22:06:08 +01:00
parent 6be6d6774a
commit 5a040af04d
6 changed files with 38 additions and 41 deletions

View File

@ -147,7 +147,7 @@ _data = {
} }
[node name="board" type="PanelContainer"] [node name="board" type="PanelContainer"]
show_behind_parent = true z_index = -10
material = SubResource("ShaderMaterial_ttqei") material = SubResource("ShaderMaterial_ttqei")
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0

View File

@ -15,6 +15,10 @@ func _ready():
super._ready() super._ready()
%SkipButton.pressed.connect(card_burned.emit) %SkipButton.pressed.connect(card_burned.emit)
func vanish():
super.vanish()
await Main.curtain.black() # Go straight to loading screen
await Main.curtain.close() # Go straight to loading screen
## Main play coroutine - simple linear flow for burning a card ## Main play coroutine - simple linear flow for burning a card
func play() -> void: func play() -> void:
@ -55,7 +59,6 @@ func play() -> void:
await $AnimationPlayer.animation_finished await $AnimationPlayer.animation_finished
print_debug("CardBurner: Sequence complete") print_debug("CardBurner: Sequence complete")
await vanish()
func handle_hover(card: Draggable) -> void: func handle_hover(card: Draggable) -> void:

View File

@ -1,9 +1,8 @@
[gd_scene load_steps=13 format=3 uid="uid://g2a27jwdapai"] [gd_scene load_steps=12 format=3 uid="uid://g2a27jwdapai"]
[ext_resource type="Script" uid="uid://bbia2hcdwctyn" path="res://logic-scenes/card_burner/card_burner.gd" id="1_copuj"] [ext_resource type="Script" uid="uid://bbia2hcdwctyn" path="res://logic-scenes/card_burner/card_burner.gd" id="1_copuj"]
[ext_resource type="Texture2D" uid="uid://615hvpuiacvm" path="res://addons/input_prompts/icons/xbox/X.png" id="3_ckmi5"] [ext_resource type="Texture2D" uid="uid://615hvpuiacvm" path="res://addons/input_prompts/icons/xbox/X.png" id="3_ckmi5"]
[ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"] [ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"]
[ext_resource type="Texture2D" uid="uid://dwerd76p42ac" path="res://logic-scenes/card_burner/burner_gradient.tres" id="4_ckmi5"]
[ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="4_x6cxt"] [ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="4_x6cxt"]
[sub_resource type="InputEventKey" id="InputEventKey_ckmi5"] [sub_resource type="InputEventKey" id="InputEventKey_ckmi5"]
@ -27,25 +26,13 @@ length = 0.001
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
tracks/0/path = NodePath("../../Sprite2D:self_modulate") tracks/0/path = NodePath("../../CandleCursor:color")
tracks/0/interp = 1 tracks/0/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
"times": PackedFloat32Array(0), "times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1), "transitions": PackedFloat32Array(1),
"update": 0, "update": 0,
"values": [Color(1, 1, 1, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("../../CandleCursor:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)] "values": [Color(1, 1, 1, 1)]
} }
@ -54,22 +41,10 @@ resource_name = "vanish"
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
tracks/0/path = NodePath("../../Sprite2D:self_modulate") tracks/0/path = NodePath("../../CandleCursor:color")
tracks/0/interp = 2 tracks/0/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("../../CandleCursor:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.69, 1), "times": PackedFloat32Array(0.69, 1),
"transitions": PackedFloat32Array(1, 1), "transitions": PackedFloat32Array(1, 1),
"update": 0, "update": 0,
@ -194,12 +169,6 @@ text = "Keep all thoughts"
unique_name_in_owner = true unique_name_in_owner = true
position = Vector2(1007, 1449) position = Vector2(1007, 1449)
[node name="Sprite2D" type="Sprite2D" parent="."]
self_modulate = Color(1, 1, 1, 0)
position = Vector2(955, 545)
scale = Vector2(100, 100)
texture = ExtResource("4_ckmi5")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
root_node = NodePath("../Control/HSplitContainer") root_node = NodePath("../Control/HSplitContainer")
libraries = { libraries = {

View File

@ -83,8 +83,16 @@ fill = 1
fill_from = Vector2(0.538462, 0.491453) fill_from = Vector2(0.538462, 0.491453)
fill_to = Vector2(1.3, -0.3) fill_to = Vector2(1.3, -0.3)
[node name="main" type="Node"] [node name="main" type="Control"]
process_mode = 3 process_mode = 3
z_index = 110
z_as_relative = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_rqkns") script = ExtResource("1_rqkns")
youth_room_path = "uid://b3b0gyvklqn50" youth_room_path = "uid://b3b0gyvklqn50"
transition_room_path = "uid://fgp3s28h7msy" transition_room_path = "uid://fgp3s28h7msy"
@ -92,30 +100,38 @@ adulthood_room_path = "uid://flisupth27th"
[node name="Curtain" parent="." instance=ExtResource("2_nbcxq")] [node name="Curtain" parent="." instance=ExtResource("2_nbcxq")]
unique_name_in_owner = true unique_name_in_owner = true
z_index = -1
layout_mode = 1
[node name="Loading" parent="." instance=ExtResource("5_dxvjq")] [node name="Loading" parent="." instance=ExtResource("5_dxvjq")]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 1
offset_bottom = 0.0 offset_bottom = 0.0
[node name="MainMenu" parent="." instance=ExtResource("3_ik73t")] [node name="MainMenu" parent="." instance=ExtResource("3_ik73t")]
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
z_index = 10 z_index = 10
layout_mode = 1
[node name="FPSLabel" type="Label" parent="."] [node name="FPSLabel" type="Label" parent="."]
visible = false visible = false
layout_mode = 0
offset_right = 40.0 offset_right = 40.0
offset_bottom = 35.0 offset_bottom = 35.0
script = SubResource("GDScript_8sq0u") script = SubResource("GDScript_8sq0u")
[node name="Startup Menu" parent="." instance=ExtResource("1_v5rpm")] [node name="Startup Menu" parent="." instance=ExtResource("1_v5rpm")]
visible = false visible = false
layout_mode = 1
[node name="Disclaimer" parent="." instance=ExtResource("7_t45fc")] [node name="Disclaimer" parent="." instance=ExtResource("7_t45fc")]
visible = false visible = false
layout_mode = 1
[node name="PauseContainer" type="CenterContainer" parent="."] [node name="PauseContainer" type="CenterContainer" parent="."]
visible = false visible = false
layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
@ -192,6 +208,7 @@ text = "Skip this Story"
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
modulate = Color(1, 1, 1, 0) modulate = Color(1, 1, 1, 0)
layout_mode = 1
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
bus = &"music" bus = &"music"

View File

@ -13,7 +13,16 @@ func close() -> void:
print_debug("curtain.gd: show()") print_debug("curtain.gd: show()")
if _tween: _tween.kill() if _tween: _tween.kill()
_tween = create_tween() _tween = create_tween()
_tween.tween_property(self, "modulate:a", 1.0, 0.7) _tween.tween_property(self, "modulate", Color.WHITE, 0.7)
await _tween.finished
## Conceals the Game Stage
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)
await _tween.finished await _tween.finished
## Makes the Game Stage Visible ## Makes the Game Stage Visible
@ -21,6 +30,6 @@ func open() -> void:
print_debug("curtain.gd: hide()") print_debug("curtain.gd: hide()")
if _tween: _tween.kill() if _tween: _tween.kill()
_tween = create_tween() _tween = create_tween()
_tween.tween_property(self, "modulate:a", 0.0, 0.7) _tween.tween_property(self, "modulate", Color.TRANSPARENT, 0.7)
await _tween.finished await _tween.finished
visible = false visible = false

View File

@ -3,7 +3,6 @@
[ext_resource type="Script" uid="uid://cg7sc173lvchp" path="res://ui/curtain/curtain.gd" id="1_8qa50"] [ext_resource type="Script" uid="uid://cg7sc173lvchp" path="res://ui/curtain/curtain.gd" id="1_8qa50"]
[node name="Curtain" type="Panel"] [node name="Curtain" type="Panel"]
z_index = -10
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0