diff --git a/asset/art/gif/c01_书店外街道/frames.tres b/asset/art/gif/c01_书店外街道/frames.tres index 86a71031..060bcf14 100644 --- a/asset/art/gif/c01_书店外街道/frames.tres +++ b/asset/art/gif/c01_书店外街道/frames.tres @@ -440,7 +440,7 @@ animations = [{ "duration": 15.0, "texture": ExtResource("4_aoxrf") }], -"loop": false, +"loop": true, "name": &"杂戏团夜晚_小孩举碗呼吸", "speed": 30.0 }, { @@ -457,7 +457,7 @@ animations = [{ "duration": 6.0, "texture": ExtResource("4_rfcie") }], -"loop": true, +"loop": false, "name": &"杂戏团夜晚_小孩放下碗", "speed": 30.0 }, { diff --git a/asset/art/scene/c01/s07_书店外/e_纸钱.png b/asset/art/scene/c01/s07_书店外/e_纸钱.png new file mode 100644 index 00000000..fb00cc30 Binary files /dev/null and b/asset/art/scene/c01/s07_书店外/e_纸钱.png differ diff --git a/asset/art/scene/c01/s07_书店外/e_纸钱.png.import b/asset/art/scene/c01/s07_书店外/e_纸钱.png.import new file mode 100644 index 00000000..6e89c8b2 --- /dev/null +++ b/asset/art/scene/c01/s07_书店外/e_纸钱.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6vh5m2p3v0t3" +path="res://.godot/imported/e_纸钱.png-b64b4f8d8ba52d922653f741327ed2ca.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/scene/c01/s07_书店外/e_纸钱.png" +dest_files=["res://.godot/imported/e_纸钱.png-b64b4f8d8ba52d922653f741327ed2ca.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/c01.csv b/asset/dialogue/c01.csv index db618163..2dcde630 100644 --- a/asset/dialogue/c01.csv +++ b/asset/dialogue/c01.csv @@ -27,7 +27,6 @@ c01_s06_谈论鬼差8,啊!,,小蝶,,[#wait=0.5] c01_s06_谈论鬼差9,(台词设计)3...2...1...,,小胖孩,,[#wait=3] c01_s08_书店进门老板台词,把报纸放在柜台上吧,,书店老板,, c01_s08_书店老板任务,(台词设计:安排⼯作,整理书架,有封寄给玩家的信,放在柜台上),,书店老板,, -c01_s12_书店外发钱,发钱了!发赏钱啦!,,小孩,, c01_吕萍与车夫_01,“又是这个梦”,,吕萍,, c01_吕萍与车夫_02,“这个星期已经第三次了”,,吕萍,, c01_吕萍与车夫_03,“我到底是怎么了”,,吕萍,, @@ -58,3 +57,9 @@ c01_吕萍与车夫_27,“哎哟,谢什么”,,车夫,, c01_吕萍与车夫_28,“哦,位子上这份信是你的吧,别忘记了”,,车夫,, c01_吕萍与车夫_29,“对的对的,差点就忘记了,谢谢师傅,新年快乐”,,吕萍,, c01_吕萍与车夫_30,“新年快乐”,,车夫,, +c01_s12_书店外发钱,发钱了!发赏钱啦!,,小男孩,, +c01_s12_小孩放下碗,(台词设计)吕萍跑哪去了?为什么没有一起表演,,小男孩,, +c01_s12_鬼差来之前对话1,(demo)咦,好大一个银圆!这上面是什么...怎么有个⼤光头?,,小男孩,, +c01_s12_鬼差来之前对话2,(demo)从来没见过这样的,你从哪弄来的哇?,,小男孩,, +c01_s12_鬼差来了1,(喵~)(铃铛声和⽔声),,,,[#wait=1] +c01_s12_鬼差来了2,快跑!没时间了!,,陆仁,, diff --git a/asset/dialogue/c01.dialogue b/asset/dialogue/c01.dialogue index 7865c112..61658336 100644 --- a/asset/dialogue/c01.dialogue +++ b/asset/dialogue/c01.dialogue @@ -48,11 +48,6 @@ 书店老板: (台词设计:安排⼯作,整理书架,有封寄给玩家的信,放在柜台上) [ID:c01_s08_书店老板任务] => END -~ c01_s12_诡异的书店外发钱 -小孩: 发钱了!发赏钱啦! [ID:c01_s12_书店外发钱] -=> END - - ~ c01_s11_车夫对话1 吕萍: “又是这个梦” [ID:c01_吕萍与车夫_01] 吕萍: “这个星期已经第三次了” [ID:c01_吕萍与车夫_02] @@ -93,4 +88,26 @@ 车夫: “哦,位子上这份信是你的吧,别忘记了” [ID:c01_吕萍与车夫_28] 吕萍: “对的对的,差点就忘记了,谢谢师傅,新年快乐” [ID:c01_吕萍与车夫_29] 车夫: “新年快乐” [ID:c01_吕萍与车夫_30] -=> END \ No newline at end of file +=> END + +~ c01_s12_诡异的书店外发钱 +小男孩: 发钱了!发赏钱啦! [ID:c01_s12_书店外发钱] +=> END + + +~ c01_s12_小孩放下碗 +小男孩: (台词设计)吕萍跑哪去了?为什么没有一起表演 [ID:c01_s12_小孩放下碗] +=> END + + +~ c01_s12_鬼差来之前对话 +小男孩: (demo)咦,好大一个银圆!这上面是什么...怎么有个⼤光头? [ID:c01_s12_鬼差来之前对话1] +小男孩: (demo)从来没见过这样的,你从哪弄来的哇? [ID:c01_s12_鬼差来之前对话2] +=> END + + +~ c01_s12_鬼差来了 +(喵~)(铃铛声和⽔声)[#wait=1][ID:c01_s12_鬼差来了1] +陆仁: 快跑!没时间了![ID:c01_s12_鬼差来了2] +=> END + diff --git a/asset/dialogue/item_description.csv b/asset/dialogue/item_description.csv index 2423ae45..1a46f099 100644 --- a/asset/dialogue/item_description.csv +++ b/asset/dialogue/item_description.csv @@ -21,6 +21,7 @@ ui_继续游戏,继续游戏,,,, ui_退出游戏,退出游戏,,,, c02_寻人启事,"似乎是一张寻人启事 脸的部分被撕掉了,看不清",,,, +prop_报纸,报纸,,,,[#texture=c01/信碎片1.png] index_新游戏,新游戏,,,, index_继续游戏,继续游戏,,,, index_退出游戏,退出游戏,,,, @@ -55,7 +56,6 @@ prop_空手,空手,,,, prop_信碎片1,信碎片(一),,,,[#texture=c01/信碎片1.png] prop_信碎片2,信碎片(二),,,,[#texture=c01/信碎片1.png] prop_院长的信,院长的信,,,,[#texture=c01/信碎片1.png] -prop_报纸,报纸,,,,[#texture=c01/信碎片1.png] prop_银元,银元,,,,[#texture=c01/银元.png] prop_令牌,令牌,,,,[#texture=c01/令牌物品.png][#inspect=c01/令牌.png] prop_装有灵魂的令牌,装有灵魂的令牌,,,,[#texture=c01/装有灵魂的令牌物品.png][#inspect=c01/装有灵魂的令牌.png] @@ -66,6 +66,7 @@ prop_1012钥匙,1012钥匙,1012 Key,,,[#texture=c02/1012钥匙物品.png][#inspe prop_老虎钳,老虎钳,,,,[#texture=c02/老虎钳物品.png][#inspect=c02/老虎钳.png] prop_3014旋转锁钥匙,3014旋转锁钥匙,,,,[#texture=c02/3014旋转锁钥匙物品.png][#inspect=c02/3014旋转锁钥匙.png] prop_小猫玩具完整,小猫玩具,,,,[#texture=c02/小猫玩具完整物品.png][#inspect=c02/小猫玩具完整.png] +c01_s07_需要报纸,我想先在周围看看,,,, c01_s08_书店工作,我还有工作要做,,,, c01_s08_书店工钱,我还有⼯钱没拿,,,, notes_纸条,纸条,,,, @@ -87,6 +88,7 @@ c01_摆正的洋相片,是院长的女儿吗,,,, c01_s06_院长房间,这是院长的房间,,,, c01_s06_小朋友房间,这是其他小朋友的房间,,,, c01_s07_钱碗,碗⾥是铜钱,,,, +c01_s07_获得报纸,这是什么?,,,, c01_s07_书店展柜,"好多书... 要是能在这里工作就好了",,,, c01_s08_书架游戏完成,"这些书怎么变成这样了? diff --git a/asset/dialogue/item_description.dialogue b/asset/dialogue/item_description.dialogue index c7023d4d..7e0e536c 100644 --- a/asset/dialogue/item_description.dialogue +++ b/asset/dialogue/item_description.dialogue @@ -44,11 +44,10 @@ # texture 路径从 "res://asset/art/prop/" 之后算起 # c01 信碎片(一) [#texture=c01/信碎片1.png] [ID:prop_信碎片1] +银元 [#texture=c01/银元.png] [ID:prop_银元] # TODO 美术资源更换 信碎片(二) [#texture=c01/信碎片1.png] [ID:prop_信碎片2] 院长的信 [#texture=c01/信碎片1.png] [ID:prop_院长的信] -报纸 [#texture=c01/信碎片1.png] [ID:prop_报纸] -银元 [#texture=c01/银元.png] [ID:prop_银元] 令牌 [#texture=c01/令牌物品.png][#inspect=c01/令牌.png] [ID:prop_令牌] 装有灵魂的令牌 [#texture=c01/装有灵魂的令牌物品.png][#inspect=c01/装有灵魂的令牌.png] [ID:prop_装有灵魂的令牌] # c02 @@ -62,6 +61,7 @@ => END ~ HoldingReason +我想先在周围看看 [ID:c01_s07_需要报纸] 我还有工作要做 [ID:c01_s08_书店工作] 我还有⼯钱没拿 [ID:c01_s08_书店工钱] => END @@ -89,6 +89,7 @@ 这是其他小朋友的房间 [ID:c01_s06_小朋友房间] # c01-s07 书店外 碗⾥是铜钱 [ID:c01_s07_钱碗] +这是什么? [ID:c01_s07_获得报纸] 好多书...\n要是能在这里工作就好了 [ID:c01_s07_书店展柜] # c01-s08 书店 这些书怎么变成这样了?\n好可惜...我可能需要离开了 [ID:c01_s08_书架游戏完成] diff --git a/scene/dialog/balloon_debug.gd b/scene/dialog/balloon_debug.gd index 74e53a2e..e67445ea 100644 --- a/scene/dialog/balloon_debug.gd +++ b/scene/dialog/balloon_debug.gd @@ -69,7 +69,7 @@ var dialogue_line: DialogueLine: responses_menu.hide() responses_menu.set_responses(dialogue_line.responses) - # Show our balloon + # Show our balloons balloon.show() will_hide_balloon = false @@ -81,11 +81,13 @@ var dialogue_line: DialogueLine: balloon.focus_mode = Control.FOCUS_ALL balloon.grab_focus() await get_tree().create_timer(2.0).timeout - next(next_dialogue_line.next_id) + # debug line 不需要下一行,直接释放(避免触发 dialogue_ended 信号) + queue_free() + # next(next_dialogue_line.next_id) - # 如果当前 line 运行结束,则 queue free 释放资源 - if dialogue_line == next_dialogue_line: - queue_free() + # # 如果当前 line 运行结束,则 queue free 释放资源 + # if dialogue_line == next_dialogue_line: + # queue_free() func _ready() -> void: layer = GlobalConfig.CANVAS_LAYER_DIALOG diff --git a/scene/entity/partical/particals_ash_vertical.tscn b/scene/entity/partical/particals_ash_vertical.tscn index 72754b99..0e998fae 100644 --- a/scene/entity/partical/particals_ash_vertical.tscn +++ b/scene/entity/partical/particals_ash_vertical.tscn @@ -1,8 +1,6 @@ -[gd_scene load_steps=9 format=3 uid="uid://dnbutraty2285"] +[gd_scene load_steps=7 format=3 uid="uid://dnbutraty2285"] -[ext_resource type="Texture2D" uid="uid://dskwunl50ntc5" path="res://scene/entity/partical/e_单块碎片白.png" id="1_nwcn3"] -[ext_resource type="Texture2D" uid="uid://byko5uf05is0v" path="res://scene/entity/partical/e_单块碎片灰.png" id="2_80j7c"] -[ext_resource type="Texture2D" uid="uid://csf2hky7p7fn5" path="res://scene/entity/partical/e_单块碎片黑.png" id="3_k6y1m"] +[ext_resource type="Texture2D" uid="uid://6vh5m2p3v0t3" path="res://asset/art/scene/c01/s07_书店外/e_纸钱.png" id="1_hsa64"] [sub_resource type="Gradient" id="Gradient_rwi0m"] offsets = PackedFloat32Array(0, 0.99, 1) @@ -22,7 +20,7 @@ curve = SubResource("Curve_8ybmm") particle_flag_disable_z = true emission_shape_scale = Vector3(1, 1, 0) emission_shape = 3 -emission_box_extents = Vector3(750, 20, 0) +emission_box_extents = Vector3(300, 20, 0) angle_min = -300.0 angle_max = 300.0 direction = Vector3(0, 50, 0) @@ -37,28 +35,11 @@ color_ramp = SubResource("GradientTexture1D_5cty7") [node name="ParticalsAsh" type="Node2D"] -[node name="white" type="GPUParticles2D" parent="."] -amount = 300 +[node name="纸钱" type="GPUParticles2D" parent="."] +amount = 200 process_material = SubResource("ParticleProcessMaterial_wa8gc") -texture = ExtResource("1_nwcn3") -lifetime = 100.0 +texture = ExtResource("1_hsa64") +lifetime = 50.0 preprocess = 20.0 visibility_rect = Rect2(-750, 0, 1500, 600) metadata/_edit_vertical_guides_ = [-721.0] - -[node name="grey" type="GPUParticles2D" parent="."] -amount = 300 -process_material = SubResource("ParticleProcessMaterial_wa8gc") -texture = ExtResource("2_80j7c") -lifetime = 100.0 -preprocess = 20.0 -visibility_rect = Rect2(-750, 0, 1500, 600) - -[node name="black" type="GPUParticles2D" parent="."] -amount = 300 -process_material = SubResource("ParticleProcessMaterial_wa8gc") -texture = ExtResource("3_k6y1m") -lifetime = 100.0 -preprocess = 20.0 -visibility_rect = Rect2(-750, 0, 1500, 600) -trail_enabled = true diff --git a/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn b/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn index 1129287c..c487b233 100644 --- a/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn +++ b/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn @@ -127,7 +127,6 @@ offset = Vector2(0, -155) [node name="portal_left" parent="Ground/DeployLayer" index="0"] position = Vector2(144, 20) -immediately = false target_scene = "c01_s05" target_portal = "right" diff --git a/scene/ground/scene/c01/s07_animation.gd b/scene/ground/scene/c01/s07_animation.gd index bb765218..d9b2e074 100644 --- a/scene/ground/scene/c01/s07_animation.gd +++ b/scene/ground/scene/c01/s07_animation.gd @@ -17,6 +17,9 @@ func _ready() -> void: var fog +var seller +var ambush_seller:Ambush2D + func _on_ground_ready() -> void: fog = $"../ParallaxForeground/BGParallaxLayer/Fog" as Fog2D @@ -26,8 +29,31 @@ func _on_ground_ready() -> void: else: fog.visible = true get_tree().create_timer(5.0).timeout.connect(_on_fog_disappear) - + seller = $"../DeployLayer/报童" as AnimatedSprite2D + ambush_seller = $"../DeployLayer/报童/Ambush报童" as Ambush2D + if ambush_seller.played: + # 已交互,不再 holding 门 + $"../DeployLayer/portal_2".holding = false func _on_fog_disappear() -> void: set_data("fog_disappeared", true) - fog.tween_fog(0, Color.TRANSPARENT, Fog2D.FOG_OFFSET_DEFAULT, 15.0, true) \ No newline at end of file + fog.tween_fog(0, Color.TRANSPARENT, Fog2D.FOG_OFFSET_DEFAULT, 15.0, true) + + +func seller_interacted(): + $"../DeployLayer/portal_2".holding = false + # 报童交互 + # TODO 美术素材更新 + SceneManager.pop_debug_dialog_info("美术","报童呼吸帧 + 递报纸的动作") + seller.play("杂戏团夜晚_小孩举碗呼吸") + # 提前写入 prop 中,防止存档 bug,稍后播放获得动画 + ArchiveManager.archive.prop_inventory.enable_item("prop_信碎片2") + await get_tree().create_timer(1.0).timeout + # TODO 美术素材更新 + seller.play("杂戏团黄昏_举碗小孩") + var msg = tr("c01_s07_获得报纸") + var lines = await DialogueUtil.generate_lines(msg) + SceneManager.pop_os(lines) + # 播放获得动画 + await get_tree().create_timer(2.0).timeout + SceneManager.enable_prop_item("prop_信碎片2") diff --git a/scene/ground/scene/c01/s07_书店外.tscn b/scene/ground/scene/c01/s07_书店外.tscn index c727ca3e..bba15db4 100644 --- a/scene/ground/scene/c01/s07_书店外.tscn +++ b/scene/ground/scene/c01/s07_书店外.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=3 uid="uid://ds2iyfndwamiy"] +[gd_scene load_steps=18 format=3 uid="uid://ds2iyfndwamiy"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_2vqpo"] [ext_resource type="Script" path="res://scene/ground/scene/c01/s07_animation.gd" id="2_dhaq4"] @@ -11,6 +11,7 @@ [ext_resource type="PackedScene" uid="uid://0sofmhrl358m" path="res://scene/entity/npc.tscn" id="6_fw22n"] [ext_resource type="SpriteFrames" uid="uid://cvkuw35ulebme" path="res://asset/art/gif/c01_书店外街道/frames.tres" id="6_thm8f"] [ext_resource type="Texture2D" uid="uid://cs56isj1je50a" path="res://asset/art/scene/c01/s07_书店外/fog_mask.png" id="7_bukhd"] +[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="9_f61dl"] [ext_resource type="Texture2D" uid="uid://cxi0n7ra3blhr" path="res://asset/art/scene/c01/s07_书店外/书店外街道黄昏参考.png" id="12_vjih6"] [sub_resource type="FastNoiseLite" id="FastNoiseLite_munbn"] @@ -79,6 +80,8 @@ portal_name = "2" target_scene = "c01_s08" target_portal = "left" status = "opened" +holding = true +holding_reason_key = "c01_s07_需要报纸" [node name="Npc推箱子小孩" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_fw22n")] position = Vector2(279, 0) @@ -113,7 +116,19 @@ position = Vector2(6, 57) title_filter = "c01" note_key = "c01_s07_钱碗" -[node name="Note橱柜" parent="Ground/DeployLayer" index="7" instance=ExtResource("5_3pha1")] +[node name="报童" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="7"] +position = Vector2(1311, -1) +sprite_frames = ExtResource("6_thm8f") +animation = &"杂戏团黄昏_举碗小孩" +autoplay = "杂戏团黄昏_举碗小孩" + +[node name="Ambush报童" parent="Ground/DeployLayer/报童" instance=ExtResource("9_f61dl")] +position = Vector2(6, 47) +trigger_mode = "interact" +freeze_time = 1.0 +hook_method = "seller_interacted" + +[node name="Note橱柜" parent="Ground/DeployLayer" index="8" instance=ExtResource("5_3pha1")] position = Vector2(933, 30) action = 5 title_filter = "c01" diff --git a/scene/ground/scene/c01/s08_animation.gd b/scene/ground/scene/c01/s08_animation.gd index f5e0d64a..cfa806c7 100644 --- a/scene/ground/scene/c01/s08_animation.gd +++ b/scene/ground/scene/c01/s08_animation.gd @@ -48,7 +48,6 @@ func _on_ground_ready() -> void: if counter.interacted_times > 0: ladder.enabled = true envolope_table.enabled = true - $"../DeployLayer/Ambush银元".enabled = true else: counter.interacted.connect(assign_tasks, CONNECT_ONE_SHOT) ladder.enabled = false @@ -89,9 +88,10 @@ func _check_envelope_game(open_game := true) -> void: func first_enter_door() -> void: + await get_tree().create_timer(2.).timeout + SceneManager.freeze_player(0) DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s08_书店进门老板台词") DialogueManager.dialogue_ended.connect(_on_dialogue_ended, CONNECT_ONE_SHOT) - SceneManager.freeze_player(0) func _on_dialogue_ended(_res) -> void: @@ -99,9 +99,11 @@ func _on_dialogue_ended(_res) -> void: func assign_tasks() -> void: + SceneManager.freeze_player(0) + SceneManager.pop_debug_dialog_info("美术", "放报纸动作") + await get_tree().create_timer(1.).timeout DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s08_书店老板任务") DialogueManager.dialogue_ended.connect(_on_dialogue_ended, CONNECT_ONE_SHOT) - SceneManager.freeze_player(0) ladder.enabled = true envolope_table.enabled = true @@ -152,6 +154,7 @@ func _on_fall_off_finished() -> void: get_tree().create_timer(1.0).timeout.connect(callback) func _setup_weird_bookstore() -> void: + coin.enabled = true ladder.enabled = false manager.visible = false mice.visible = true diff --git a/scene/ground/scene/c01/s08_书店.tscn b/scene/ground/scene/c01/s08_书店.tscn index bedf0ac2..9280cb4f 100644 --- a/scene/ground/scene/c01/s08_书店.tscn +++ b/scene/ground/scene/c01/s08_书店.tscn @@ -100,8 +100,6 @@ scatter_on_start = true [node name="Interactable报纸柜台" parent="Ground/DeployLayer" index="6" instance=ExtResource("7_fue0t")] position = Vector2(135, 49) -disable_prop_after_interacted = true -prop_key = "prop_报纸" [node name="Ambush银元" parent="Ground/DeployLayer" index="7" instance=ExtResource("4_c4lg5")] position = Vector2(537, 21) diff --git a/scene/ground/scene/c01/s12_animation.gd b/scene/ground/scene/c01/s12_animation.gd index 1fd7d95b..74277d24 100644 --- a/scene/ground/scene/c01/s12_animation.gd +++ b/scene/ground/scene/c01/s12_animation.gd @@ -13,46 +13,95 @@ func _ready() -> void: return +var mice var ghost var begger -var interactable_bowl +var ambush_begger: Ambush2D +var interactable_bowl: Interactable2D func _on_ground_ready() -> void: + mice = $"../DeployLayer/自动跟随的老鼠" ghost = $"../DeployLayer/Ghost" begger = $"../DeployLayer/举碗小孩" - interactable_bowl = $"../DeployLayer/举碗小孩/Interactable银元" - interactable_bowl.interacted.connect(_on_interactable_bowl_interacted) + ambush_begger = $"../DeployLayer/举碗小孩/Ambush举碗小孩" + interactable_bowl = $"../DeployLayer/举碗小孩/Interactable碗" + interactable_bowl.interacted.connect(_on_interactable_bowl_interacted, CONNECT_ONE_SHOT) + # 玩家先和小孩互动,再和碗互动 + if ambush_begger.played: + ambush_begger.enabled = false + interactable_bowl.enabled = true + begger.play("杂戏团夜晚_小孩放下碗") + $"../DeployLayer/飘动的寻人启事".visible = true # test # call_deferred("_ghost_move") +func intro() -> void: + begger.play("杂戏团夜晚_小孩举碗呼吸") + # SceneManager.freeze_player(0) + # SceneManager.focus_node(begger, 5.) + get_tree().create_timer(1.).timeout.connect(_intro_dialog) + + +func _intro_dialog() -> void: + DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s12_诡异的书店外发钱") + # DialogueManager.dialogue_ended.connect(_on_intro_dialogue_ended, CONNECT_ONE_SHOT) + # func _on_intro_dialogue_ended(_res) -> void: + # SceneManager.focus_player_and_reset_zoom(5.) + # SceneManager.release_player() + + +func ambush_begger_interacted(): + ambush_begger.enabled = false + begger.play("杂戏团夜晚_小孩放下碗") + SceneManager.freeze_player(0) + await get_tree().create_timer(1.).timeout + DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s12_小孩放下碗") + DialogueManager.dialogue_ended.connect( + _on_ambush_begger_interacted_dialogue_ended, CONNECT_ONE_SHOT + ) + + +func _on_ambush_begger_interacted_dialogue_ended(_res) -> void: + SceneManager.release_player() + interactable_bowl.enabled = true + + func _on_interactable_bowl_interacted() -> void: - # TODO ⼩男孩询问吕萍银元从哪⾥弄来的 - pass + # TODO 其他⼩孩此时停下表演 + SceneManager.pop_debug_dialog_info("美术", "其他⼩孩此时停下表演") + $"../DeployLayer/其余小孩".pause() + $"../DeployLayer/陆仁舞刀".pause() + SceneManager.freeze_player(0) + # ⼩男孩询问吕萍银元从哪⾥弄来的 + DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s12_鬼差来之前对话") + DialogueManager.dialogue_ended.connect(_on_ghost_coming, CONNECT_ONE_SHOT) -func _ghost_move() -> void: +func _on_ghost_coming(_res) -> void: + DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s12_鬼差来了") + DialogueManager.dialogue_ended.connect(mice.flush_right_and_disable, CONNECT_ONE_SHOT) + # DialogueManager.dialogue_ended.connect(_ghost_move, CONNECT_ONE_SHOT) + _ghost_move(null) + # TODO 动画 + SceneManager.pop_debug_dialog_info("美术", "其他⼩孩害怕 + 陆仁靠近说话") + SceneManager.release_player() + + +func _ghost_move(_res) -> void: + if GlobalConfig.DEBUG: + print("鬼差移动") + $"../DeployLayer/portal_2".enabled = false + SceneManager.pop_debug_dialog_info("音效", "鬼差出现") ghost.visible = true # ghost.play() var tween = create_tween() tween.tween_property(ghost, "global_position", Vector2(1500, 0), 20.0).as_relative() -func intro() -> void: - begger.play("杂戏团夜晚_小孩举碗呼吸") - SceneManager.freeze_player(0) - SceneManager.focus_node(begger, 5.) - get_tree().create_timer(5.).timeout.connect(_intro_dialog) - - -func _intro_dialog() -> void: - DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s12_诡异的书店外发钱") - DialogueManager.dialogue_ended.connect(_on_intro_dialogue_ended) - - -func _on_intro_dialogue_ended(_res) -> void: - begger.play("杂戏团夜晚_小孩放下碗") - SceneManager.focus_player_and_reset_zoom(5.) - SceneManager.release_player() +func player_been_catched() -> void: + # TODO 玩家被抓 + SceneManager.pop_debug_dialog_info("美术", "玩家被鬼差抓住") + get_tree().paused = true diff --git a/scene/ground/scene/c01/s12_书店外_诡异版.tscn b/scene/ground/scene/c01/s12_书店外_诡异版.tscn index 9eadd6b9..f5ef7ee2 100644 --- a/scene/ground/scene/c01/s12_书店外_诡异版.tscn +++ b/scene/ground/scene/c01/s12_书店外_诡异版.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=21 format=3 uid="uid://bol5hl68pbpgq"] +[gd_scene load_steps=20 format=3 uid="uid://bol5hl68pbpgq"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_llw14"] [ext_resource type="Script" path="res://scene/ground/scene/c01/s12_animation.gd" id="2_krdvw"] @@ -7,7 +7,6 @@ [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_o7hfk"] [ext_resource type="PackedScene" uid="uid://cw3q5pvciumil" path="res://scene/entity/interactable.tscn" id="5_6jrnc"] [ext_resource type="PackedScene" uid="uid://svvlohuicvhf" path="res://scene/entity/ambient/light.tscn" id="5_kywnm"] -[ext_resource type="Texture2D" uid="uid://dok08tovej18w" path="res://asset/art/ui/hud/normal_left.png" id="6_e8r2a"] [ext_resource type="PackedScene" uid="uid://dnbutraty2285" path="res://scene/entity/partical/particals_ash_vertical.tscn" id="6_mfjjt"] [ext_resource type="PackedScene" uid="uid://ci34db7xool2n" path="res://scene/ground/script/c01/s01_自动枯萎的花朵.tscn" id="7_aq8vg"] [ext_resource type="PackedScene" uid="uid://h0s5ms7r7d8g" path="res://scene/shading/ghost.tscn" id="8_gk0gq"] @@ -45,7 +44,7 @@ _data = { [node name="Ground" parent="." instance=ExtResource("1_llw14")] scene_name = "c01_s12" -player_y = 67 +player_y = 60 [node name="AnimationPlayer" parent="Ground" index="0"] libraries = { @@ -73,34 +72,30 @@ target_scene = "c01_s08" target_portal = "left" status = "opened" -[node name="Interactable寻人启事" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_6jrnc")] -visible = false -position = Vector2(379, 55) -texture = ExtResource("6_e8r2a") -enabled = false - -[node name="S01自动枯萎的花朵" parent="Ground/DeployLayer" index="4" node_paths=PackedStringArray("focus_node") instance=ExtResource("7_aq8vg")] +[node name="S01自动枯萎的花朵" parent="Ground/DeployLayer" index="3" node_paths=PackedStringArray("focus_node") instance=ExtResource("7_aq8vg")] position = Vector2(36, 81) focus_node = NodePath("../Ghost") -[node name="Ghost" parent="Ground/DeployLayer" index="5" instance=ExtResource("8_gk0gq")] +[node name="Ghost" parent="Ground/DeployLayer" index="4" instance=ExtResource("8_gk0gq")] visible = false z_index = 10 position = Vector2(-159, 18) autoplay = "" [node name="Ambush玩家被抓" parent="Ground/DeployLayer/Ghost" instance=ExtResource("9_nqlku")] +one_shot = false freeze_time = 0.1 +hook_method = "player_been_catched" -[node name="自动跟随的老鼠" parent="Ground/DeployLayer" index="6" instance=ExtResource("12_qpv8m")] +[node name="自动跟随的老鼠" parent="Ground/DeployLayer" index="5" instance=ExtResource("12_qpv8m")] position = Vector2(-7, 80) action_area = Vector2(1550, 40) scatter_on_start = true -[node name="飘动的寻人启事" parent="Ground/DeployLayer" index="7" instance=ExtResource("11_pwu7i")] +[node name="飘动的寻人启事" parent="Ground/DeployLayer" index="6" instance=ExtResource("11_pwu7i")] position = Vector2(655, -58) -[node name="陆仁舞刀" parent="Ground/DeployLayer" index="8" instance=ExtResource("12_jutue")] +[node name="陆仁舞刀" parent="Ground/DeployLayer" index="7" instance=ExtResource("12_jutue")] position = Vector2(398, 1) sprite_frames = ExtResource("13_lucm6") animation = &"杂戏团夜晚_陆仁舞刀" @@ -108,7 +103,7 @@ autoplay = "杂戏团夜晚_陆仁舞刀" frame_progress = 0.0 script = null -[node name="Npc其余小孩" parent="Ground/DeployLayer" index="9" instance=ExtResource("12_jutue")] +[node name="其余小孩" parent="Ground/DeployLayer" index="8" instance=ExtResource("12_jutue")] position = Vector2(530, 1) sprite_frames = ExtResource("13_lucm6") animation = &"杂戏团夜晚-其余小孩" @@ -116,17 +111,25 @@ autoplay = "杂戏团夜晚-其余小孩" frame_progress = 0.0 script = null -[node name="举碗小孩" parent="Ground/DeployLayer" index="10" instance=ExtResource("14_ct084")] +[node name="举碗小孩" parent="Ground/DeployLayer" index="9" instance=ExtResource("14_ct084")] position = Vector2(441, 3) sprite_frames = ExtResource("13_lucm6") -animation = &"杂戏团夜晚_小孩放下碗呼吸" +animation = &"杂戏团夜晚_小孩举碗呼吸" +autoplay = "杂戏团夜晚_小孩举碗呼吸" +frame_progress = 0.466871 action_configs = Array[Dictionary]([{ "animation_intro": "杂戏团夜晚_小孩放下碗", "animation_next": "杂戏团夜晚_小孩放下碗呼吸" }]) -[node name="Interactable银元" parent="Ground/DeployLayer/举碗小孩" instance=ExtResource("5_6jrnc")] -position = Vector2(1, 54) +[node name="Ambush举碗小孩" parent="Ground/DeployLayer/举碗小孩" instance=ExtResource("9_nqlku")] +position = Vector2(0, 53) +trigger_mode = "interact" +hook_method = "ambush_begger_interacted" + +[node name="Interactable碗" parent="Ground/DeployLayer/举碗小孩" instance=ExtResource("5_6jrnc")] +position = Vector2(0, 55) +enabled = false disable_prop_after_interacted = true prop_key = "prop_银元" @@ -134,21 +137,21 @@ prop_key = "prop_银元" position = Vector2(999, -5) texture = null ambient_light_scale = 1.2 -ambient_light_energy = 0.8 +ambient_light_energy = 0.3 ambient_light_color = Color(0.986481, 0.370829, 0.371193, 1) [node name="Light2" parent="Ground/AmbientLayer" index="1" instance=ExtResource("5_kywnm")] position = Vector2(1240, -6) texture = null ambient_light_scale = 1.2 -ambient_light_energy = 0.8 +ambient_light_energy = 0.3 ambient_light_color = Color(0.986481, 0.370829, 0.371193, 1) [node name="ParticalsAsh" parent="Ground/AmbientLayer" index="2" instance=ExtResource("6_mfjjt")] -position = Vector2(750, -200) +position = Vector2(439, -137) [node name="MainPlayer" parent="Ground" index="5"] -position = Vector2(41, 91) +position = Vector2(41, 98) character = "小小蝶" [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] @@ -158,6 +161,7 @@ texture = null points = PackedVector2Array(37, 150, 1500, 150) [node name="参考" type="Sprite2D" parent="."] +visible = false modulate = Color(1, 1, 1, 0.447059) position = Vector2(0, 1) texture = ExtResource("18_0xa0c") diff --git a/scene/ground/script/c01/s00_自动跟随的老鼠.gd b/scene/ground/script/c01/s00_自动跟随的老鼠.gd index 59575caa..d7950b39 100644 --- a/scene/ground/script/c01/s00_自动跟随的老鼠.gd +++ b/scene/ground/script/c01/s00_自动跟随的老鼠.gd @@ -49,7 +49,7 @@ func _enter_tree() -> void: _init_mice() -func flush_right_and_disable() -> void: +func flush_right_and_disable(_res = null) -> void: enabled = false var tween = create_tween() for i in range(mice.size()): diff --git a/scene/ground/script/c01/s01_自动枯萎的花朵.gd b/scene/ground/script/c01/s01_自动枯萎的花朵.gd index 871daf2b..004a6d45 100644 --- a/scene/ground/script/c01/s01_自动枯萎的花朵.gd +++ b/scene/ground/script/c01/s01_自动枯萎的花朵.gd @@ -9,15 +9,15 @@ extends Node2D set(val): gizmo_outline_color = val queue_redraw() -@export var scatter_on_start := false @export var debug_scatter := false: set(val): debug_scatter = false if Engine.is_editor_hint(): - _init_flowers(true) + _sactter_flowers() @export var auto_fade_distance := 50.0 @export var focus_node: Node2D +var total_num := 300 var flowers = [] as Array[AnimatedSprite2D] var faded_flowers = [] as Array[String] @@ -29,27 +29,28 @@ var fade_animation_dict = { # Called when the node enters the scene tree for the first time. func _ready() -> void: - _init_flowers() if Engine.is_editor_hint(): queue_redraw() - - -func _enter_tree() -> void: - if is_node_ready(): - _init_flowers() - - -func _init_flowers(scatter := scatter_on_start) -> void: + return flowers.clear() for f in get_children(): if f is AnimatedSprite2D: flowers.append(f) + # duplicate flowers + while flowers.size() < total_num: + var f = flowers[randi() % flowers.size()].duplicate() + add_child(f) + flowers.append(f) + _sactter_flowers() + + +func _sactter_flowers() -> void: + # scatter for i in range(flowers.size()): var f = flowers[i] # clamp to action area - if scatter: - var pos = Vector2(randf() * flower_area.x, randf() * flower_area.y) - f.position = pos + var pos = Vector2(randf() * flower_area.x, randf() * flower_area.y) + f.position = pos # if ( # not Engine.is_editor_hint() # and ArchiveManager.archive.global_data_dict.has("faded_flowers") diff --git a/scene/ground/script/c01/s01_自动枯萎的花朵.tscn b/scene/ground/script/c01/s01_自动枯萎的花朵.tscn index 9e8fb183..701dea16 100644 --- a/scene/ground/script/c01/s01_自动枯萎的花朵.tscn +++ b/scene/ground/script/c01/s01_自动枯萎的花朵.tscn @@ -59,145 +59,145 @@ script = ExtResource("1_l00w7") flower_area = Vector2(1500, 50) [node name="flower1" type="AnimatedSprite2D" parent="."] -position = Vector2(281.888, 13.2162) +position = Vector2(27.0628, 14.9055) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower2" type="AnimatedSprite2D" parent="."] -position = Vector2(690.229, 15.219) +position = Vector2(62.8677, 1.65439) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower3" type="AnimatedSprite2D" parent="."] -position = Vector2(174.205, 10.194) +position = Vector2(1472, 11.0387) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower4" type="AnimatedSprite2D" parent="."] -position = Vector2(565.422, 30.5498) +position = Vector2(814.365, 21.1809) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower5" type="AnimatedSprite2D" parent="."] -position = Vector2(892.792, 28.8082) +position = Vector2(481.649, 24.7078) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower6" type="AnimatedSprite2D" parent="."] -position = Vector2(147.793, 38.25) +position = Vector2(1021.83, 40.5576) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower7" type="AnimatedSprite2D" parent="."] -position = Vector2(992.862, 16.1515) +position = Vector2(997.846, 30.4941) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_枯萎" autoplay = "flower1_开放" [node name="flower8" type="AnimatedSprite2D" parent="."] -position = Vector2(847.811, 25.4702) +position = Vector2(1472.43, 12.0986) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower9" type="AnimatedSprite2D" parent="."] -position = Vector2(1405.19, 10.9608) +position = Vector2(60.0086, 42.1545) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower10" type="AnimatedSprite2D" parent="."] -position = Vector2(1221.38, 20.335) +position = Vector2(1477.35, 6.87319) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower11" type="AnimatedSprite2D" parent="."] -position = Vector2(777.194, 10.8606) +position = Vector2(1129.9, 7.12417) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower12" type="AnimatedSprite2D" parent="."] -position = Vector2(915.414, 20.246) +position = Vector2(207.489, 26.8667) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower13" type="AnimatedSprite2D" parent="."] -position = Vector2(718.029, 46.6113) +position = Vector2(662.738, 11.0566) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower14" type="AnimatedSprite2D" parent="."] -position = Vector2(1431.68, 25.2483) +position = Vector2(422.95, 36.6659) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower15" type="AnimatedSprite2D" parent="."] -position = Vector2(198.132, 33.0604) +position = Vector2(778.228, 34.8697) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower16" type="AnimatedSprite2D" parent="."] -position = Vector2(809.788, 46.8787) +position = Vector2(414.963, 20.2895) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower17" type="AnimatedSprite2D" parent="."] -position = Vector2(1020.75, 15.6941) +position = Vector2(459.597, 3.46516) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower18" type="AnimatedSprite2D" parent="."] -position = Vector2(1056.65, 11.0331) +position = Vector2(828.584, 25.3698) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower19" type="AnimatedSprite2D" parent="."] -position = Vector2(105.867, 26.1796) +position = Vector2(339.57, 23.7893) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_枯萎" autoplay = "flower1_开放" [node name="flower20" type="AnimatedSprite2D" parent="."] -position = Vector2(903.377, 20.0014) +position = Vector2(27.7565, 48.1586) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower21" type="AnimatedSprite2D" parent="."] -position = Vector2(1217.9, 44.5558) +position = Vector2(1131.99, 15.6803) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower22" type="AnimatedSprite2D" parent="."] -position = Vector2(93.1982, 47.879) +position = Vector2(1255.03, 14.4523) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" [node name="flower23" type="AnimatedSprite2D" parent="."] -position = Vector2(1016.63, 15.2568) +position = Vector2(294.201, 9.21576) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower1_开放" autoplay = "flower1_开放" [node name="flower24" type="AnimatedSprite2D" parent="."] -position = Vector2(307.934, 46.3627) +position = Vector2(1459.56, 43.3612) sprite_frames = SubResource("SpriteFrames_hq611") animation = &"flower2_开放" autoplay = "flower2_开放" diff --git a/scene/ground/script/c01/s12_飘动的寻人启事.gd b/scene/ground/script/c01/s12_飘动的寻人启事.gd index 6d20bd45..e27d8255 100644 --- a/scene/ground/script/c01/s12_飘动的寻人启事.gd +++ b/scene/ground/script/c01/s12_飘动的寻人启事.gd @@ -72,7 +72,10 @@ func _on_interacted() -> void: ArchiveManager.archive.ground_archive().set_pair(name, "interacted_x", interacted_x) if GlobalConfig.DEBUG: print("interacted_x:", interacted_x) - # SceneManager.enable_prop_item("c01_吕萍_记笔记_right") + # TODO 美术更新 + SceneManager.pop_debug_dialog_info("美术", "寻人启事: 飘动迷你版+详情版") + var inspect_texture = preload("res://asset/art/临时草稿/c01_序章/纸片_正面.png") + SceneManager.get_inspector().pop_prop_inspection("", inspect_texture, true) var _generated_points = -1 diff --git a/scene/prop/prop_inspector.gd b/scene/prop/prop_inspector.gd index 8c2f70b9..2b4aa1fd 100644 --- a/scene/prop/prop_inspector.gd +++ b/scene/prop/prop_inspector.gd @@ -116,14 +116,15 @@ func pop_prop_inspection(prop_title: String, cover_texture: Texture2D, use_defau tip_label.text = "" # 显示道具获得提示 - var obtain_str = tr("ui_获得") - var text = "~ title\n" + obtain_str + ": " + prop_title - text += "[#item][ID:" + prop_title + "]\n=> END" - var prop_res = DialogueManager.create_resource_from_text(text) - var balloon = preload("res://scene/dialog/balloon.tscn").instantiate() - # 手动跳过的同时隐藏 - balloon.manually_skipped_line.connect(_hide) - DialogueManager.show_dialogue_balloon_scene(balloon, prop_res, "title") + if prop_title: + var obtain_str = tr("ui_获得") + var text = "~ title\n" + obtain_str + ": " + prop_title + text += "[#item]\n=> END" + var prop_res = DialogueManager.create_resource_from_text(text) + var balloon = preload("res://scene/dialog/balloon.tscn").instantiate() + # 手动跳过的同时隐藏 + balloon.manually_skipped_line.connect(_hide) + DialogueManager.show_dialogue_balloon_scene(balloon, prop_res, "title") SceneManager.freeze_player(0) diff --git a/scene/shading/ghost.gdshader b/scene/shading/ghost.gdshader index 81345aed..2baaf182 100644 --- a/scene/shading/ghost.gdshader +++ b/scene/shading/ghost.gdshader @@ -42,5 +42,5 @@ void fragment( ) , enable_shift ); //COLOR.rgb = mix(COLOR.rgb, pixel_color.rgb, .5); - COLOR.rgb = smoothstep(.0, .5, pixel_color.rgb); + COLOR.rgb = smoothstep(.05, .7, pixel_color.rgb); }