diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西效果图.png b/asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西效果图.png deleted file mode 100644 index eae2a6e4..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西效果图.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西效果图.png.import b/asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西效果图.png.import deleted file mode 100644 index 69f6ade7..00000000 --- a/asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西效果图.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bnx0bl6pcbtfc" -path="res://.godot/imported/拿东西效果图.png-f1298ad845ad9a5e2d379d9b40439736.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西效果图.png" -dest_files=["res://.godot/imported/拿东西效果图.png-f1298ad845ad9a5e2d379d9b40439736.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头.png b/asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头.png similarity index 100% rename from asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头.png rename to asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头.png diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头.png.import b/asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头.png.import similarity index 76% rename from asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头.png.import rename to asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头.png.import index c7eca3ba..fe40f937 100644 --- a/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头.png.import +++ b/asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://sreapb4mhlu8" -path="res://.godot/imported/段舌头.png-9a083fc6f9dd0c892fa768f064e70136.ctex" +path="res://.godot/imported/断舌头.png-565ee4cfb21ef25fe392dfbb069bba04.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头.png" -dest_files=["res://.godot/imported/段舌头.png-9a083fc6f9dd0c892fa768f064e70136.ctex"] +source_file="res://asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头.png" +dest_files=["res://.godot/imported/断舌头.png-565ee4cfb21ef25fe392dfbb069bba04.ctex"] [params] diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头效果图.png b/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头效果图.png deleted file mode 100644 index 2e49d332..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头效果图.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头效果图.png.import b/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头效果图.png.import deleted file mode 100644 index c26f55ee..00000000 --- a/asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头效果图.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cjnuhn62yfbr5" -path="res://.godot/imported/段舌头效果图.png-16c5c1309eb1098bc778085789d12562.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/李氏特写/段舌头效果图.png" -dest_files=["res://.godot/imported/段舌头效果图.png-16c5c1309eb1098bc778085789d12562.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/涂胶水效果图.png b/asset/art/scene/c03/s04_李癞房间/李氏特写/涂胶水效果图.png deleted file mode 100644 index 4009497f..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/李氏特写/涂胶水效果图.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/涂胶水效果图.png.import b/asset/art/scene/c03/s04_李癞房间/李氏特写/涂胶水效果图.png.import deleted file mode 100644 index afd40cab..00000000 --- a/asset/art/scene/c03/s04_李癞房间/李氏特写/涂胶水效果图.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cd45nsjkkuxtg" -path="res://.godot/imported/涂胶水效果图.png-7e948f76a45507b3bd0c4943e2a9f0c5.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/李氏特写/涂胶水效果图.png" -dest_files=["res://.godot/imported/涂胶水效果图.png-7e948f76a45507b3bd0c4943e2a9f0c5.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/舌头黏上效果图.png b/asset/art/scene/c03/s04_李癞房间/李氏特写/舌头黏上效果图.png deleted file mode 100644 index f85d7da4..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/李氏特写/舌头黏上效果图.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/舌头黏上效果图.png.import b/asset/art/scene/c03/s04_李癞房间/李氏特写/舌头黏上效果图.png.import deleted file mode 100644 index 9ad24850..00000000 --- a/asset/art/scene/c03/s04_李癞房间/李氏特写/舌头黏上效果图.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://brkya1qrkwt4s" -path="res://.godot/imported/舌头黏上效果图.png-4949ba4fbd6290610bc7f4fefa10204b.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/李氏特写/舌头黏上效果图.png" -dest_files=["res://.godot/imported/舌头黏上效果图.png-4949ba4fbd6290610bc7f4fefa10204b.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/要东西效果图.png b/asset/art/scene/c03/s04_李癞房间/李氏特写/要东西效果图.png deleted file mode 100644 index 08751b93..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/李氏特写/要东西效果图.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/李氏特写/要东西效果图.png.import b/asset/art/scene/c03/s04_李癞房间/李氏特写/要东西效果图.png.import deleted file mode 100644 index 517917fa..00000000 --- a/asset/art/scene/c03/s04_李癞房间/李氏特写/要东西效果图.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dwx4jiwr6uu74" -path="res://.godot/imported/要东西效果图.png-18c789a814118501359db96cfc57f7a6.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/李氏特写/要东西效果图.png" -dest_files=["res://.godot/imported/要东西效果图.png-18c789a814118501359db96cfc57f7a6.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/asset/dialogue/event_stage.dialogue b/asset/dialogue/event_stage.dialogue index 4fb72712..82f7fa95 100644 --- a/asset/dialogue/event_stage.dialogue +++ b/asset/dialogue/event_stage.dialogue @@ -22,7 +22,7 @@ c03_invite_xchan_supper=4 & c03_s03_laizi_braid=2 -> c03_f2_madman_runaway=2 c03_f1_paste_show: 0:初始化 1:演出结束 c03_before_mahjong_game: 0:初始化 1:粘舌头和刀把 2:给药 4:准备好进入游戏 c03_mahjong_game: 0:麻将理牌 1:麻将出千 2:麻将结束 -c03_li_paperwoman: 0:初始化隐藏 1:显示纸人 2:纸舌头完成 3:给药完成 +c03_li_paperwoman: 0:初始化隐藏 1:显示纸人 2:纸舌头完成 4:给药完成 c03_drug_game: 0:初始化 1:获得药方 2:获得药包 => END diff --git a/asset/dialogue/item_description.csv b/asset/dialogue/item_description.csv index 6a013844..e7cc86b6 100644 --- a/asset/dialogue/item_description.csv +++ b/asset/dialogue/item_description.csv @@ -49,6 +49,8 @@ input_拼凑信件,点击选择信件碎片,方向键移动,E 旋碎片转 input_书架游戏,点击书本可选中或交换,Q 退出,,,,,"Click books to select or swap, Q to exit" input_麻将游戏_麻将不足,还缺一块麻将,,,,, input_麻将游戏_操作规则,依次点击两块麻将可进行交换,,,,, +ui_center_notify_c03纸人浆糊舌头,帮我粘舌头,,,,, +ui_center_notify_c03纸人求药,给我药,,,,, ui_center_notify_c03药车缺少物品,缺少药引,,,,, ui_center_notify_c03药车不能再取药材,同种药材只能取出一份,,,,, ui_center_notify_c03放到碗中或原处,药材只能放到碗中或原处,,,,, diff --git a/asset/dialogue/item_description.dialogue b/asset/dialogue/item_description.dialogue index 86ef6d76..8fe7f82e 100644 --- a/asset/dialogue/item_description.dialogue +++ b/asset/dialogue/item_description.dialogue @@ -57,6 +57,8 @@ # c03 还缺一块麻将 [ID:input_麻将游戏_麻将不足] 依次点击两块麻将可进行交换 [ID:input_麻将游戏_操作规则] +帮我粘舌头 [ID:ui_center_notify_c03纸人浆糊舌头] +给我药 [ID:ui_center_notify_c03纸人求药] 缺少药引 [ID:ui_center_notify_c03药车缺少物品] 同种药材只能取出一份 [ID:ui_center_notify_c03药车不能再取药材] 药材只能放到碗中或原处 [ID:ui_center_notify_c03放到碗中或原处] diff --git a/manager/scene/global_functor.gd b/manager/scene/global_functor.gd index 7b468390..ad0cfee5 100644 --- a/manager/scene/global_functor.gd +++ b/manager/scene/global_functor.gd @@ -97,5 +97,6 @@ func c03_get_paper_coin(_node = null) -> bool: SceneManager.enable_prop_item("prop_3个纸铜钱") return true else: + SceneManager.enable_prop_item("prop_3个纸铜钱") printerr("c03_get_paper_coin: stage should not be greater than 3, but got %d" % stage) return false diff --git a/scene/ground/scene/c03/s04_李癞房间.tscn b/scene/ground/scene/c03/s04_李癞房间.tscn index b57d95ed..af53c2ec 100644 --- a/scene/ground/scene/c03/s04_李癞房间.tscn +++ b/scene/ground/scene/c03/s04_李癞房间.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=3 uid="uid://c7c88hg2cl1j7"] +[gd_scene load_steps=21 format=3 uid="uid://c7c88hg2cl1j7"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_byh4s"] [ext_resource type="Script" uid="uid://byw2swgt783oa" path="res://scene/ground/scene/c03/s04_李癞房间.gd" id="2_vjibx"] @@ -14,6 +14,11 @@ [ext_resource type="PackedScene" uid="uid://dsa6frlw6e6gg" path="res://scene/entity/pickable.tscn" id="9_m8bf2"] [ext_resource type="PackedScene" uid="uid://t61o0vpm0e11" path="res://scene/ground/script/c03/s04_closeup李氏纸人.tscn" id="10_o2w5q"] [ext_resource type="Texture2D" uid="uid://p7eeml2vadvc" path="res://asset/art/scene/c03/s04_李癞房间/李氏纸人.png" id="11_7d7lv"] +[ext_resource type="Script" uid="uid://bkkiyk5jkdw4d" path="res://manager/event_manager/event2d.gd" id="12_0jb1q"] +[ext_resource type="Texture2D" uid="uid://cdongak6ofmuc" path="res://asset/art/scene/c03/s04_李癞房间/花圈.png" id="13_npwi0"] +[ext_resource type="Texture2D" uid="uid://c1o30ess5p0ev" path="res://asset/art/scene/c03/s04_李癞房间/纸钱.png" id="14_ueha8"] +[ext_resource type="Texture2D" uid="uid://wtifvyytbb4t" path="res://asset/art/scene/c03/s04_李癞房间/招魂幡静态.png" id="15_r0k7c"] +[ext_resource type="Texture2D" uid="uid://diimwy2vwda4i" path="res://asset/art/scene/c03/s04_李癞房间/丧事柜子部件.png" id="16_4umel"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_k01ve"] @@ -47,7 +52,7 @@ texture = ExtResource("4_byh4s") offset = Vector2(0, -158) [node name="portal_left" parent="Ground/DeployLayer" index="0"] -position = Vector2(18, 29) +position = Vector2(21, 33) [node name="portal_right" parent="Ground/DeployLayer" index="1"] position = Vector2(632, 31) @@ -82,11 +87,41 @@ enabled = false position = Vector2(537, 55) prop_key = "prop_胖子的钥匙" -[node name="Closeup李氏纸人" parent="Ground/DeployLayer" index="6" instance=ExtResource("6_dbkw8")] +[node name="Event2D香炉" type="Node2D" parent="Ground/DeployLayer" index="6"] +script = ExtResource("12_0jb1q") +event_name = &"c03_li_paperwoman" +event_stages = Array[int]([3]) +metadata/_custom_type_script = "uid://bkkiyk5jkdw4d" + +[node name="Pickable香" parent="Ground/DeployLayer/Event2D香炉" instance=ExtResource("9_m8bf2")] +position = Vector2(62, 31) +prop_key = "prop_一把香" + +[node name="花圈" type="Sprite2D" parent="Ground/DeployLayer/Event2D香炉"] +position = Vector2(405, -36) +texture = ExtResource("13_npwi0") + +[node name="纸钱" type="Sprite2D" parent="Ground/DeployLayer/Event2D香炉"] +position = Vector2(316, 105) +texture = ExtResource("14_ueha8") + +[node name="招魂幡静态" type="Sprite2D" parent="Ground/DeployLayer/Event2D香炉"] +position = Vector2(191, 10) +texture = ExtResource("15_r0k7c") + +[node name="丧事柜子部件" type="Sprite2D" parent="Ground/DeployLayer/Event2D香炉"] +position = Vector2(64, 46) +texture = ExtResource("16_4umel") + +[node name="床上死人" type="Sprite2D" parent="Ground/DeployLayer/Event2D香炉"] +position = Vector2(145, 48) + +[node name="Closeup李氏纸人" parent="Ground/DeployLayer" index="7" instance=ExtResource("6_dbkw8")] unique_name_in_owner = true -position = Vector2(379, 48) +position = Vector2(372, 40) texture = ExtResource("11_7d7lv") packed_scene = ExtResource("10_o2w5q") +sign_mark_offset = Vector2(0, -11.02) [node name="EventBinder" type="Node" parent="Ground/DeployLayer/Closeup李氏纸人"] script = ExtResource("4_35fjj") @@ -97,7 +132,7 @@ updater_stage_mode = "exclude" updater_stages = Array[int]([0, 3]) metadata/_custom_type_script = "uid://0wjaho6qkg6s" -[node name="Pickable药方" parent="Ground/DeployLayer" index="7" instance=ExtResource("9_m8bf2")] +[node name="Pickable药方" parent="Ground/DeployLayer" index="8" instance=ExtResource("9_m8bf2")] unique_name_in_owner = true position = Vector2(76, 42) prop_key = "prop_药方" @@ -105,7 +140,7 @@ prop_key = "prop_药方" [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(63, 100) catty_light_energy = 0.5 -player_movement_rect = Rect2(26, -158, 445, 316) +player_movement_rect = Rect2(20, -158, 608, 316) facing_direction = Vector2(1, 0) [node name="CameraFocusMarker" parent="Ground" index="6"] @@ -115,12 +150,11 @@ limit_right = 648 limit_bottom = 158 [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] -visible = false texture = ExtResource("5_vjibx") offset = Vector2(0, -158) [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] -points = PackedVector2Array(26, 150, 471, 149) +points = PackedVector2Array(20, 150, 628, 149) [node name="DirectionalLight2D" parent="Ground" index="8"] visible = false diff --git a/scene/ground/scene/c03/s05_肉铺.tscn b/scene/ground/scene/c03/s05_肉铺.tscn index 8d7b62d6..d7b4eaa8 100644 --- a/scene/ground/scene/c03/s05_肉铺.tscn +++ b/scene/ground/scene/c03/s05_肉铺.tscn @@ -50,7 +50,7 @@ position = Vector2(540, 24) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(63, 95) catty_light_energy = 0.5 -player_movement_rect = Rect2(26, -158, 487, 316) +player_movement_rect = Rect2(26, -158, 508, 316) facing_direction = Vector2(1, 0) [node name="CameraFocusMarker" parent="Ground" index="6"] @@ -65,7 +65,7 @@ texture = ExtResource("5_l22xv") offset = Vector2(0, -158) [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] -points = PackedVector2Array(26, 150, 513, 150) +points = PackedVector2Array(26, 150, 534, 150) [node name="DirectionalLight2D" parent="Ground" index="8"] visible = false diff --git a/scene/ground/scene/c03/s07_屠宰间.tscn b/scene/ground/scene/c03/s07_屠宰间.tscn index c67dee7a..3dfd6129 100644 --- a/scene/ground/scene/c03/s07_屠宰间.tscn +++ b/scene/ground/scene/c03/s07_屠宰间.tscn @@ -50,7 +50,7 @@ target_scene = "c03_s05" target_portal = "1" [node name="portal_right" parent="Ground/DeployLayer" index="1"] -position = Vector2(736, 23) +position = Vector2(636, 21) [node name="悬挂物" type="Node2D" parent="Ground/DeployLayer" index="2"] diff --git a/scene/ground/scene/c03/s09_棺材房.tscn b/scene/ground/scene/c03/s09_棺材房.tscn index fe3390d7..eb6ccdba 100644 --- a/scene/ground/scene/c03/s09_棺材房.tscn +++ b/scene/ground/scene/c03/s09_棺材房.tscn @@ -50,7 +50,7 @@ position = Vector2(873, 15) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(63, 95) catty_light_energy = 0.5 -player_movement_rect = Rect2(80, -158, 394, 316) +player_movement_rect = Rect2(77, -158, 409, 316) facing_direction = Vector2(1, 0) [node name="CameraFocusMarker" parent="Ground" index="6"] @@ -66,7 +66,7 @@ texture = ExtResource("5_sssik") offset = Vector2(0, -147) [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] -points = PackedVector2Array(80, 150, 474, 151) +points = PackedVector2Array(77, 150, 486, 151) [node name="DirectionalLight2D" parent="Ground" index="8"] visible = false diff --git a/scene/ground/script/c03/s04_closeup整理麻将游戏.gd b/scene/ground/script/c03/s04_closeup整理麻将游戏.gd index bc76e3f5..4c77bad6 100644 --- a/scene/ground/script/c03/s04_closeup整理麻将游戏.gd +++ b/scene/ground/script/c03/s04_closeup整理麻将游戏.gd @@ -121,7 +121,7 @@ func _check_if_success() -> void: freezing = true SceneManager.disable_prop_item("prop_麻将") SceneManager.disable_prop_item("prop_麻将2") - SceneManager.enable_important_item("prop_两个麻将") + SceneManager.enable_important_item("prop_两个麻将", false) # 下一阶段 EventManager.set_stage_if_greater("c03_mahjong_game", 1) DialogueManager.show_dialogue_balloon(c03_dialog, "c03_s04_整理麻将游戏0") diff --git a/scene/ground/script/c03/s04_closeup李氏纸人.gd b/scene/ground/script/c03/s04_closeup李氏纸人.gd index f475d570..ac920915 100644 --- a/scene/ground/script/c03/s04_closeup李氏纸人.gd +++ b/scene/ground/script/c03/s04_closeup李氏纸人.gd @@ -3,7 +3,77 @@ extends CanvasLayer @warning_ignore("unused_signal") signal exit(arg) +@onready var animation_player = $AnimationPlayer as AnimationPlayer +var current_stage := 0 + func _ready() -> void: layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME - %"Draggable纸钱3".picked.connect(GlobalFunctor.c03_get_paper_coin, CONNECT_ONE_SHOT) + # c03_li_paperwoman: 0:初始化隐藏 1:显示纸人 2:纸舌头完成 3:给药完成 + current_stage = EventManager.get_stage("c03_li_paperwoman") + if current_stage == 1: + await Util.wait(1.0) + SceneManager.pop_center_notification("ui_center_notify_c03纸人浆糊舌头") + if current_stage == 2: + $"断舌头粘完整".show() + await Util.wait(1.0) + SceneManager.pop_center_notification("ui_center_notify_c03纸人求药") + +var paste_used := false +var holding := false + +func _unhandled_input(event: InputEvent) -> void: + if event.is_action_pressed("interact"): + get_viewport().set_input_as_handled() + if holding: + return + var prop = SceneManager.get_current_prop() + var prop_hud = SceneManager.get_prop_hud() + if current_stage == 1: + if not paste_used: + if prop == "prop_一碗浆糊": + $"Sfx使用浆糊".play() + paste_used = true + var sprite = $"断舌头涂胶水" + sprite.show() + sprite.modulate.a = 0.0 + create_tween().tween_property(sprite, "modulate:a", 1.0, 1.0) + return + else: + # 浆糊&纸舌头 -> 纸钱 + if prop == "prop_纸舌头": + holding = true + $"Sfx使用纸舌头".play() + var sprite = $"断舌头粘完整" + sprite.show() + sprite.modulate.a = 0.0 + create_tween().tween_property(sprite, "modulate:a", 1.0, 1.0) + animation_player.play("give_coin") + await animation_player.animation_finished + # 浆糊可以用两次 + SceneManager.disable_prop_item("prop_纸舌头") + GlobalFunctor.c03_get_paper_coin() + EventManager.set_stage_if_greater("c03_li_paperwoman", 2) + current_stage = 2 + animation_player.play("RESET") + holding = false + return + elif current_stage == 2: + if prop == "prop_药包": + holding = true + # 给药 -> 2013 钥匙 (prop_胖子的钥匙) + $"Sfx使用药包".play() + animation_player.play("give_key") + await animation_player.animation_finished + current_stage = 3 + EventManager.set_stage_if_greater("c03_li_paperwoman", 3) + SceneManager.enable_prop_item("prop_胖子的钥匙") + animation_player.play("RESET") + # 交互完成,退出 + exit.emit(true) + holding = false + return + if GlobalConfig.DEBUG: + print("无效的道具:%s" % prop) + $SfxInvalid.play() + prop_hud.on_toggle_invalid_prop() diff --git a/scene/ground/script/c03/s04_closeup李氏纸人.tscn b/scene/ground/script/c03/s04_closeup李氏纸人.tscn index f14bde4f..d50ecc01 100644 --- a/scene/ground/script/c03/s04_closeup李氏纸人.tscn +++ b/scene/ground/script/c03/s04_closeup李氏纸人.tscn @@ -1,21 +1,96 @@ -[gd_scene load_steps=12 format=3 uid="uid://t61o0vpm0e11"] +[gd_scene load_steps=21 format=3 uid="uid://t61o0vpm0e11"] [ext_resource type="Script" uid="uid://dvjh42hafpmg3" path="res://scene/ground/script/c03/s04_closeup李氏纸人.gd" id="1_nmxob"] [ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/遮罩/inspect特写通用遮罩.png" id="2_3rwht"] [ext_resource type="Texture2D" uid="uid://d2guuthhg87pb" path="res://asset/art/scene/c03/s04_李癞房间/李氏特写/背景.png" id="2_on24v"] -[ext_resource type="PackedScene" uid="uid://bg7oictr1wgex" path="res://scene/little_game/general/draggable.tscn" id="2_ov1mc"] -[ext_resource type="Texture2D" uid="uid://fspvmlydy3hu" path="res://asset/art/scene/c03/s03_瞎子理发店/癞子特写/纸钱2.png" id="3_on24v"] [ext_resource type="Texture2D" uid="uid://cjc8ce4n5p3ct" path="res://asset/art/scene/c03/s04_李癞房间/李氏特写/人.png" id="3_qqxug"] -[ext_resource type="PackedScene" uid="uid://bkk1rxx36ghrl" path="res://scene/entity/ux/hover_light_click_area.tscn" id="4_ncmgt"] -[ext_resource type="Script" uid="uid://0wjaho6qkg6s" path="res://manager/event_manager/event_binder.gd" id="4_qqxug"] +[ext_resource type="AudioStream" uid="uid://has5y3j2yyp7" path="res://asset/audio/sfx/UI/纸条包裹钥匙.ogg" id="4_dwx4w"] +[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_vcv6g"] +[ext_resource type="Texture2D" uid="uid://bt2q4bbbai78d" path="res://asset/art/prop/c03/胖子的钥匙.png" id="5_ncmgt"] [ext_resource type="Texture2D" uid="uid://dkkc1cus5p3td" path="res://asset/art/scene/c03/s04_李癞房间/李氏特写/拿东西.png" id="5_vcv6g"] +[ext_resource type="AudioStream" uid="uid://bb6xofiqjvid8" path="res://asset/audio/sfx/UI/关闭报纸.ogg" id="6_40v3c"] [ext_resource type="Texture2D" uid="uid://wch8wpokpwy" path="res://asset/art/scene/c03/s04_李癞房间/李氏特写/要东西.png" id="6_qqxug"] +[ext_resource type="AudioStream" uid="uid://c3qonrtdjnmau" path="res://asset/audio/sfx/UI/纸声.ogg" id="7_lqbuh"] +[ext_resource type="Texture2D" uid="uid://g2jlyvf718h" path="res://asset/art/prop/c03/纸铜钱1.png" id="7_vcv6g"] +[ext_resource type="AudioStream" uid="uid://dph8v3v5mq1xl" path="res://asset/audio/sfx/交互/sfx_交互失败.ogg" id="8_3m4i6"] +[ext_resource type="Texture2D" uid="uid://sreapb4mhlu8" path="res://asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头.png" id="10_ncmgt"] +[ext_resource type="Texture2D" uid="uid://dyaknn88pri7g" path="res://asset/art/scene/c03/s04_李癞房间/李氏特写/断舌头涂胶水.png" id="11_klpdo"] +[ext_resource type="Texture2D" uid="uid://cquvr5fjd3vlu" path="res://asset/art/scene/c03/s04_李癞房间/李氏特写/胶水(合并).png" id="12_022we"] -[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_ncmgt"] +[sub_resource type="Animation" id="Animation_klpdo"] +resource_name = "give_key" +length = 2.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("给钥匙的手:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector2(126, 405), Vector2(103, 212)] +} + +[sub_resource type="Animation" id="Animation_022we"] +resource_name = "give_coin" +length = 2.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("给纸钱的手:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector2(425, 379), Vector2(423, 247)] +} + +[sub_resource type="Animation" id="Animation_2nb82"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("给纸钱的手:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(425, 379)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("给钥匙的手:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(126, 405)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_dwx4w"] +_data = { +&"RESET": SubResource("Animation_2nb82"), +&"give_coin": SubResource("Animation_022we"), +&"give_key": SubResource("Animation_klpdo") +} [node name="Closeup李氏纸人" type="CanvasLayer"] script = ExtResource("1_nmxob") +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +&"": SubResource("AnimationLibrary_dwx4w") +} + [node name="BG" type="TextureRect" parent="."] anchors_preset = 15 anchor_right = 1.0 @@ -34,52 +109,64 @@ grow_vertical = 2 texture = ExtResource("3_qqxug") stretch_mode = 5 -[node name="拿东西的手" parent="." instance=ExtResource("4_ncmgt")] -position = Vector2(129, 210) +[node name="Sfx使用浆糊" type="AudioStreamPlayer" parent="."] +stream = ExtResource("4_dwx4w") +bus = &"game_sfx" +script = ExtResource("4_vcv6g") +metadata/_custom_type_script = "uid://rq6w1vuhuq1m" -[node name="拿东西" type="Sprite2D" parent="拿东西的手"] +[node name="Sfx使用纸舌头" type="AudioStreamPlayer" parent="."] +stream = ExtResource("6_40v3c") +bus = &"game_sfx" +script = ExtResource("4_vcv6g") +metadata/_custom_type_script = "uid://rq6w1vuhuq1m" + +[node name="Sfx使用药包" type="AudioStreamPlayer" parent="."] +stream = ExtResource("7_lqbuh") +bus = &"game_sfx" +script = ExtResource("4_vcv6g") +metadata/_custom_type_script = "uid://rq6w1vuhuq1m" + +[node name="SfxInvalid" type="AudioStreamPlayer" parent="."] +stream = ExtResource("8_3m4i6") +bus = &"game_sfx" +script = ExtResource("4_vcv6g") +metadata/_custom_type_script = "uid://rq6w1vuhuq1m" + +[node name="给钥匙的手" type="Sprite2D" parent="."] +position = Vector2(126, 405) texture = ExtResource("5_vcv6g") -[node name="PointLight2D" type="PointLight2D" parent="拿东西的手"] -position = Vector2(1, 0) -range_layer_max = 10 -texture = ExtResource("5_vcv6g") +[node name="钥匙" type="Sprite2D" parent="给钥匙的手"] +position = Vector2(12, -2) +rotation = -2.12894 +scale = Vector2(0.5, 0.5) +skew = 0.0698132 +texture = ExtResource("5_ncmgt") -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="拿东西的手"] -polygon = PackedVector2Array(-11, -86.5, -19.7, -79.5, -26, -79.5, -34, -69.2, -34, -67.8, -38.5, -65.5, -41.1, -65.5, -44, -60.7, -44, -32.9, -31, -5.9, -38, 3.8, -38, 18.7, -27.1, 86.5, 44, 86.5, 44, -0.300003, 36.5, -8.8, 44, -30.2, 44, -36, 34.2, -54.5, 30, -77.8, 30, -82.2, 27, -86.2) - -[node name="要东西的手" parent="." instance=ExtResource("4_ncmgt")] -position = Vector2(410, 241) - -[node name="要东西" type="Sprite2D" parent="要东西的手"] -texture = SubResource("CompressedTexture2D_ncmgt") - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="要东西的手"] -polygon = PackedVector2Array(18, -53.4, 16, -53.5, -26.1, -53.5, -31.4, -51.5, -33.9, -51.5, -44.9, -39.5, -46.2, -39.5, -63, -9.6, -63, 11.9, -60.6, 13.5, -57.3, 13.5, -52.8, 9.6, -52, 17.7, -52, 20.3, -36.8, 35.5, -36.1, 35.5, -24.4, 53.5, 63, 53.5, 63, 48.5, 48.3, 15.5, 47.5, 15.5, 43.6, -0.5, 56.5, -0.5, 63, -4.2, 63, -13, 34.6, -33.5, 32.2, -33.5, 29, -40, 29, -42.4, 18, -51.5) - -[node name="PointLight2D" type="PointLight2D" parent="要东西的手"] -range_layer_max = 10 +[node name="给纸钱的手" type="Sprite2D" parent="."] +position = Vector2(425, 379) texture = ExtResource("6_qqxug") -[node name="Draggable纸钱3" parent="." instance=ExtResource("2_ov1mc")] -unique_name_in_owner = true +[node name="纸钱" type="Sprite2D" parent="给纸钱的手"] +position = Vector2(-16, -11) +scale = Vector2(0.5, 0.5) +skew = 0.136136 +texture = ExtResource("7_vcv6g") + +[node name="断舌头" type="Sprite2D" parent="."] +position = Vector2(280, 175) +texture = ExtResource("10_ncmgt") + +[node name="断舌头涂胶水" type="Sprite2D" parent="."] visible = false -position = Vector2(237, 140) -act_as_button = true -texture = ExtResource("3_on24v") +position = Vector2(280, 175.5) +texture = ExtResource("11_klpdo") -[node name="EventBinder" type="Node" parent="Draggable纸钱3"] -script = ExtResource("4_qqxug") -updater_event = &"c03_papercoin3" -updater_mode = "shower" -updater_ease_duration = 0.0 -updater_stages = Array[int]([0]) -trigger_event = &"c03_papercoin3" -trigger_mode = "picked" -metadata/_custom_type_script = "uid://0wjaho6qkg6s" - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Draggable纸钱3"] -polygon = PackedVector2Array(13, -30, -9.5, -30, -19.5, -25, -22.1, -25, -30, -12.2, -30, 14.1, -25, 21.6, -25, 24.3, -12, 30, 13.7, 30, 21.6, 25, 24.2, 25, 30, 14.5, 30, -11, 26, -17.6, 26, -20, 13, -29) +[node name="断舌头粘完整" type="Sprite2D" parent="."] +visible = false +position = Vector2(280, 202.5) +texture = ExtResource("12_022we") [node name="遮罩" type="TextureRect" parent="."] anchors_preset = 15 diff --git a/scene/ground/script/c03/鱼眼镜头crt.gdshader b/scene/ground/script/c03/鱼眼镜头crt.gdshader index f988a0a4..5f4b5a4e 100644 --- a/scene/ground/script/c03/鱼眼镜头crt.gdshader +++ b/scene/ground/script/c03/鱼眼镜头crt.gdshader @@ -17,10 +17,10 @@ uniform vec3 color_shift = vec3(0.95, 1.05, 0.95); vec2 apply_fisheye(vec2 uv) { vec2 centered = uv - 0.5; float dist = length(centered); - + // 避免除零和优化计算 if (dist < 0.001) return uv; - + // 使用更高效的鱼眼公式 float factor = 1.0 + (fisheye_strength - 1.0) * dist * dist; return 0.5 + centered * factor; @@ -30,15 +30,15 @@ vec2 apply_fisheye(vec2 uv) { vec2 apply_crt_curve(vec2 uv) { vec2 centered = (uv - 0.5) * 2.0; centered *= 1.1 * curve_strength; - + // 简化的曲线计算 vec2 curve_factor; curve_factor.x = 1.0 + pow(abs(centered.y) * 0.2, 2.0); curve_factor.y = 1.0 + pow(abs(centered.x) * 0.25, 2.0); - + centered *= curve_factor; centered = centered * 0.5 + 0.5; - + // 边界调整 return centered * 0.92 + 0.04; } @@ -54,55 +54,55 @@ vec3 sample_with_chromatic_aberration(sampler2D tex, vec2 uv, float offset) { void fragment() { vec2 screen_uv = SCREEN_UV; - + // 应用畸变效果 vec2 distorted_uv = apply_fisheye(screen_uv); distorted_uv = apply_crt_curve(distorted_uv); - + // 边界检查(提前返回以节省计算) - if (distorted_uv.x < 0.0 || distorted_uv.x > 1.0 || + if (distorted_uv.x < 0.0 || distorted_uv.x > 1.0 || distorted_uv.y < 0.0 || distorted_uv.y > 1.0) { COLOR = vec4(0.0, 0.0, 0.0, 1.0); } else{ // 计算扭曲偏移 float time_factor = TIME * 0.3; - float distortion = sin(time_factor + distorted_uv.y * 21.0) * - sin(TIME * 0.7 + distorted_uv.y * 29.0) * - sin(0.3 + TIME * 0.33 + distorted_uv.y * 31.0) * + float distortion = sin(time_factor + distorted_uv.y * 21.0) * + sin(TIME * 0.7 + distorted_uv.y * 29.0) * + sin(0.3 + TIME * 0.33 + distorted_uv.y * 31.0) * distortion_amount; - + // 采样并应用色差 vec2 sample_uv = distorted_uv + vec2(distortion, 0.0); vec3 color = sample_with_chromatic_aberration(screen_texture, sample_uv, chromatic_aberration); - + // 添加辉光效果(简化版) vec3 glow = sample_with_chromatic_aberration(screen_texture, sample_uv * 0.75, chromatic_aberration * 1.5); color += glow * 0.07; - + // 色彩调整 color = clamp(color * 0.6 + 0.4 * color * color, 0.0, 1.0); - + // 晕影效果 vec2 vignette_coord = distorted_uv * (1.0 - distorted_uv); float vignette = pow(vignette_coord.x * vignette_coord.y * 16.0, vignette_intensity); color *= vignette; - + // 扫描线效果 float scanline = sin(distorted_uv.y * 1.0 / SCREEN_PIXEL_SIZE.y * 1.5 + TIME * scanline_speed); scanline = clamp(scanline_intensity + scanline_intensity * scanline, 0.0, 1.0); color *= 0.4 + 0.7 * pow(scanline, 1.7); - + // 颜色偏移和亮度调整 color *= color_shift * brightness; - + // CRT像素网格效果 float pixel_mask = 1.0 - 0.65 * step(0.5, mod(FRAGCOORD.x, 2.0)); color *= pixel_mask; - + // 轻微的闪烁效果 color *= 1.0 + 0.01 * sin(TIME * 110.0); - - COLOR = vec4(color, 1.0); + + COLOR = vec4(color, 1.0); } } \ No newline at end of file