Hide the debug fly and level skip behind a 房★主★有★神★器★ easter-egg panel

cheat_panel replaces the level_skip autoload: a single small button in the top-right opens a panel holding the fly toggle and the level jump buttons, so nothing that looks like leftover debug UI is on screen. The fly is no longer gated behind OS.is_debug_build, so the easter egg works in exported builds too, and the 1/2/3 shortcuts only fire while the panel is open so they cannot be hit by accident. Space stays unbound and no gameplay content was touched.
This commit is contained in:
2026-10-07 23:10:41 +08:00
parent 44e4c3a751
commit f549c03533
8 changed files with 208 additions and 100 deletions
+77
View File
@@ -0,0 +1,77 @@
[gd_scene load_steps=4 format=3]
[ext_resource type="Script" path="res://scripts/cheat_panel.gd" id="1_cheat"]
[sub_resource type="SystemFont" id="SystemFont_cjk"]
font_names = PackedStringArray("Microsoft YaHei UI", "Microsoft YaHei", "SimHei", "Noto Sans CJK SC", "sans-serif")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_panel"]
content_margin_left = 10.0
content_margin_top = 10.0
content_margin_right = 10.0
content_margin_bottom = 10.0
bg_color = Color(0.07, 0.08, 0.13, 0.92)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(1, 0.82, 0.35, 0.85)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[node name="CheatPanel" type="CanvasLayer"]
process_mode = 3
layer = 40
script = ExtResource("1_cheat")
[node name="OpenButton" type="Button" parent="."]
anchor_left = 1.0
anchor_right = 1.0
offset_left = -178.0
offset_top = 6.0
offset_right = -6.0
offset_bottom = 28.0
theme_override_colors/font_color = Color(1, 0.88, 0.5, 1)
theme_override_fonts/font = SubResource("SystemFont_cjk")
theme_override_font_sizes/font_size = 11
text = "房★主★有★神★器★"
[node name="Panel" type="PanelContainer" parent="."]
anchor_left = 1.0
anchor_right = 1.0
offset_left = -178.0
offset_top = 32.0
offset_right = -6.0
offset_bottom = 168.0
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
[node name="VBox" type="VBoxContainer" parent="Panel"]
theme_override_constants/separation = 6
[node name="Title" type="Label" parent="Panel/VBox"]
theme_override_colors/font_color = Color(1, 0.85, 0.4, 1)
theme_override_fonts/font = SubResource("SystemFont_cjk")
theme_override_font_sizes/font_size = 12
text = "神 器"
horizontal_alignment = 1
[node name="FlyButton" type="Button" parent="Panel/VBox"]
theme_override_fonts/font = SubResource("SystemFont_cjk")
theme_override_font_sizes/font_size = 11
text = "飞行:关(F)"
[node name="Row" type="HBoxContainer" parent="Panel/VBox"]
theme_override_constants/separation = 5
[node name="JumpHint" type="Label" parent="Panel/VBox/Row"]
theme_override_fonts/font = SubResource("SystemFont_cjk")
theme_override_font_sizes/font_size = 11
text = "跳关"
vertical_alignment = 1
[node name="CloseButton" type="Button" parent="Panel/VBox"]
theme_override_fonts/font = SubResource("SystemFont_cjk")
theme_override_font_sizes/font_size = 11
text = "关闭(Esc)"
+1 -1
View File
@@ -226,7 +226,7 @@ position = Vector2(288, 37)
[node name="CoinGoldRound_01" parent="Level/PrefabInstances/Collectibles" unique_id=926105584 instance=ExtResource("17_16ffm")]
z_index = 5
position = Vector2(447, 130)
position = Vector2(432, 127)
[node name="CoinGoldRound_02" parent="Level/PrefabInstances/Collectibles" unique_id=1674416025 instance=ExtResource("17_16ffm")]
z_index = 5
-29
View File
@@ -1,29 +0,0 @@
[gd_scene load_steps=3 format=3]
[ext_resource type="Script" path="res://scripts/level_skip.gd" id="1_skip"]
[sub_resource type="SystemFont" id="SystemFont_cjk"]
font_names = PackedStringArray("Microsoft YaHei UI", "Microsoft YaHei", "SimHei", "Noto Sans CJK SC", "sans-serif")
[node name="LevelSkip" type="CanvasLayer"]
process_mode = 3
layer = 30
script = ExtResource("1_skip")
[node name="Buttons" type="HBoxContainer" parent="."]
anchor_left = 1.0
anchor_right = 1.0
offset_left = -130.0
offset_top = 6.0
offset_right = -6.0
offset_bottom = 32.0
theme_override_constants/separation = 4
[node name="Hint" type="Label" parent="Buttons"]
theme_override_colors/font_color = Color(1, 1, 1, 0.85)
theme_override_colors/font_outline_color = Color(0, 0, 0, 0.8)
theme_override_constants/outline_size = 3
theme_override_fonts/font = SubResource("SystemFont_cjk")
theme_override_font_sizes/font_size = 11
text = "跳关"
vertical_alignment = 1