Compare commits

...

48 Commits

Author SHA1 Message Date
05b35fc1eb 头痛动作调整 2025-08-06 20:53:02 +08:00
790389112f 增加 draggable 默认光层 2025-08-06 18:09:47 +08:00
4ae47778d2 八音盒脚本调整 2025-08-06 18:00:40 +08:00
f4084741a2 八音盒移除无效 panel 2025-08-06 17:48:00 +08:00
b68b3f60c3 八音盒描边->高光 2025-08-06 17:14:19 +08:00
158fdef689 HoverLightClickArea 2025-08-06 16:27:56 +08:00
92e5ff60fb prop inspector 在 main 上层 2025-08-06 16:05:12 +08:00
fca8d83d1e closeup 黑屏转场效果 2025-08-06 15:00:41 +08:00
c69e2283d6 书架游戏交互优化 2025-08-06 13:58:28 +08:00
34c4531a6d pickable fix _visibility_changed 2025-08-06 02:06:03 +08:00
0fbda6ba19 update 2025-08-06 01:55:29 +08:00
a19307502c 小蝶 -> 吕萍 2025-08-05 21:40:20 +08:00
ff1e411b88 民国二十一年->民国二十年(1931,九一八事后) 2025-08-04 16:36:21 +08:00
88f3c75314 更新 ground 在 editor 表现 2025-08-04 16:12:08 +08:00
028464e743 camera shake 优化 2025-08-01 15:07:46 +08:00
8b348970c9 hotfix prop_inventory 2025-07-31 05:07:26 +08:00
521f250885 reset_temp_disabled_props 2025-07-31 04:27:08 +08:00
2c466c923b hotfix 2025-07-31 04:20:28 +08:00
6db8621239 on_toggle_invalid_prop 增加 sfx 2025-07-31 04:16:30 +08:00
784d6937ed 优化猪头怪追击参数;增加 disable_prop_item_temp 2025-07-31 03:56:57 +08:00
715658c199 游戏开始增加键位提示 2025-07-31 01:25:19 +08:00
f0e88f5d05 过道 left action key 2025-07-30 22:41:19 +08:00
54383819d9 notification kill privous tween 2025-07-30 21:23:47 +08:00
9a3cff3d84 update csv 2025-07-30 21:09:36 +08:00
4f684f812f show_center_notification 延长 2025-07-30 21:05:58 +08:00
df174e3182 更新 os 2025-07-30 20:56:28 +08:00
713ef48e58 os 更新 2025-07-30 20:04:52 +08:00
4b939173d2 prop inspector prop_bg 逻辑 2025-07-30 19:13:50 +08:00
c3ca239518 优化 portal 表现: opened 效果,default 左右朝向 2025-07-30 18:57:49 +08:00
c0f7ba4915 footstep db 2025-07-30 18:18:49 +08:00
dc50c66369 audio stream collection db 控制 2025-07-30 18:17:29 +08:00
419625a496 配置 toggle_hud_display 2025-07-29 16:33:21 +08:00
89c339976e 使用 toggle_hud_display 方法 2025-07-29 16:18:16 +08:00
f9263862d2 增加 closeup 时隐藏 hud 的功能 2025-07-29 16:10:16 +08:00
b6ede0c4e6 增加获得重要物品直接可检阅的功能 2025-07-28 19:36:36 +08:00
02d99ac811 记忆闪回音效音量优化 2025-07-27 23:31:43 +08:00
a07f78e1d0 使用 InspectorBalloon 展示 prop 信息,避免 dialog 冲突 2025-07-27 23:19:28 +08:00
637132f878 防止 player walk to 的 tween 空 step 2025-07-27 14:52:49 +08:00
28223ed890 书架与信件游戏 sfx 调整 2025-07-25 16:44:42 +08:00
d3868215d7 sfx/sfx2d 在 closeup 时可暂停; 删除【麻将1】 2025-07-25 16:18:13 +08:00
b884cfb054 猫鼠游戏结束转场时,bgm ease 过度 2025-07-24 21:28:23 +08:00
e512d61e1f 增加过道怪声 2025-07-24 18:16:43 +08:00
15558d26c3 三楼楼道背景音更新 2025-07-24 18:10:46 +08:00
94737d7cce 书店拼信件(以及书架)游戏使用 lock 而非 freeze,防止信件拼成功时,错误地交互到柜子 2025-07-24 18:06:38 +08:00
2726065aad enable item silently 不会马上展示条目 2025-07-24 17:28:22 +08:00
85392b08ea 八音盒提示;draggable 优化 2025-07-24 15:52:46 +08:00
c5ad2e56c8 prop bag button 2025-07-23 22:09:39 +08:00
2a5254f7be 楼道白噪声音频更新 2025-07-22 14:01:05 +08:00
104 changed files with 1611 additions and 542 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwbh3j84ctxvp"
path="res://.godot/imported/UI场景切换_right.png-9e9e1c726ef09fb205638364f6110067.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://asset/art/ui/action_mark/UI场景切换_right.png"
dest_files=["res://.godot/imported/UI场景切换_right.png-9e9e1c726ef09fb205638364f6110067.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://jnw2yk6ls0fj"
path="res://.godot/imported/键位提示.png-64709bcd377e39f225bc60843c2472b7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://asset/art/ui/键位提示.png"
dest_files=["res://.godot/imported/键位提示.png-64709bcd377e39f225bc60843c2472b7.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bb3khctfdyap8"
path="res://.godot/imported/键位提示_带背景.jpeg-07d430663777eab7f02ee130e18c9ded.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://asset/art/ui/键位提示_带背景.jpeg"
dest_files=["res://.godot/imported/键位提示_带背景.jpeg-07d430663777eab7f02ee130e18c9ded.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

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://d30dh2pv67qvk"
path="res://.godot/imported/c01_书架游戏.ogg-bd25d8a6dba15aea7fc3c377f57d07ca.oggvorbisstr"
[deps]
source_file="res://asset/audio/peiyin/c01/c01_书架游戏.ogg"
dest_files=["res://.godot/imported/c01_书架游戏.ogg-bd25d8a6dba15aea7fc3c377f57d07ca.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cs5kdeolswovh"
path="res://.godot/imported/楼道怪声.ogg-3a2e7bfdbb70a0ddbdd29f69da6ac466.oggvorbisstr"
[deps]
source_file="res://asset/audio/sfx/环境音/第一章/楼道怪声.ogg"
dest_files=["res://.godot/imported/楼道怪声.ogg-3a2e7bfdbb70a0ddbdd29f69da6ac466.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -40,6 +40,7 @@ c01_7老板_5,新到的那批书堆着有碍观瞻,你赶紧去摆好。,书
c01_7小小蝶_1,...是在喊我吗?,吕萍,,,……是在和我讲话吗?,...Are you calling me?
c01_7老板_6,店员就你一个,不是你还能是谁?,书店老板,,,店里厢就侬一个人,不叫侬还能叫啥人呢?,You're the only clerk here. Who else would it be?
c01_7老板_7,手脚麻利点,不要耽误店里的生意。,书店老板,,,侬动作快点,不要影响做生意。,"Be quick about it, don't delay the shop's business."
c01_书架游戏,这些书...好像是按照图案、颜色、高低顺序来整理的。,吕萍,,,,"These books... seem to be arranged in order of pattern, color and height."
c01_8监督小孩_1,发赏钱喽!发赏钱喽!,监督小孩,,,,Handing out tips! Handing out tips!
c01_8监督小孩_2,哟,吕萍?你咋表演结束了才回来...,监督小孩,,,,"Oh, Lu Ping? Why are you only coming back after the performance ended..."
c01_8监督小孩_3,你手里攥的什么东西?给我看看,不然我就找班主告状!,监督小孩,,,,"What's that in your hand? Show me, or I'll tell the troupe master!"
@ -47,8 +48,8 @@ c01_8监督小孩_4,这上头咋还刻着个人哩,脑袋圆圆的,一根毛
c01_8监督小孩_5,吕萍,你从哪弄来的?,监督小孩,,,,"Lu Ping, where did you get this?"
c01_8小小蝶_1,你们...都看见了吗?,吕萍,,,,You... you all saw it?
c01_8幼年陆仁_1,它要来了,快跑!,陆仁,,,,"It's coming, run!"
c01_9车夫_1,哎哟,当心——,车夫,,,,"Whoa, watch out----"
c01_9车夫_2,小姐,您没吓到吧?,车夫,,,,"Miss, I hope you weren't frightened?"
c01_9车夫_1,哎哟,当心——,车夫,,[#ban_skip],,"Whoa, watch out----"
c01_9车夫_2,小姐,您没吓到吧?,车夫,,[#ban_skip],,"Miss, I hope you weren't frightened?"
c01_9小蝶_1,我刚刚...,吕萍,,,,I just...
c01_9小蝶_2,师傅,刚才怎么了?,吕萍,,,师傅,刚刚哪能了?,"Master, what just happened?"
c01_9车夫_3,斜拐弯冲出来个不长眼的「波波车」,差点就撞了!,车夫,,,,"Some blind fool in a motorcar came careening around the corner, nearly hit us!"

1 keys zh_CN _character _notes _tags zh_SH en
40 c01_7小小蝶_1 ...是在喊我吗? 吕萍 ……是在和我讲话吗? ...Are you calling me?
41 c01_7老板_6 店员就你一个,不是你还能是谁? 书店老板 店里厢就侬一个人,不叫侬还能叫啥人呢? You're the only clerk here. Who else would it be?
42 c01_7老板_7 手脚麻利点,不要耽误店里的生意。 书店老板 侬动作快点,不要影响做生意。 Be quick about it, don't delay the shop's business.
43 c01_书架游戏 这些书...好像是按照图案、颜色、高低顺序来整理的。 吕萍 These books... seem to be arranged in order of pattern, color and height.
44 c01_8监督小孩_1 发赏钱喽!发赏钱喽! 监督小孩 Handing out tips! Handing out tips!
45 c01_8监督小孩_2 哟,吕萍?你咋表演结束了才回来... 监督小孩 Oh, Lu Ping? Why are you only coming back after the performance ended...
46 c01_8监督小孩_3 你手里攥的什么东西?给我看看,不然我就找班主告状! 监督小孩 What's that in your hand? Show me, or I'll tell the troupe master!
48 c01_8监督小孩_5 吕萍,你从哪弄来的? 监督小孩 Lu Ping, where did you get this?
49 c01_8小小蝶_1 你们...都看见了吗? 吕萍 You... you all saw it?
50 c01_8幼年陆仁_1 它要来了,快跑! 陆仁 It's coming, run!
51 c01_9车夫_1 哎哟,当心—— 车夫 [#ban_skip] Whoa, watch out----
52 c01_9车夫_2 小姐,您没吓到吧? 车夫 [#ban_skip] Miss, I hope you weren't frightened?
53 c01_9小蝶_1 我刚刚... 吕萍 I just...
54 c01_9小蝶_2 师傅,刚才怎么了? 吕萍 师傅,刚刚哪能了? Master, what just happened?
55 c01_9车夫_3 斜拐弯冲出来个不长眼的「波波车」,差点就撞了! 车夫 Some blind fool in a motorcar came careening around the corner, nearly hit us!

View File

@ -59,6 +59,12 @@
书店老板: 手脚麻利点,不要耽误店里的生意。 [ID:c01_7老板_7]
=> END
~ c01_s08_书店书架游戏
吕萍: 这些书...好像是按照图案、颜色、高低顺序来整理的。 [ID:c01_书架游戏]
=> END
~ c01_s12_诡异的书店外发钱
监督小孩: 发赏钱喽!发赏钱喽! [ID:c01_8监督小孩_1]
=> END

View File

@ -21,33 +21,44 @@ setting_自动保存,自动保存,,,,,Auto Save
ui_秒,秒,,,,,seconds
setting_返回,返回,,,,,Back
setting_确认,确认,,,,,Confirm
bag_tab_笔记,线索,,,,,Clues
bag_tab_物品,物件,,,,,Items
bag_tab_记忆,记忆,,,,,Memories
bag_tab_笔记,线索(N),,,,,Clues(N)
bag_tab_物品,物件(B),,,,,Items(B)
bag_tab_记忆,记忆(M),,,,,Memories(M)
ui_saved_all,已保存所有数据,,,,,All data saved
ui_new_archive,已创建新存档,,,,,New save file created
ui_auto_saved,自动保存成功,,,,,Auto save successful
ui_notify_important_item_update,重要物品已更新,,,,,Important items updated
ui_notify_note_update,线索笔记已更新,,,,,Clue notes updated
ui_notify_mem_update,回忆已更新,,,,,Memories updated
ui_center_notify_a_d_to_move,按 A/D 可左右移动,,,,,Press A/D to Move
ui_center_notify_press_e_to_interact,按 E 可与场景互动,,,,,Press E to interact
ui_center_notify_press_q_to_exit,按 Q 可退出,,,,,Press Q to exit
ui_center_notify_use_prop,按 E 使用道具,,,,,Press E to use item
ui_center_notify_check_note,按 N 查看线索笔记,,,,,Press N to check clue notes
ui_center_notify_check_bag,按 B 查看重要物品,,,,,Press B to check important items
ui_center_notify_right_click_prop,右键点击可检阅道具,,,,,Right-click to examine item
ui_left_mouse_shave,按住鼠标拖拽可刮开海报,,,,,Hold and drag mouse to scrape off poster
ui_center_notify_drag_to_rotate,按住拖拽可旋转把手,,,,,Hold and drag to rotate the handle
ui_left_mouse_shave,按住拖拽可刮开海报,,,,,Hold and drag to scrape off poster
ui_switch_prop,点击图标可切换道具(或按 Z/C,,,,,Click icon to switch items (or press Z/C)
ui_press_shift,按住 Shift 奔跑,,,,,Hold Shift to run
ui_boxcat_press_s,按住 S 躲藏,,,,,Hold S to hide
input_拼凑信件,点击选择信件碎片方向键移动E 旋碎片转Q 退出,,,,,"Click to select letter fragments, arrow keys to move, E to rotate, Q to exit"
input_书架游戏,点击书本可选中或交换Q 退出,,,,,"Click books to select or swap, Q to exit"
ui_获得道具,获得道具,,,,,Item Obtained
ui_获得重要物品,重要物品,,,,,Important Item
ui_退出,退出,,,,,Exit
ui_阅读,阅读,,,,,Read
ui_检阅,检阅,,,,,Examine
ui_收起,收起,,,,,Put away
ui_key_z,上个道具,,,,,Previous
ui_key_c,下个道具,,,,,Next
ui_key_a,向左走,,,,,Left
ui_key_d,向右走,,,,,Right
ui_key_q,取消,,,,,Cancel
ui_key_e,交互,,,,,Interact
ui_key_esc,退出,,,,,Exit
ui_key_b,重要物品,,,,,Bag
ui_key_n,笔记,,,,,Note
ui_key_m,回忆,,,,,Memory
ui_夜行船1,百岁光阴一梦蝶。,,,,,"A hundred years of life, like a butterfly's dream."
ui_夜行船2,重回首往事堪嗟。,,,,,"Looking back, past events are cause for lament."
ui_夜行船4,今日春来,明朝花谢。,,,,,"Spring comes today, tomorrow the flowers will wither."
@ -56,7 +67,7 @@ ui_夜行船6,夜行船,,,,,Night Voyage
prop_空手,空手,,,,,Empty hands
prop_空手_说明,空空如也,,,,,Nothing at all
prop_信碎片1,信碎片(一),,,[#texture=c01/信件左上.png],,Letter Fragment (I)
prop_信碎片1_说明,(看不清)院长童玉君 民国二十年十月十五日,,,,,"(Illegible) ...Director Tong Yujun, October 15th, Year 21 of the Republic"
prop_信碎片1_说明,(看不清)院长童玉君 民国二十年十月十五日,,,,,"(Illegible) ...Director Tong Yujun, October 15th, Year 20 of the Republic"
prop_信碎片2,信碎片(二),,,[#texture=c01/信件右上.png],,Letter Fragment (II)
prop_信碎片2_说明,小萍:你现下境况如何?你虽离开浦育院已久,但我始终没有忘记为你祈祷。愿上帝(看不清),,,,,"Xiao Ping: How are you faring now? Though you left Puyu Orphanage long ago, I have never forgotten to pray for you. May God (illegible)..."
prop_银元,银元,,,[#texture=c01/银元.png],,Silver Dollar
@ -98,9 +109,9 @@ prop_3014旋转锁钥匙,3014旋转锁钥匙,,,[#texture=c02/3014旋转锁钥匙
prop_令牌,令牌,,,[#texture=c01/令牌物品.png][#inspect=c01/令牌.png],,Token
prop_装有灵魂的令牌,装有灵魂的令牌,,,[#texture=c01/装有灵魂的令牌物品.png][#inspect=c01/装有灵魂的令牌.png],,Soul-Containing Token
prop_院长的信,院长的信,,,[#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png],,Director's Letter
prop_院长的信_说明,小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十年十月十五日{br}公寓地址 芦昌路26弄3号,,,,,"Xiao Ping:{br}How are you faring now?{br}Though you left Puyu Orphanage long ago, I have never forgotten to pray for you.{br}May God bless you to walk the path of true enlightenment. I believe this was also your father's earnest wish when he entrusted you to my care.{br}Now that you are grown, regardless of whatever reasons your parents had for separating from you, you deserve the right to know the truth. I have attached the apartment address to this letter, though I know little beyond this.{br}If you have time, you are welcome to visit Puyu Orphanage.{br}Director Tong Yujun{br}October 15th, Year 21 of the Republic{br}Apartment Address: No. 3, Lane 26, Luchang Road"
prop_院长的信_说明,小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十年十月十五日{br}公寓地址 芦昌路26弄3号,,,,,"Xiao Ping:{br}How are you faring now?{br}Though you left Puyu Orphanage long ago, I have never forgotten to pray for you.{br}May God bless you to walk the path of true enlightenment. I believe this was also your father's earnest wish when he entrusted you to my care.{br}Now that you are grown, regardless of whatever reasons your parents had for separating from you, you deserve the right to know the truth. I have attached the apartment address to this letter, though I know little beyond this.{br}If you have time, you are welcome to visit Puyu Orphanage.{br}Director Tong Yujun{br}October 15th, Year 20 of the Republic{br}Apartment Address: No. 3, Lane 26, Luchang Road"
prop_船票,船票,,,[#texture=c02/船票.png],,Boat Ticket
prop_船票_说明,民国二十年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院?,,,,,"October 17th, Year 21 of the Republic{br}Shanghai-Nanjing-Jinan-Beiping-Linxi-Manzhouli{br}Third Class Berth 3-23{br}The ticket was booked long ago. I had given up all hope until the director replied to my letter. If I cannot find the truth tonight, I will take this ticket to the unknown and salvage answers devoured by time from the waves.{br}Who are my birth parents? Why did they send me to Puyu Orphanage?"
prop_船票_说明,民国二十年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院?,,,,,"October 17th, Year 20 of the Republic{br}Shanghai-Nanjing-Jinan-Beiping-Linxi-Manzhouli{br}Third Class Berth 3-23{br}The ticket was booked long ago. I had given up all hope until the director replied to my letter. If I cannot find the truth tonight, I will take this ticket to the unknown and salvage answers devoured by time from the waves.{br}Who are my birth parents? Why did they send me to Puyu Orphanage?"
prop_眼镜盒,眼镜盒,,,[#texture=c02/眼镜盒.png],,Glasses Case
prop_眼镜盒_说明,这副眼镜对我很重要。{br}记得小时候在浦育院的日子,我经常会在半夜时听到奇怪的说话声,还时不时能看见其他小孩子看不见的东西。{br}院长不知从哪儿找来了这样一副眼镜,戴上它后那些怪事就很少发生。{br}随着年龄增长,我几乎已用不到这副眼镜。现在它对我来说似乎有了新的意义。,,,,,"These glasses are very important to me.{br}I remember during my childhood at Puyu Orphanage, I would often hear strange voices at midnight and sometimes see things other children couldn't see.{br}The director found these glasses somewhere. After wearing them, those strange occurrences rarely happened.{br}As I grew older, I hardly needed these glasses anymore. Now they seem to have taken on new meaning for me."
prop_小蝉人偶,小蝉人偶,,,[#texture=c02/小蝉人偶.png],,Little Chan Doll
@ -122,7 +133,7 @@ c01_倾斜的洋相片,哇啊,这张洋相片要掉下来了!{br}我得做
c01_摆正的洋相片,这是院长的儿子吗?,,,,,Is this the director's son?
c01_s06_院长房间,这是院长的房间,,,,,This is the director's room
c01_s06_小朋友房间,这是其他小朋友的房间,,,,,This is the other children's room
c01_s06_熟悉的墙画,墙上的画看起来好熟悉。{br}过去问问看吧,没准他们几个知道些什么。,,,,,The painting on the wall looks so familiar.{br}Let me go ask them. Maybe they know something.
c01_s06_熟悉的墙画,又是他们几个,这次画的东西怎么有些眼熟{br} 虽然上次...{br}算了,院长和我说过,以后日子还长着呢,要和这里的小孩好好相处。,,,,,"It's them again. How come the things they drew look somewhat familiar? {br} Although last time... {br} Well, forget about that. The dean told me that there's still a long way ahead and we need to get along well with the kids here."
c01_s06_四小孩对话结束,怪人、花...{br}有时候真搞不懂他们在说些什么。,,,,,"Strange people, flowers...{br}Sometimes I really don't understand what they're talking about."
c01_s07_钱碗,碗里只有一枚铜钱。,,,,,There's only one copper coin in the bowl.
c01_s07_获得报纸,这是什么?,,,,,What is this?

1 keys zh_CN _character _notes _tags zh_SH en
21 ui_秒 seconds
22 setting_返回 返回 Back
23 setting_确认 确认 Confirm
24 bag_tab_笔记 线索 线索(N) Clues Clues(N)
25 bag_tab_物品 物件 物件(B) Items Items(B)
26 bag_tab_记忆 记忆 记忆(M) Memories Memories(M)
27 ui_saved_all 已保存所有数据 All data saved
28 ui_new_archive 已创建新存档 New save file created
29 ui_auto_saved 自动保存成功 Auto save successful
30 ui_notify_important_item_update 重要物品已更新 Important items updated
31 ui_notify_note_update 线索笔记已更新 Clue notes updated
32 ui_notify_mem_update 回忆已更新 Memories updated
33 ui_center_notify_a_d_to_move 按 A/D 可左右移动 Press A/D to Move
34 ui_center_notify_press_e_to_interact 按 E 可与场景互动 Press E to interact
35 ui_center_notify_press_q_to_exit 按 Q 可退出 Press Q to exit
36 ui_center_notify_use_prop 按 E 使用道具 Press E to use item
37 ui_center_notify_check_note 按 N 查看线索笔记 Press N to check clue notes
38 ui_center_notify_check_bag 按 B 查看重要物品 Press B to check important items
39 ui_center_notify_right_click_prop 右键点击可检阅道具 Right-click to examine item
40 ui_left_mouse_shave ui_center_notify_drag_to_rotate 按住鼠标拖拽可刮开海报 按住拖拽可旋转把手 Hold and drag mouse to scrape off poster Hold and drag to rotate the handle
41 ui_left_mouse_shave 按住拖拽可刮开海报 Hold and drag to scrape off poster
42 ui_switch_prop 点击图标可切换道具(或按 Z/C) Click icon to switch items (or press Z/C)
43 ui_press_shift 按住 Shift 奔跑 Hold Shift to run
44 ui_boxcat_press_s 按住 S 躲藏 Hold S to hide
45 input_拼凑信件 点击选择信件碎片,方向键移动,E 旋碎片转,Q 退出 Click to select letter fragments, arrow keys to move, E to rotate, Q to exit
46 input_书架游戏 点击书本可选中或交换,Q 退出 Click books to select or swap, Q to exit
47 ui_获得道具 获得道具 Item Obtained
ui_获得重要物品 重要物品 Important Item
48 ui_退出 退出 Exit
49 ui_阅读 阅读 Read
50 ui_检阅 检阅 Examine
51 ui_收起 收起 Put away
52 ui_key_z 上个道具 Previous
53 ui_key_c 下个道具 Next
54 ui_key_a 向左走 Left
55 ui_key_d 向右走 Right
56 ui_key_q 取消 Cancel
57 ui_key_e 交互 Interact
58 ui_key_esc 退出 Exit
59 ui_key_b 重要物品 Bag
60 ui_key_n 笔记 Note
61 ui_key_m 回忆 Memory
62 ui_夜行船1 百岁光阴一梦蝶。 A hundred years of life, like a butterfly's dream.
63 ui_夜行船2 重回首往事堪嗟。 Looking back, past events are cause for lament.
64 ui_夜行船4 今日春来,明朝花谢。 Spring comes today, tomorrow the flowers will wither.
67 prop_空手 空手 Empty hands
68 prop_空手_说明 空空如也 Nothing at all
69 prop_信碎片1 信碎片(一) [#texture=c01/信件左上.png] Letter Fragment (I)
70 prop_信碎片1_说明 (看不清)院长童玉君 民国二十一年十月十五日 (看不清)院长童玉君 民国二十年十月十五日 (Illegible) ...Director Tong Yujun, October 15th, Year 21 of the Republic (Illegible) ...Director Tong Yujun, October 15th, Year 20 of the Republic
71 prop_信碎片2 信碎片(二) [#texture=c01/信件右上.png] Letter Fragment (II)
72 prop_信碎片2_说明 小萍:你现下境况如何?你虽离开浦育院已久,但我始终没有忘记为你祈祷。愿上帝(看不清) Xiao Ping: How are you faring now? Though you left Puyu Orphanage long ago, I have never forgotten to pray for you. May God (illegible)...
73 prop_银元 银元 [#texture=c01/银元.png] Silver Dollar
109 prop_令牌 令牌 [#texture=c01/令牌物品.png][#inspect=c01/令牌.png] Token
110 prop_装有灵魂的令牌 装有灵魂的令牌 [#texture=c01/装有灵魂的令牌物品.png][#inspect=c01/装有灵魂的令牌.png] Soul-Containing Token
111 prop_院长的信 院长的信 [#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png] Director's Letter
112 prop_院长的信_说明 小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十一年十月十五日{br}公寓地址 芦昌路26弄3号 小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十年十月十五日{br}公寓地址 芦昌路26弄3号 Xiao Ping:{br}How are you faring now?{br}Though you left Puyu Orphanage long ago, I have never forgotten to pray for you.{br}May God bless you to walk the path of true enlightenment. I believe this was also your father's earnest wish when he entrusted you to my care.{br}Now that you are grown, regardless of whatever reasons your parents had for separating from you, you deserve the right to know the truth. I have attached the apartment address to this letter, though I know little beyond this.{br}If you have time, you are welcome to visit Puyu Orphanage.{br}Director Tong Yujun{br}October 15th, Year 21 of the Republic{br}Apartment Address: No. 3, Lane 26, Luchang Road Xiao Ping:{br}How are you faring now?{br}Though you left Puyu Orphanage long ago, I have never forgotten to pray for you.{br}May God bless you to walk the path of true enlightenment. I believe this was also your father's earnest wish when he entrusted you to my care.{br}Now that you are grown, regardless of whatever reasons your parents had for separating from you, you deserve the right to know the truth. I have attached the apartment address to this letter, though I know little beyond this.{br}If you have time, you are welcome to visit Puyu Orphanage.{br}Director Tong Yujun{br}October 15th, Year 20 of the Republic{br}Apartment Address: No. 3, Lane 26, Luchang Road
113 prop_船票 船票 [#texture=c02/船票.png] Boat Ticket
114 prop_船票_说明 民国二十一年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院? 民国二十年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院? October 17th, Year 21 of the Republic{br}Shanghai-Nanjing-Jinan-Beiping-Linxi-Manzhouli{br}Third Class Berth 3-23{br}The ticket was booked long ago. I had given up all hope until the director replied to my letter. If I cannot find the truth tonight, I will take this ticket to the unknown and salvage answers devoured by time from the waves.{br}Who are my birth parents? Why did they send me to Puyu Orphanage? October 17th, Year 20 of the Republic{br}Shanghai-Nanjing-Jinan-Beiping-Linxi-Manzhouli{br}Third Class Berth 3-23{br}The ticket was booked long ago. I had given up all hope until the director replied to my letter. If I cannot find the truth tonight, I will take this ticket to the unknown and salvage answers devoured by time from the waves.{br}Who are my birth parents? Why did they send me to Puyu Orphanage?
115 prop_眼镜盒 眼镜盒 [#texture=c02/眼镜盒.png] Glasses Case
116 prop_眼镜盒_说明 这副眼镜对我很重要。{br}记得小时候在浦育院的日子,我经常会在半夜时听到奇怪的说话声,还时不时能看见其他小孩子看不见的东西。{br}院长不知从哪儿找来了这样一副眼镜,戴上它后那些怪事就很少发生。{br}随着年龄增长,我几乎已用不到这副眼镜。现在它对我来说似乎有了新的意义。 These glasses are very important to me.{br}I remember during my childhood at Puyu Orphanage, I would often hear strange voices at midnight and sometimes see things other children couldn't see.{br}The director found these glasses somewhere. After wearing them, those strange occurrences rarely happened.{br}As I grew older, I hardly needed these glasses anymore. Now they seem to have taken on new meaning for me.
117 prop_小蝉人偶 小蝉人偶 [#texture=c02/小蝉人偶.png] Little Chan Doll
133 c01_摆正的洋相片 这是院长的儿子吗? Is this the director's son?
134 c01_s06_院长房间 这是院长的房间 This is the director's room
135 c01_s06_小朋友房间 这是其他小朋友的房间 This is the other children's room
136 c01_s06_熟悉的墙画 墙上的画看起来好熟悉。{br}过去问问看吧,没准他们几个知道些什么。 又是他们几个,这次画的东西怎么有些眼熟{br} 虽然上次...{br}算了,院长和我说过,以后日子还长着呢,要和这里的小孩好好相处。 The painting on the wall looks so familiar.{br}Let me go ask them. Maybe they know something. It's them again. How come the things they drew look somewhat familiar? {br} Although last time... {br} Well, forget about that. The dean told me that there's still a long way ahead and we need to get along well with the kids here.
137 c01_s06_四小孩对话结束 怪人、花...{br}有时候真搞不懂他们在说些什么。 Strange people, flowers...{br}Sometimes I really don't understand what they're talking about.
138 c01_s07_钱碗 碗里只有一枚铜钱。 There's only one copper coin in the bowl.
139 c01_s07_获得报纸 这是什么? What is this?

View File

@ -26,10 +26,9 @@
返回[ID:setting_返回]
确认[ID:setting_确认]
线索[ID:bag_tab_笔记]
物件[ID:bag_tab_物品]
记忆[ID:bag_tab_记忆]
线索(N)[ID:bag_tab_笔记]
物件(B)[ID:bag_tab_物品]
记忆(M)[ID:bag_tab_记忆]
已保存所有数据 [ID:ui_saved_all]
已创建新存档 [ID:ui_new_archive]
@ -40,13 +39,15 @@
回忆已更新 [ID:ui_notify_mem_update]
按 A/D 可左右移动 [ID:ui_center_notify_a_d_to_move]
按 E 可与场景互动 [ID:ui_center_notify_press_e_to_interact]
按 Q 可退出 [ID:ui_center_notify_press_q_to_exit]
按 E 使用道具 [ID:ui_center_notify_use_prop]
按 N 查看线索笔记 [ID:ui_center_notify_check_note]
按 B 查看重要物品 [ID:ui_center_notify_check_bag]
右键点击可检阅道具 [ID:ui_center_notify_right_click_prop]
按住鼠标拖拽可刮开海报 [ID:ui_left_mouse_shave]
按住拖拽可旋转把手 [ID:ui_center_notify_drag_to_rotate]
按住拖拽可刮开海报 [ID:ui_left_mouse_shave]
点击图标可切换道具(或按 Z/C [ID:ui_switch_prop]
按住 Shift 奔跑 [ID:ui_press_shift]
按住 S 躲藏 [ID:ui_boxcat_press_s]
@ -54,12 +55,23 @@
点击书本可选中或交换Q 退出 [ID:input_书架游戏]
获得道具 [ID:ui_获得道具]
重要物品 [ID:ui_获得重要物品]
退出 [ID:ui_退出]
阅读 [ID:ui_阅读]
检阅 [ID:ui_检阅]
收起 [ID:ui_收起]
上个道具 [ID:ui_key_z]
下个道具 [ID:ui_key_c]
向左走 [ID:ui_key_a]
向右走 [ID:ui_key_d]
取消 [ID:ui_key_q]
交互 [ID:ui_key_e]
退出 [ID:ui_key_esc]
重要物品 [ID:ui_key_b]
笔记 [ID:ui_key_n]
回忆 [ID:ui_key_m]
百岁光阴一梦蝶。 [ID:ui_夜行船1]
重回首往事堪嗟。 [ID:ui_夜行船2]
#今日春来 [ID:ui_夜行船3]
@ -75,7 +87,7 @@
# texture 路径从 "res://asset/art/prop/" 之后算起
# c01
信碎片(一) [#texture=c01/信件左上.png] [ID:prop_信碎片1]
(看不清)院长童玉君 民国二十年十月十五日 [ID:prop_信碎片1_说明]
(看不清)院长童玉君 民国二十年十月十五日 [ID:prop_信碎片1_说明]
信碎片(二) [#texture=c01/信件右上.png] [ID:prop_信碎片2]
小萍:你现下境况如何?你虽离开浦育院已久,但我始终没有忘记为你祈祷。愿上帝(看不清) [ID:prop_信碎片2_说明]
银元 [#texture=c01/银元.png] [ID:prop_银元]
@ -133,10 +145,10 @@
~ ImportantPropItems
# c01
院长的信 [#texture=c01/院长的信物品.png][#inspect=c01/院长的信.png] [ID:prop_院长的信]
小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十年十月十五日{br}公寓地址 芦昌路26弄3号 [ID:prop_院长的信_说明]
小萍:{br}你现下境况如何?{br}你虽离开浦育院已久,但我始终没有忘记为你祈祷。{br}愿上帝保佑你走向真正光明的道路。我相信这也是当年你父亲将你托付给我时的殷切愿景。{br}你既已成人,无论你的父母出于何种理由选择与你分离,你都应当拥有知晓真相的权利,所以我将公寓地址附在了信后,除此之外,我亦知之甚少。{br}若有闲暇,欢迎你回浦育院看看。{br}院长童玉君{br}民国二十年十月十五日{br}公寓地址 芦昌路26弄3号 [ID:prop_院长的信_说明]
# c02
船票 [#texture=c02/船票.png] [ID:prop_船票]
民国二十年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院? [ID:prop_船票_说明]
民国二十年十月十七日{br}上海-南京-济南-北平-林西-满洲里{br}三等舱 3-23 号铺位{br}船票早已订好,我本已不抱任何希望,直到院长给我回信。若今晚没能找到真相,我将带着这张通往未知的船票,在浪涛中打捞被时光吞噬的答案。{br}我的亲生父母是谁?当初他们为何要把我送到浦育院? [ID:prop_船票_说明]
眼镜盒 [#texture=c02/眼镜盒.png] [ID:prop_眼镜盒]
这副眼镜对我很重要。{br}记得小时候在浦育院的日子,我经常会在半夜时听到奇怪的说话声,还时不时能看见其他小孩子看不见的东西。{br}院长不知从哪儿找来了这样一副眼镜,戴上它后那些怪事就很少发生。{br}随着年龄增长,我几乎已用不到这副眼镜。现在它对我来说似乎有了新的意义。[ID:prop_眼镜盒_说明]
小蝉人偶[#texture=c02/小蝉人偶.png] [ID:prop_小蝉人偶]
@ -178,7 +190,7 @@
这是院长的房间 [ID:c01_s06_院长房间]
这是其他小朋友的房间 [ID:c01_s06_小朋友房间]
# 院子里四个小孩交谈结束后
墙上的画看起来好熟悉。{br}过去问问看吧,没准他们几个知道些什么。 [ID:c01_s06_熟悉的墙画]
又是他们几个,这次画的东西怎么有些眼熟{br} 虽然上次...{br}算了,院长和我说过,以后日子还长着呢,要和这里的小孩好好相处。[ID:c01_s06_熟悉的墙画]
怪人、花...{br}有时候真搞不懂他们在说些什么。 [ID:c01_s06_四小孩对话结束]
# c01-s07 书店外
碗里只有一枚铜钱。 [ID:c01_s07_钱碗]

View File

@ -19,5 +19,5 @@ c02_疯子对话圆月亮1,你看见没有?这月亮够不够圆?,侬看到
c02_疯子对话圆月亮2,杆子细又高、灯火照一照、庙里影子绕、大家哈哈笑...,杆子细又高、灯火照一照、庙里影子绕、大家哈哈笑……,,,,"Pole so thin and tall, lamplight shining bright, shadows dancing 'round the temple, everyone laughing with delight..."
c02_疯子对话圆月亮3,扁担长,板凳宽,板凳没有扁担长,扁担没有板凳宽...一担挑啊,一担挑!,扁担长,板凳宽,板凳没有扁担长,扁担没有板凳宽……一担挑啊,一担挑!,,,,"Carrying pole is long, bench is wide, bench isn't as long as the pole, pole isn't as wide as the bench... carry the load, carry the load!"
c02_疯子对话圆月亮4,我正找着那东西呢,你瞧见没有?,我在寻那东西呢,你们看到过伐?,,,,I'm looking for that thing. Have you seen it?
c02_疯子对话圆月亮5,什么东西?,啥东西?,小蝶,,,What thing?
c02_疯子对话圆月亮5,什么东西?,啥东西?,吕萍,,,What thing?
c02_疯子对话圆月亮6,找!找啊!一起找!,寻啊!寻啊!一道寻!,,,,Search! Search! Let's search together!

1 keys zh_CN zh_SH _character _notes _tags en
19 c02_疯子对话圆月亮2 杆子细又高、灯火照一照、庙里影子绕、大家哈哈笑... 杆子细又高、灯火照一照、庙里影子绕、大家哈哈笑…… ??? Pole so thin and tall, lamplight shining bright, shadows dancing 'round the temple, everyone laughing with delight...
20 c02_疯子对话圆月亮3 扁担长,板凳宽,板凳没有扁担长,扁担没有板凳宽...一担挑啊,一担挑! 扁担长,板凳宽,板凳没有扁担长,扁担没有板凳宽……一担挑啊,一担挑! ??? Carrying pole is long, bench is wide, bench isn't as long as the pole, pole isn't as wide as the bench... carry the load, carry the load!
21 c02_疯子对话圆月亮4 我正找着那东西呢,你瞧见没有? 我在寻那东西呢,你们看到过伐? ??? I'm looking for that thing. Have you seen it?
22 c02_疯子对话圆月亮5 什么东西? 啥东西? 小蝶 吕萍 What thing?
23 c02_疯子对话圆月亮6 找!找啊!一起找! 寻啊!寻啊!一道寻! ??? Search! Search! Let's search together!

View File

@ -32,6 +32,11 @@
陆仁: 这帮孩子们太苦了,前些天又摔坏了一个,您行行好... [ID:c01_6幼年陆仁_1]
=> END
~ c01_s08_书店老板
书店老板: 新到的那批书堆着有碍观瞻,你赶紧去摆好。 [ID:c01_7老板_5]
书店老板: 手脚麻利点,不要耽误店里的生意。 [ID:c01_7老板_7]
=> END
~ c02_疯子_01
吕萍: 不好意思师傅,你知道这里有姓吕的人家吗? [ID:c02_2疯子_小蝶开场白]
: 出去...出去... [#anonymous] [ID:c02_2疯子_1]
@ -50,6 +55,6 @@
: 杆子细又高、灯火照一照、庙里影子绕、大家哈哈笑... [ID:c02_疯子对话圆月亮2]
: 扁担长,板凳宽,板凳没有扁担长,扁担没有板凳宽...一担挑啊,一担挑! [ID:c02_疯子对话圆月亮3]
: 我正找着那东西呢,你瞧见没有? [ID:c02_疯子对话圆月亮4]
小蝶: 什么东西? [ID:c02_疯子对话圆月亮5]
吕萍 什么东西? [ID:c02_疯子对话圆月亮5]
: 找!找啊!一起找! [ID:c02_疯子对话圆月亮6]
=> END

View File

@ -2764,16 +2764,22 @@ animations = [{
"duration": 1.0,
"texture": ExtResource("542_pf4co")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("543_axp0t")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("544_utdtj")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("545_alesa")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("546_6dfax")
}, {
"duration": 3.0,
"texture": ExtResource("545_alesa")
}, {
"duration": 3.0,
"texture": ExtResource("546_6dfax")
}, {
"duration": 1.0,
@ -2835,19 +2841,25 @@ animations = [{
"duration": 1.0,
"texture": ExtResource("564_r8eua")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("565_udp6b")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("566_4rw06")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("567_u3obx")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("568_letpt")
}, {
"duration": 1.0,
"duration": 3.0,
"texture": ExtResource("569_m41vc")
}, {
"duration": 3.0,
"texture": ExtResource("568_letpt")
}, {
"duration": 3.0,
"texture": ExtResource("569_m41vc")
}, {
"duration": 1.0,

View File

@ -3,3 +3,4 @@ extends Resource
class_name AudioStreamCollection
@export var audios : Array[AudioStream] = []
@export var db := 0

View File

@ -15,6 +15,7 @@ func play_random():
return
var audio_collection := audio_collections.pick_random() as AudioStreamCollection
stream = audio_collection.audios.pick_random()
volume_db = audio_collection.db
if stream == null:
push_error("empty stream in audio_collection", audio_collection)
return

View File

@ -8,3 +8,4 @@
[resource]
script = ExtResource("4_6irvv")
audios = Array[AudioStream]([ExtResource("1_pfw3x"), ExtResource("2_gcvrs"), ExtResource("3_0un37")])
db = -7.0

View File

@ -7,3 +7,4 @@
[resource]
script = ExtResource("3_ja105")
audios = Array[AudioStream]([ExtResource("1_tww7m"), ExtResource("3_05da2")])
db = -7.0

View File

@ -22,7 +22,9 @@ var archive: AssembledArchive:
# emit signal
archive_loaded.emit()
GlobalConfigManager.print_global_info()
print("use archive ", archive.resource_path)
print("[Archive] use archive ", archive.resource_path)
else:
print("[Archive] unload archive")
var archives_dict: Dictionary[int, AssembledArchive] = {}
var archives_notes_dict: Dictionary[int, String] = {}

View File

@ -17,12 +17,14 @@ func _ready() -> void:
func _input(event: InputEvent) -> void:
if (
event.is_action_pressed("debugging")
or event.is_action_pressed("cancel")
or event.is_action_pressed("escape")
):
get_viewport().set_input_as_handled()
quit()
func _unhandled_key_input(_event: InputEvent) -> void:
# 调试界面接受所有输入事件
get_viewport().set_input_as_handled()
func _unhandled_input(_event: InputEvent) -> void:
get_viewport().set_input_as_handled()

View File

@ -156,6 +156,8 @@ func _refresh_archive_list() -> void:
# Create UI items for each manual archive
var sorted_ids = manual_archives.keys()
sorted_ids.sort()
# 倒序展示
sorted_ids.reverse()
for id in sorted_ids:
var data = manual_archives[id]

View File

@ -17,14 +17,18 @@ var bgm_dict = {}
func _ready() -> void:
for i in range(5):
var sfx_player = RandomAudioStreamPlayer.new()
sfx_players.append(sfx_player)
sfx_player.bus = "game_sfx"
add_child(sfx_player)
_create_and_add_new_player(i)
if Engine.is_editor_hint():
_reload_groups()
func _create_and_add_new_player(index: int) -> void:
var sfx_player = RandomAudioStreamPlayer.new()
sfx_player.bus = "game_sfx"
add_child(sfx_player)
sfx_players.insert(index, sfx_player)
func _reload_groups():
VIBE_GROUPS.clear()
for group in vibe_group_collection.groups:
@ -34,6 +38,21 @@ func _reload_groups():
printerr("VibeGroup has no name: ", group)
func stop_stream(stream: AudioStream, duration := 1.0) -> void:
for i in sfx_players.size():
var player = sfx_players[i]
if player.stream == stream:
if duration > 0:
# ease 过程将它独立拎出来
sfx_players.remove_at(i)
_create_and_add_new_player(i)
var tween = create_tween()
tween.tween_property(player, "volume_linear", 0.01, duration)
tween.tween_callback(player.queue_free)
else:
player.stop()
func play_sfx(sfx: AudioStream, db := 1.0) -> void:
sfx_players[sfx_players_idx].stream = sfx
sfx_players[sfx_players_idx].volume_db = db
@ -70,7 +89,7 @@ func stop_bgm_music(music_name: StringName, ease_duration := 3.0) -> void:
audio_player.queue_free()
else:
var tween = create_tween()
tween.tween_property(audio_player, "volume_linear", 0.0, ease_duration)
tween.tween_property(audio_player, "volume_linear", 0.01, ease_duration)
tween.tween_callback(audio_player.queue_free)
bgm_dict.erase(music_name)
else:

View File

@ -46,6 +46,11 @@ const DIALOG_IGNORE_INPUT = "ignore_input"
# memory layer: 30
const DIALOG_MEM_LAYER = "mem_layer"
# groups
const GROUP_GROUND_SFX := "ground_sfx"
const GROUP_GROUND_SFX2D := "ground_sfx2d"
const CHARACTER_COLOR_MAP = {
"default": Color.LIGHT_SEA_GREEN,
"吕萍": Color.ORANGE,

View File

@ -5,6 +5,7 @@ var dialogue_c02 = preload("res://asset/dialogue/c02.dialogue")
func _ready() -> void:
process_mode = Node.PROCESS_MODE_PAUSABLE
SceneManager.main_scene_quitted.connect(c02_fire_count_down_stop)
# called from dialogue
@ -75,6 +76,6 @@ func _on_c02_fire_count_down_timeout():
func c02_fire_count_down_stop():
if c02_fire_count_down_timer:
c02_fire_count_down_timer.stop()
c02_fire_count_down_timer.queue_free()
# 停止音效
AudioManager.stop_bgm_music("霸凌救小蝉倒计时")

View File

@ -8,6 +8,7 @@ enum VIBE {
}
signal pause_counter_updated
signal main_scene_quitted
# 从 ground loader 控制该信号
# 建议使用 CONNECT_ONE_SHOT 来连接 ground ready 与 start 等信号
@ -238,6 +239,26 @@ func disable_prop_item(prop_key: String) -> void:
printerr("disable_prop_item PropHud node not found")
# 临时禁用 prop, 延迟写入(真正 disable_prop_item 的时候写入)
func disable_prop_item_temp(prop_key: String) -> void:
var prop_hud = get_prop_hud()
if prop_hud:
print("[prop] disable_prop_item_temp prop:", prop_key)
prop_hud.disable_prop_item_temp(prop_key)
else:
printerr("disable_prop_item_temp PropHud node not found")
# 恢复临时禁用的 prop
func reset_temp_disabled_props() -> void:
var prop_hud = get_prop_hud()
if prop_hud:
print("[prop] reset_temp_disabled_props prop:")
prop_hud.reset_temp_disabled_props()
else:
printerr("reset_temp_disabled_props PropHud node not found")
func pop_os_with_str(translation_key: String) -> void:
var player = get_player() as MainPlayer
if player:
@ -271,10 +292,10 @@ func pop_notification(translation_key: String, number := 1) -> void:
printerr("pop_notification: Notification node not found")
func pop_center_notification(translation_key: String) -> void:
func pop_center_notification(translation_key: String, duration := 4.0) -> void:
var notification_node = get_node_or_null("/root/Main/UILayer/Notification")
if notification_node:
notification_node.show_center_notification(tr(translation_key).replace("{br}", "\n"))
notification_node.show_center_notification(tr(translation_key).replace("{br}", "\n"), duration)
else:
printerr("pop_center_notification: Notification node not found")
@ -319,6 +340,8 @@ func pop_chapter_notification(id: int) -> void:
func checkout_index_page(transition := true) -> void:
# 保存后,渐隐切换场景
ArchiveManager.save_all()
# 移除 archive
ArchiveManager.archive = null
if transition:
var ground_loader = get_ground_loader() as GroundLoader
if ground_loader:
@ -328,6 +351,7 @@ func checkout_index_page(transition := true) -> void:
_jump_back_to_index_and_quit_main()
else:
_jump_back_to_index_and_quit_main()
main_scene_quitted.emit()
var packed_index_page := preload("uid://c4ycvdsabi7lw")
@ -469,8 +493,8 @@ func show_black_hand(play_sfx := true, queue_free_delay := 0.0) -> void:
var transition_scene = preload("uid://7dxvwqm53ugh")
func black_transition(half_duration := 0.7) -> void:
func black_transition(half_duration := 0.7, wait_time := 0.5) -> void:
var scene = transition_scene.instantiate()
scene.name = "Transition"
get_tree().current_scene.add_child(scene)
scene.run_effect(half_duration)
scene.run_effect(half_duration, wait_time)

View File

@ -235,6 +235,8 @@ locale/fallback="zh"
2d_render/layer_4="玩家角色"
2d_render/layer_5="UI提示"
2d_render/layer_6="临时界面"
2d_render/layer_7="RigidDraggableSprite"
2d_render/layer_8="DraggableSprite"
2d_physics/layer_1="player"
2d_physics/layer_2="wall"
2d_physics/layer_3="interactable"

View File

@ -45,7 +45,7 @@ signal animation_finished
if is_node_ready():
_check_character_runtime_status()
if val > 3:
freeze_player(1, val, true)
player_action(val, true)
# 使用 new方便在 editor 中刷新新值
var current_animation_config: Dictionary
@ -391,6 +391,8 @@ func walk_to(global_pos: Vector2) -> Tween:
_play_animation()
tween.tween_property(self, "global_position", global_pos, time_cost)
tween.tween_callback(_after_walk_to)
else:
tween.tween_interval(0.001) # 防止空 step
return tween

View File

@ -57,7 +57,7 @@ func freeze(duration := 0.0) -> void:
_freeze_requests += 1
var f_requests = _freeze_requests
_request_mutex.unlock()
print("[Lock] Freeze applied: ", _freeze_requests)
print("[Lock] Freeze applied: ", f_requests)
if GlobalConfig.DEBUG:
print("freeze from: ", _get_stack_info())
freeze_changed.emit(f_requests, true)
@ -77,7 +77,7 @@ func release() -> void:
_freeze_requests = 0
var f_requests = _freeze_requests
_request_mutex.unlock()
print("[Lock] Release applied: ", _freeze_requests)
print("[Lock] Release applied: ", f_requests)
if GlobalConfig.DEBUG:
print("release from: ", _get_stack_info())
freeze_changed.emit(f_requests, false)
@ -89,11 +89,12 @@ func hold(duration := 0.0) -> void:
_create_timer(duration, unhold)
_request_mutex.lock()
_hold_requests += 1
var h_requests = _hold_requests
_request_mutex.unlock()
print("[Lock] Hold applied: ", _hold_requests)
print("[Lock] Hold applied: ", h_requests)
if GlobalConfig.DEBUG:
print("hold from: ", _get_stack_info())
hold_changed.emit(_hold_requests, true)
hold_changed.emit(h_requests, true)
func unhold() -> void:
@ -110,7 +111,7 @@ func unhold() -> void:
_hold_requests = 0
var h_requests = _hold_requests
_request_mutex.unlock()
print("[Lock] Unhold applied: ", _hold_requests)
print("[Lock] Unhold applied: ", h_requests)
if GlobalConfig.DEBUG:
print("unhold from: ", _get_stack_info())
hold_changed.emit(h_requests, true)
@ -143,7 +144,7 @@ func lock_all(duration := 0.0) -> void:
var h_requests = _hold_requests
var f_requests = _freeze_requests
_request_mutex.unlock()
prints("[Lock] LockAll applied (hold, freeze): ", _hold_requests, _freeze_requests)
prints("[Lock] LockAll applied (hold, freeze): ", h_requests, f_requests)
if GlobalConfig.DEBUG:
print("lock_all from: ", _get_stack_info())
hold_changed.emit(h_requests, true)
@ -177,7 +178,7 @@ func unlock_all() -> void:
_request_mutex.unlock()
hold_changed.emit(h_requests, false)
freeze_changed.emit(f_requests, false)
prints("[Lock] UnlockAll applied (hold, freeze): ", _hold_requests, _freeze_requests)
prints("[Lock] UnlockAll applied (hold, freeze): ", h_requests, f_requests)
if GlobalConfig.DEBUG:
print("unlock_all from: ", _get_stack_info())

View File

@ -5,12 +5,14 @@ func _ready() -> void:
layer = GlobalConfig.CANVAS_LAYER_EFFECT
func run_effect(half_duration := 0.7):
func run_effect(half_duration := 0.7, wait_time := 0.5, color := Color.BLACK):
if not is_node_ready():
await ready
var rect = $ColorRect as ColorRect
var tween = create_tween()
rect.color = color
rect.modulate.a = 0
tween.tween_property(rect, "modulate:a", 1.0, half_duration)
tween.tween_interval(wait_time)
tween.tween_property(rect, "modulate:a", 0.0, half_duration)
tween.tween_callback(queue_free)

View File

@ -12,6 +12,7 @@ const META_ORIGINAL_STREAM = &"original_stream"
# TODO BGM 过程抑制场景音效;场景音效随玩家运动呼吸 (结合 Sfx2D)
# 感应玩家移动:装饰音
var default_db := 0.0
var default_linear := 1.0
# 只有 场景背景音 生效
var scene_loop := true
@ -21,6 +22,7 @@ var scene_sense_player_mov := false
func _ready() -> void:
bus = &"game_sfx"
default_db = volume_db
default_linear = volume_linear
if Engine.is_editor_hint():
return
# 记录原 stream
@ -34,6 +36,7 @@ func _ready() -> void:
SceneManager.ground_transition_pre_paused.connect(_on_ground_transition_pre_paused)
SceneManager.pause_counter_updated.connect(_on_pause_counter_updated)
var playing_on_debugging_paused = false
@ -43,7 +46,10 @@ func _on_pause_counter_updated() -> void:
func _set_up_process_mode_by_mode():
# 如果是 debug panel则 pause
if mode == "场景背景音" and (SceneManager.is_node_ready() and not SceneManager.pause_counter_arr.has("debugging")):
if (
mode == "场景背景音"
and (SceneManager.is_node_ready() and not SceneManager.pause_counter_arr.has("debugging"))
):
process_mode = Node.PROCESS_MODE_ALWAYS
else:
if SceneManager.is_node_ready() and SceneManager.pause_counter_arr.has("debugging"):
@ -86,20 +92,26 @@ func resart(ease_duration := 1.0):
# queue free 导致 sfx 无法播放,使用全局声源
# 注意需要手动调用 global_stop, 否则不会自动停止
func global_play() -> void:
AudioManager.stop_stream(stream)
if stream:
AudioManager.play_sfx(stream)
AudioManager.play_sfx(stream, volume_db)
func global_stop(duration := 1.5) -> void:
AudioManager.stop_stream(stream, duration)
func easing_kill(duration: float = 2.0) -> Tween:
# stop with easing
var tween = create_tween()
tween.bind_node(self)
if playing:
tween.tween_property(self, "volume_linear", 0.0, duration)
tween.tween_property(self, "volume_linear", 0.01, duration)
tween.tween_callback(stop)
# set volume_db back to default
tween.tween_callback(func(): volume_db = default_db)
tween.tween_interval(0.001) # 防止 no step
return tween
@ -153,3 +165,15 @@ func _get(property: StringName) -> Variant:
elif property == "感应玩家操作":
return scene_sense_player_mov
return null
func change_volumn_db(changed_volumn_db: float, duration := 1.0) -> void:
if changed_volumn_db != 0.0:
var target_linear = db_to_linear(default_db + changed_volumn_db)
var tween = create_tween()
tween.tween_property(self, "volume_linear", target_linear, duration)
func reset_volumn_to_default(duration := 1.0) -> void:
var tween = create_tween()
tween.tween_property(self, "volume_linear", default_linear, duration)

View File

@ -18,6 +18,7 @@ class_name Sfx2D extends AudioStreamPlayer2D
var timer: Timer
var default_db := 0.0
var default_linear := 1.0
func _ready() -> void:
bus = &"game_sfx"
@ -25,6 +26,7 @@ func _ready() -> void:
if Engine.is_editor_hint():
return
default_db = volume_db
default_linear = volume_linear
timer = Timer.new()
timer.autostart = autoplay and loop and loop_round_time > 0.0 and not Engine.is_editor_hint()
timer.one_shot = false
@ -43,7 +45,6 @@ func _on_ground_transition_pre_paused():
easing_kill(1.0)
func _on_timer_timeout() -> void:
if not loop or loop_round_time <= 0.0:
timer.stop()
@ -73,8 +74,21 @@ func easing_kill(duration: float = 2.0) -> Tween:
var tween = create_tween()
tween.bind_node(self)
if playing:
tween.tween_property(self, "volume_linear", 0.0, duration)
tween.tween_property(self, "volume_linear", 0.01, duration)
tween.tween_callback(stop)
# set volume_db back to default
tween.tween_callback(func(): volume_db = default_db)
tween.tween_interval(0.001) # 防止 no step
return tween
func change_volumn_db(changed_volumn_db: float, duration := 1.0) -> void:
if changed_volumn_db != 0.0:
var target_linear = db_to_linear(default_db + changed_volumn_db)
var tween = create_tween()
tween.tween_property(self, "volume_linear", target_linear, duration)
func reset_volumn_to_default(duration := 1.0) -> void:
var tween = create_tween()
tween.tween_property(self, "volume_linear", default_linear, duration)

View File

@ -8,7 +8,14 @@ signal exit(arg)
@export var packed_scene: PackedScene
@export var quit_closeup_on_cancel := true
@export var on_display_hide_hud := false
@export var on_display_change_volumn := true
@export var on_display_changed_volumn_db := -7.0
# 转场效果 1s
@export var transition_effect := true
@export_tool_button("新建特写场景") var create_closeup_scene = _create_scene_with_script
# 在 exit 信号前,禁用 cancel
var _holding_cancel_before_exit := false
var current_child: Node
@ -20,14 +27,27 @@ func _ready() -> void:
interacted.connect(display)
func hold_cancel_before_exit() -> void:
_holding_cancel_before_exit = true
# 可以直接调用
func display() -> void:
if current_child:
return
if packed_scene:
if on_display_hide_hud and SceneManager.get_ground().display_hud:
SceneManager.toggle_hud_display(false)
if on_display_change_volumn:
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "change_volumn_db" , on_display_changed_volumn_db)
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "change_volumn_db" , on_display_changed_volumn_db)
SceneManager.lock_player(0, action_key)
# 展示时,禁用 sign_mark 的输入
sign_mark.pass_unhandled_input = true
# 转场效果
if transition_effect:
SceneManager.black_transition(0.5, 0.1)
await Util.wait(0.55)
current_child = packed_scene.instantiate()
add_child(current_child)
if current_child.has_signal("exit"):
@ -38,23 +58,30 @@ func display() -> void:
func _exit(arg = null):
if current_child:
if on_display_hide_hud and SceneManager.get_ground().display_hud:
SceneManager.toggle_hud_display(true)
if on_display_change_volumn:
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "reset_volumn_to_default")
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "reset_volumn_to_default")
SceneManager.unlock_player()
if current_child:
remove_child(current_child)
current_child.queue_free()
remove_child(current_child)
current_child.queue_free()
current_child = null
print("quit [", name, "] arg=", arg)
exit.emit(arg)
# 退出时,恢复 sign_mark 的输入
sign_mark.pass_unhandled_input = false
# exit 信号后,恢复处理 cancel 事件
_holding_cancel_before_exit = false
func _unhandled_input(event: InputEvent) -> void:
if not current_child:
return
if quit_closeup_on_cancel and event.is_action_pressed("cancel"):
get_viewport().set_input_as_handled()
_exit()
if event.is_action_pressed("cancel"):
if quit_closeup_on_cancel and not _holding_cancel_before_exit:
get_viewport().set_input_as_handled()
_exit()
# 在有特写界面时,阻塞 interact 输入
elif event.is_action_pressed("interact"):
get_viewport().set_input_as_handled()

View File

@ -83,7 +83,7 @@ func _ready() -> void:
func _visibility_changed():
_check_display()
sign_mark.enabled = enabled and is_visible_in_tree()
func _check_display():

View File

@ -49,6 +49,7 @@ var target_portal := "none":
@export var opened_texture: Texture2D
@export var unrevealed_sign_texture: Texture2D
@export var default_sign_texture: Texture2D
@export var default_sign_texture_r: Texture2D
@export var opened_sign_texture: Texture2D
@export var matched_sign_texture: Texture2D
@export var locked_sign_texture: Texture2D
@ -136,7 +137,10 @@ func _check_sign_mark_and_texture():
texture = default_texture
# 切换 sign_mark texture 同时设置 sign_snapper 的 action
if status == "default":
sign_mark.sprite2d.texture = default_sign_texture
if portal_name == "left":
sign_mark.sprite2d.texture = default_sign_texture
else:
sign_mark.sprite2d.texture = default_sign_texture_r
sign_snapper.action_on_arrived = 3
else:
sign_snapper.action_on_arrived = 4

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=14 format=3 uid="uid://61pis75a8fdq"]
[gd_scene load_steps=15 format=3 uid="uid://61pis75a8fdq"]
[ext_resource type="Script" uid="uid://b2dvvhawm820r" path="res://scene/entity/portal.gd" id="1_jyh6v"]
[ext_resource type="Texture2D" uid="uid://bc4lpa8aao60n" path="res://asset/art/ui/action_mark/传送.png" id="2_ay30q"]
[ext_resource type="Texture2D" uid="uid://r0n7qy4kr3w2" path="res://asset/art/ui/action_mark/UI场景切换.png" id="2_bxihn"]
[ext_resource type="Texture2D" uid="uid://dtyg0nugb2tnf" path="res://asset/art/ui/action_mark/UI探索.png" id="2_fr7ak"]
[ext_resource type="Texture2D" uid="uid://bc8sn2v4t1yta" path="res://asset/art/ui/action_mark/UI开锁.png" id="3_fr7ak"]
[ext_resource type="Texture2D" uid="uid://cwbh3j84ctxvp" path="res://asset/art/ui/action_mark/UI场景切换_right.png" id="4_fr7ak"]
[ext_resource type="PackedScene" uid="uid://c4tipnj1cr1j3" path="res://scene/entity/ux/sign.tscn" id="4_ty1ds"]
[ext_resource type="AudioStream" uid="uid://ccng5y2fip6mc" path="res://asset/audio/sfx/UI/开锁声.ogg" id="5_l48hy"]
[ext_resource type="AudioStream" uid="uid://dqdjxy04ge0r5" path="res://asset/audio/sfx/旧版/c02/场景转场.ogg" id="6_1sj6c"]
@ -23,7 +24,8 @@ sign_mark_offset = Vector2(0, -50)
collision_width_and_x = Vector2(30, 0)
unrevealed_sign_texture = ExtResource("2_fr7ak")
default_sign_texture = ExtResource("2_bxihn")
opened_sign_texture = ExtResource("2_bxihn")
default_sign_texture_r = ExtResource("4_fr7ak")
opened_sign_texture = ExtResource("2_ay30q")
matched_sign_texture = ExtResource("3_fr7ak")
locked_sign_texture = ExtResource("3_fr7ak")
prop_key = ""

View File

@ -0,0 +1,102 @@
class_name HoverLightClickArea extends Area2D
signal interacted
@export var freezing := false:
set(val):
freezing = val
if freezing and touching:
_on_mouse_exited()
var touching = false
static var _focus_mutex = Mutex.new()
static var current_focusing_item = "":
set(val):
current_focusing_item = val
if GlobalConfig.DEBUG:
print("HoverLightClickArea current_focusing_item=", current_focusing_item)
static var pending_enter_callables := [] as Array[Callable]
# to pointlight2d
var lights: Array[NodePath] = []
func _ready() -> void:
for c in get_children():
if c is PointLight2D:
lights.append(self.get_path_to(c))
if lights.is_empty():
printerr("HoverLightButton has no PointLight2D children. auto freezed name=", name)
freezing = true
mouse_entered.connect(_on_mouse_entered)
mouse_exited.connect(_on_mouse_exited)
# 默认先熄灭
_toggle_light(false)
func is_focused() -> bool:
return current_focusing_item == name
func _on_mouse_entered() -> bool:
touching = true
if freezing or not is_visible_in_tree():
return false
if is_focused():
return true
_focus_mutex.lock()
# 尝试获得 current_focusing_item
if current_focusing_item != "":
if not pending_enter_callables.has(_on_mouse_entered):
pending_enter_callables.append(_on_mouse_entered)
_focus_mutex.unlock()
return false
current_focusing_item = name
_focus_mutex.unlock()
_toggle_light(true)
return true
func _on_mouse_exited() -> void:
touching = false
_focus_mutex.lock()
pending_enter_callables.erase(_on_mouse_entered)
# frezzing 不影响 mouse exited
if is_focused():
current_focusing_item = ""
for c in pending_enter_callables:
if c.call():
break
_focus_mutex.unlock()
_toggle_light(false)
func _toggle_light(on: bool) -> void:
for l in lights:
var light = get_node(l) as PointLight2D
if light:
light.enabled = on
func invalid_blink() -> void:
for l in lights:
var light = get_node(l) as PointLight2D
if light:
var tween = create_tween()
tween.tween_property(light, "color", Color.RED, 0.2)
tween.tween_property(light, "color", Color.WHITE, 0.3)
func _unhandled_input(event: InputEvent) -> void:
if freezing or Engine.is_editor_hint() or not is_visible_in_tree():
return
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
if is_focused():
get_viewport().set_input_as_handled()
interacted.emit()
func _exit_tree() -> void:
if touching:
_on_mouse_exited()

View File

@ -0,0 +1 @@
uid://ubn3pgywffro

View File

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://bkk1rxx36ghrl"]
[ext_resource type="Script" uid="uid://ubn3pgywffro" path="res://scene/entity/ux/hover_light_click_area.gd" id="1_qoyst"]
[node name="HoverLightClickArea" type="Area2D"]
collision_layer = 4
collision_mask = 4
monitorable = false
script = ExtResource("1_qoyst")

View File

@ -14,20 +14,47 @@ var _tweeked_position := Vector2.ZERO
var zoom_tween: Tween
var shake_ignore_boundary := false
# default
var default_camera_rect := Rect2i(0, -158, 564, 316)
func _ready() -> void:
reset_speed()
if not focusing_node:
push_error("Focusing node not found")
# 默认重置 limits
func apply_limits(rect := default_camera_rect, replace_default := true) -> void:
if replace_default:
default_camera_rect = rect
var start = rect.position
var end = rect.end
limit_left = start.x
limit_right = end.x
limit_top = start.y
limit_bottom = end.y
func reset_speed() -> void:
speed = 2.0
func shake_camera(strength := 6.0, recovery_speed := 2.0, ignore_boundary := true):
shake_strength = strength
shake_recovery_speed = recovery_speed
shake_ignore_boundary = ignore_boundary
if shake_ignore_boundary:
_update_limit_by_strength()
func _update_limit_by_strength() -> void:
var int_s := ceili(shake_strength)
var start = default_camera_rect.position
var end = default_camera_rect.end
limit_left = start.x - int_s
limit_right = end.x + int_s
limit_top = start.y - int_s
limit_bottom = end.y + int_s
func reset_position_immediately():
@ -69,7 +96,8 @@ func _physics_process(delta: float) -> void:
global_position = progressing_position
# handle shake
if shake_strength > 0.0:
if shake_strength > 0.01: #epsilon
_update_limit_by_strength()
# 让 shake_strength 逐帧衰减
shake_recovery_speed = max(0.1, shake_recovery_speed)
shake_strength = lerpf(shake_strength, 0.0, shake_recovery_speed * delta)
@ -87,6 +115,12 @@ func _physics_process(delta: float) -> void:
global_position += shaked_offset
if not shake_ignore_boundary:
global_position = _clamp_boundary(global_position)
elif shake_ignore_boundary:
# reset limits
shake_ignore_boundary = false
shake_strength = 0.0
_update_limit_by_strength()
# var taget_zoom = lerpf(zoom.x, zoom_ratio, speed * delta)
# zoom = Vector2(taget_zoom, taget_zoom)

View File

@ -72,11 +72,12 @@ func _ready() -> void:
print("restarting: skip ground _ready()")
return
_validate_scene_name()
_set_camera_and_player_boundary()
if Engine.is_editor_hint():
return
_set_camera_and_player_boundary()
_setup_scene()
_setup_runtime()
_arrange_nodes_to_group(self)
func _handle_restart() -> void:
@ -103,6 +104,17 @@ func _setup_runtime() -> void:
SceneManager.toggle_hud_display(display_hud)
func _arrange_nodes_to_group(parent: Node) -> void:
if not parent:
return
for c in parent.get_children():
_arrange_nodes_to_group(c)
if c is Sfx:
c.add_to_group(GlobalConfig.GROUP_GROUND_SFX)
elif c is Sfx2D:
c.add_to_group(GlobalConfig.GROUP_GROUND_SFX2D)
func _restart_from_main() -> void:
# _enter_tree, wait for ready
await ready
@ -182,13 +194,10 @@ func _calculate_player_rect() -> Rect2:
return player_rect
func _apply_camera_limits(camera_rect: Rect2) -> void:
func _apply_camera_limits(camera_rect: Rect2i) -> void:
var camera_marker = get_camera()
if camera_marker:
camera_marker.limit_left = camera_rect.position.x
camera_marker.limit_right = camera_rect.position.x + camera_rect.size.x
camera_marker.limit_top = camera_rect.position.y
camera_marker.limit_bottom = camera_rect.position.y + camera_rect.size.y
camera_marker.apply_limits(camera_rect)
func _apply_player_boundary(player_rect: Rect2) -> void:

View File

@ -49,9 +49,14 @@ unique_name_in_owner = true
position = Vector2(41, 88)
reenter_lock = NodePath("../PlayerReenterLock")
camera_marker = NodePath("../CameraFocusMarker")
player_movement_rect = Rect2(20, -158, 524, 316)
[node name="CameraFocusMarker" parent="." node_paths=PackedStringArray("focusing_node") instance=ExtResource("4_mgk0a")]
unique_name_in_owner = true
limit_left = 0
limit_top = -158
limit_right = 564
limit_bottom = 158
focusing_node = NodePath("../MainPlayer")
[node name="ParallaxForeground" type="ParallaxBackground" parent="."]

View File

@ -24,6 +24,7 @@ func _setup_display_on_locale():
$"Intro/Content/水平排版".visible = not is_zh
$"Intro/Content/竖直排版".visible = is_zh
func _notification(what: int) -> void:
if what == NOTIFICATION_TRANSLATION_CHANGED:
_setup_display_on_locale()
@ -44,8 +45,10 @@ func play_intro_dialogue():
# 直接使用 sfx防止下方字幕与全屏文字重复
$intro_audio_player.play()
var tip: Node2D
func _on_ground_ready() -> void:
tip = $"../ParallaxForeground/FGParallaxLayer/键位提示"
ArchiveManager.set_chapter_if_greater(1)
ambush = $"../DeployLayer/ambush鸡毛掸子"
frame = $"../DeployLayer/画框"
@ -54,7 +57,7 @@ func _on_ground_ready() -> void:
piano = $"../DeployLayer/钢琴"
if data["intro_played"]:
$"../DeployLayer/床".enabled = true
Util.timer(1.0, show_interact_help)
Util.timer(2.0, show_interact_help)
# 画框是否已经正位
data.frame_relocated = ambush.played and ambush.one_shot
# 禁用鸡毛掸子
@ -95,7 +98,9 @@ func _on_ground_ready() -> void:
func cant_read() -> void:
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s05_院长房间_看不清了", [GlobalConfig.DIALOG_IGNORE_INPUT])
DialogueManager.show_dialogue_balloon(
dialogue_c01, "c01_s05_院长房间_看不清了", [GlobalConfig.DIALOG_IGNORE_INPUT]
)
func os_find_wig() -> void:
@ -178,5 +183,38 @@ func _on_piano_interacted():
SceneManager.pop_debug_dialog_info("音效", "钢琴声: " + str(piano_id))
var help_tween: Tween
var help_tween_paused := false
func show_interact_help():
tip.modulate.a = 0.0
tip.show()
SceneManager.lock_player()
help_tween = create_tween()
help_tween.tween_property(tip, "modulate:a", 1.0, 1.0)
help_tween.tween_callback(func ():
help_tween_paused = true
Util.timer(2.0, _breath_light)
help_tween.pause()
)
help_tween.tween_property(tip, "modulate:a", 0.0, 1.0)
await help_tween.finished
SceneManager.unlock_player()
await Util.wait(0.5)
SceneManager.pop_center_notification("ui_center_notify_a_d_to_move")
await Util.wait(5.0)
SceneManager.pop_center_notification("ui_center_notify_press_e_to_interact")
func _breath_light() -> void:
var light = tip.get_node("PointLight2D") as PointLight2D
var tween = create_tween()
tween.tween_property(light, "energy", 1.0, 1.0)
tween.tween_property(light, "energy", 0.0, 1.0)
tween.tween_callback(_breath_light)
func _unhandled_input(event: InputEvent) -> void:
if help_tween_paused and event.is_action_pressed("cancel"):
help_tween.play()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=38 format=3 uid="uid://dlx5xxbg53rb8"]
[gd_scene load_steps=41 format=3 uid="uid://dlx5xxbg53rb8"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_ff4yb"]
[ext_resource type="Script" uid="uid://q2qgg85xa6ie" path="res://scene/ground/scene/c01/s05_院长房间.gd" id="2_j5oim"]
@ -20,6 +20,7 @@
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="10_18v0g"]
[ext_resource type="Script" uid="uid://wapo47a1oddf" path="res://scene/entity/audio/sfx2d.gd" id="10_kyds0"]
[ext_resource type="Texture2D" uid="uid://choqjery7hf58" path="res://asset/art/scene/c01/s05_院长房间/e_画框.png" id="11_6gq1s"]
[ext_resource type="Texture2D" uid="uid://jnw2yk6ls0fj" path="res://asset/art/ui/键位提示.png" id="11_247wt"]
[ext_resource type="Texture2D" uid="uid://dae5yrbb5llia" path="res://asset/art/scene/c01/s05_院长房间/e_鸡毛掸子.png" id="12_jtglg"]
[ext_resource type="SpriteFrames" uid="uid://b7fhheih1hbvf" path="res://config/animation/entity_sprite_frames.tres" id="14_e1bmq"]
[ext_resource type="PackedScene" uid="uid://cw3q5pvciumil" path="res://scene/entity/interactable.tscn" id="14_lq1ou"]
@ -30,6 +31,8 @@
[ext_resource type="Texture2D" uid="uid://gui0ubwlwoi0" path="res://asset/art/ui/action_mark/UI手.png" id="22_00ufd"]
[ext_resource type="LabelSettings" uid="uid://dd6jhbqr6uh3x" path="res://config/序章夜行船_label_settings.tres" id="28_8gx6s"]
[ext_resource type="Script" uid="uid://dpocj5al0rvai" path="res://ui/text_helper.gd" id="29_247wt"]
[ext_resource type="Texture2D" uid="uid://b7gyapghy3tsy" path="res://asset/art/neutral_point_light.png" id="31_qf7jl"]
[ext_resource type="FontVariation" uid="uid://1ryw42kej6lv" path="res://config/font_ui.tres" id="31_w4f3l"]
[sub_resource type="Animation" id="Animation_c6mhi"]
length = 0.001
@ -865,6 +868,7 @@ position = Vector2(27, 3)
[node name="portal_right" parent="Ground/DeployLayer" index="1"]
position = Vector2(503, 11)
texture = ExtResource("4_gdhoy")
sign_mark_offset = Vector2(0, -46)
target_scene = "c01_s06"
target_portal = "left"
status = "opened"
@ -979,17 +983,262 @@ facing_direction = Vector2(1, 0)
[node name="AudioListener2D" type="AudioListener2D" parent="Ground/MainPlayer" index="6"]
current = true
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 564
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(21, 39)
texture = ExtResource("3_vmr0f")
offset = Vector2(0, 0)
[node name="键位提示" type="Node2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="1"]
visible = false
[node name="提示图" type="Sprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
light_mask = 3
position = Vector2(0, -158)
scale = Vector2(0.25, 0.25)
texture = ExtResource("11_247wt")
centered = false
[node name="PointLight2D" type="PointLight2D" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
position = Vector2(230, -14)
color = Color(0, 0.770832, 0.205171, 1)
energy = 0.0
range_layer_min = 1
range_layer_max = 10
range_item_cull_mask = 2
texture = ExtResource("31_qf7jl")
texture_scale = 0.3
[node name="z" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 100.0
offset_top = -83.0
offset_right = 100.0
offset_bottom = -83.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/z"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_z"
horizontal_alignment = 1
vertical_alignment = 1
[node name="c" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 143.0
offset_top = -83.0
offset_right = 143.0
offset_bottom = -83.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/c"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_c"
horizontal_alignment = 1
vertical_alignment = 1
[node name="a" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 71.0
offset_top = 21.0
offset_right = 71.0
offset_bottom = 21.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/a"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_a"
horizontal_alignment = 1
vertical_alignment = 1
[node name="d" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 111.0
offset_top = 21.0
offset_right = 111.0
offset_bottom = 21.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/d"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_d"
horizontal_alignment = 1
vertical_alignment = 1
[node name="q" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 229.0
offset_top = -3.0
offset_right = 229.0
offset_bottom = -3.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/q"]
light_mask = 3
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_q"
horizontal_alignment = 1
vertical_alignment = 1
[node name="e" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 326.0
offset_top = -2.0
offset_right = 326.0
offset_bottom = -2.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/e"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_e"
horizontal_alignment = 1
vertical_alignment = 1
[node name="esc" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 306.0
offset_top = 80.0
offset_right = 306.0
offset_bottom = 80.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/esc"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_esc"
horizontal_alignment = 1
vertical_alignment = 1
[node name="b" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 365.0
offset_top = 80.0
offset_right = 365.0
offset_bottom = 80.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/b"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_b"
horizontal_alignment = 1
vertical_alignment = 1
[node name="n" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 427.0
offset_top = 80.0
offset_right = 427.0
offset_bottom = 80.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/n"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_n"
horizontal_alignment = 1
vertical_alignment = 1
[node name="m" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"]
layout_mode = 3
anchors_preset = 0
offset_left = 486.0
offset_top = 80.0
offset_right = 486.0
offset_bottom = 80.0
mouse_filter = 2
[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/m"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -21.5
offset_right = 21.5
offset_bottom = 14.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("31_w4f3l")
text = "ui_key_m"
horizontal_alignment = 1
vertical_alignment = 1
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
points = PackedVector2Array(40, 149, 530, 150)

View File

@ -129,7 +129,7 @@ func game_intro() -> void:
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s06_谈论鬼差与猫鼠游戏")
await DialogueManager.dialogue_ended
# BGM 开始后小段对话
$"Sfx猫鼠游戏".play()
$"Sfx猫鼠游戏".global_play()
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s06_猫鼠游戏BGM开始")
await DialogueManager.dialogue_ended
# 重置镜头
@ -290,7 +290,7 @@ func game_restart():
await Util.wait(1.0)
# 开始跑
SceneManager.release_player()
$"Sfx猫鼠游戏".set("parameters/switch_to_clip", "Intro")
$"Sfx猫鼠游戏".global_play()
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s06_猫鼠游戏倒计时")
await Util.wait(1.5)
_kids_start_run()
@ -371,6 +371,10 @@ func transport_player_to_next_scene(win: bool):
SceneManager.pop_debug_dialog_info("音效", "猫鼠游戏失败,传送下一场景")
func _exit_tree() -> void:
$"Sfx猫鼠游戏".global_stop(3.0)
# var s07_ground := preload("res://scene/ground/scene/c01/s07_书店外.tscn")
# var s07_ground_node = s07_ground.instantiate()

View File

@ -672,10 +672,7 @@ character = "小小蝶"
player_movement_rect = Rect2(37, -158, 3963, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 5234
limit_bottom = 158
[node name="院长凳子" type="Sprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="0"]
position = Vector2(34, 3)

View File

@ -275,10 +275,7 @@ character = "小小蝶"
player_movement_rect = Rect2(37, -158, 2203, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 2270
limit_bottom = 158
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
points = PackedVector2Array(37, 150, 2240, 150)

View File

@ -31,7 +31,7 @@ var mask: ColorRect
var left_protal: Portal2D
var shelf_game_success = false
var envelope_game_success = false
var manager
var manager: Npc2D
var mice
var fall_off
@ -44,7 +44,7 @@ func _on_ground_ready() -> void:
counter = $"../DeployLayer/Interactable报纸柜台"
coin = $"../DeployLayer/Ambush银元"
mice = $"../DeployLayer/自动跟随的老鼠"
manager = $"../DeployLayer/老板"
manager = $"../DeployLayer/Npc书店老板"
fall_off = $"../DeployLayer/小小蝶坠落"
# 首先放报纸,触发动画,领取任务
if counter.interacted_times > 0:
@ -70,8 +70,13 @@ func _on_ground_ready() -> void:
else:
mice.visible = false
_check_portal()
_refresh_npc_enable_status()
func _refresh_npc_enable_status() -> void:
# 书店老板 Npc 状态
manager.enabled = (counter.interacted_times > 0) and not shelf_game_success
func _check_portal():
if not shelf_game_success or not envelope_game_success:
left_protal.holding = true
@ -109,27 +114,35 @@ func assign_tasks() -> void:
SceneManager.unlock_player()
ladder.enabled = true
envolope_table.enabled = true
_refresh_npc_enable_status()
func _exit_tree() -> void:
if is_instance_valid(shelf_game_node):
shelf_game_node.queue_free()
var first_enter_shelf_game := true
func play_shelf_game() -> void:
if shelf_game_node.get_parent() != get_parent():
get_parent().add_child(shelf_game_node)
SceneManager.freeze_player(0)
if first_enter_shelf_game:
first_enter_shelf_game = false
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s08_书店书架游戏")
SceneManager.lock_player()
_toggle_amb_sfx_volumn(true)
func _on_shelf_game_exiting() -> void:
if GlobalConfig.DEBUG:
print("书架游戏 exiting")
create_tween().tween_property(mask, "color:a", 0.0, 1.0).from(1.0)
SceneManager.release_player()
SceneManager.unlock_player()
_toggle_amb_sfx_volumn(false)
func _on_shelf_game_success() -> void:
_toggle_amb_sfx_volumn(false)
ArchiveManager.set_global_entry(&"c01_shelf_game_success", true)
shelf_game_success = true
_setup_weird_bookstore()
@ -148,6 +161,7 @@ func _on_shelf_game_success() -> void:
# 从 sfx_生死簿演出 中退出时播放不出来,需要在此处播放 (global_play)
# Util.timer(0.5, $"摔倒音效".play)
_check_portal()
_refresh_npc_enable_status()
func _on_fall_off_finished() -> void:
@ -161,7 +175,7 @@ func _on_fall_off_finished() -> void:
await Util.wait(2.5)
await SceneManager.pop_os_with_str("c01_s08_书架游戏恢复记忆")
# 最后释放玩家
SceneManager.release_player()
SceneManager.unlock_player()
func _setup_weird_bookstore() -> void:
@ -185,24 +199,27 @@ func _setup_weird_bookstore() -> void:
func play_envelope_game() -> void:
if envelope_game_node.get_parent() != get_parent():
get_parent().add_child(envelope_game_node)
SceneManager.freeze_player(0)
get_parent().add_child.call_deferred(envelope_game_node)
SceneManager.lock_player()
_toggle_amb_sfx_volumn(true)
func _on_envelope_game_exiting() -> void:
if GlobalConfig.DEBUG:
print("信封游戏 exiting")
create_tween().tween_property(mask, "color:a", 0.0, 1.0).from(1.0)
SceneManager.release_player()
SceneManager.unlock_player()
_toggle_amb_sfx_volumn(false)
func _on_envelope_game_success() -> void:
SceneManager.release_player()
envolope_table.enabled = false
create_tween().tween_property(mask, "color:a", 0.0, 1.0).from(1.0)
ArchiveManager.set_global_entry(&"envelope_game_success", true)
envelope_game_success = true
_check_portal()
SceneManager.unlock_player()
_toggle_amb_sfx_volumn(false)
func pay_off_wage() -> void:
@ -213,3 +230,10 @@ func pay_off_wage() -> void:
func _on_quit_inspect_coin() -> void:
SceneManager.pop_os_with_str("c01_s08_获得袁大头后")
func _toggle_amb_sfx_volumn(hold_down: bool) -> void:
if hold_down:
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "change_volumn_db", -7.0)
else:
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "reset_volumn_to_default")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=23 format=3 uid="uid://cwu4dhayra8pg"]
[gd_scene load_steps=24 format=3 uid="uid://cwu4dhayra8pg"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_b3cca"]
[ext_resource type="Script" uid="uid://6q2pfbqsw10t" path="res://scene/ground/scene/c01/s08_书店.gd" id="2_0lque"]
@ -18,6 +18,7 @@
[ext_resource type="AudioStream" uid="uid://cniawn37n8888" path="res://asset/audio/sfx/交互/序章/04_书店内_递交报纸.ogg" id="9_lfr41"]
[ext_resource type="AudioStream" uid="uid://b8sbtn3l37uh" path="res://asset/audio/sfx/旧版/c02/红屏.ogg" id="9_srknn"]
[ext_resource type="Texture2D" uid="uid://bp4y3vujvsl7r" path="res://asset/art/scene/c01/s08_书店/fg_前景.png" id="10_4e3a1"]
[ext_resource type="PackedScene" uid="uid://0sofmhrl358m" path="res://scene/entity/npc.tscn" id="16_wg16e"]
[ext_resource type="PackedScene" uid="uid://decfqoe5v0y6n" path="res://scene/effect/dizzy_shader.tscn" id="18_wg16e"]
[sub_resource type="AnimationLibrary" id="AnimationLibrary_xqgjo"]
@ -44,7 +45,7 @@ script = ExtResource("2_0lque")
[node name="环境音" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
process_mode = 1
stream = ExtResource("3_0x288")
volume_db = -8.0
volume_db = 5.0
autoplay = true
bus = &"game_sfx"
script = ExtResource("4_p6k3c")
@ -56,7 +57,7 @@ metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="诡异环境音" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="1"]
process_mode = 1
stream = ExtResource("5_eerhd")
volume_db = -7.0
volume_db = -4.0
bus = &"game_sfx"
script = ExtResource("4_p6k3c")
mode = "场景背景音"
@ -163,13 +164,15 @@ trigger_mode = "interact"
cooldown_time = 1.0
hook_method = "pay_off_wage"
[node name="老板" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="9"]
position = Vector2(151, -2)
[node name="Npc书店老板" parent="Ground/DeployLayer" index="9" instance=ExtResource("16_wg16e")]
position = Vector2(151, 0)
sprite_frames = ExtResource("8_hunwx")
animation = &"老板写字"
autoplay = "老板写字"
frame = 3
frame_progress = 0.119486
offset = Vector2(1.07, 0)
enabled = false
sign_mark_height = -18.42
speaking_sign_height = 13.75
dialogue_title = "c01_s08_书店老板"
[node name="小小蝶坠落" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="10"]
visible = false
@ -191,10 +194,7 @@ character = "小小蝶"
player_movement_rect = Rect2(22, -158, 523, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 576
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(-1, 22)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=30 format=3 uid="uid://c777lv8mjojcw"]
[gd_scene load_steps=28 format=3 uid="uid://c777lv8mjojcw"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_mrwu5"]
[ext_resource type="Script" uid="uid://c7rvvsuf18ykn" path="res://scene/ground/scene/c01/s09_公寓楼外.gd" id="2_u053j"]
@ -19,7 +19,6 @@
[ext_resource type="SpriteFrames" uid="uid://c2peyi2l65h47" path="res://asset/art/gif/c01_公寓外街道/c01_公寓外街道_frames.tres" id="10_0ohlv"]
[ext_resource type="Script" uid="uid://dxq5c05ab7uyu" path="res://scene/ground/script/c01/s00_ghost_footstep.gd" id="11_6w7lv"]
[ext_resource type="Texture2D" uid="uid://b7gyapghy3tsy" path="res://asset/art/neutral_point_light.png" id="12_828bq"]
[ext_resource type="Texture2D" uid="uid://r0n7qy4kr3w2" path="res://asset/art/ui/action_mark/UI场景切换.png" id="12_lrqbi"]
[ext_resource type="PackedScene" uid="uid://svvlohuicvhf" path="res://scene/entity/ambient/light.tscn" id="13_6w7lv"]
[ext_resource type="Script" uid="uid://wapo47a1oddf" path="res://scene/entity/audio/sfx2d.gd" id="19_jgofb"]
[ext_resource type="Script" uid="uid://baok7hk5jygpm" path="res://scene/ground/script/c01/s09_鬼影浮现.gd" id="20_nwvnr"]
@ -53,10 +52,6 @@ animations = [{
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_j34rt"]
resource_local_to_scene = true
size = Vector2(30, 130)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4sgc5"]
size = Vector2(40, 80)
@ -118,28 +113,12 @@ frame = 0
[node name="portal_2" parent="Ground/DeployLayer" index="3" instance=ExtResource("3_4myxt")]
position = Vector2(2938, 18)
collision_width_and_x = Vector2(75.04, 0)
debug_note = "传送到公寓楼道"
portal_name = "2"
target_scene = "c01_s10"
target_portal = "left"
[node name="SfxEnter" parent="Ground/DeployLayer/portal_2" index="2"]
stream = null
[node name="Sign" parent="Ground/DeployLayer/portal_2" index="4"]
enabled = true
[node name="TextureContainer" parent="Ground/DeployLayer/portal_2/Sign" index="0"]
offset_top = -50.0
offset_bottom = -50.0
[node name="Sprite2D" parent="Ground/DeployLayer/portal_2/Sign/TextureContainer" index="0"]
texture = ExtResource("12_lrqbi")
[node name="CollisionShape2D" parent="Ground/DeployLayer/portal_2/Area2D" index="0"]
position = Vector2(5, 0)
shape = SubResource("RectangleShape2D_j34rt")
[node name="S01自动枯萎的花朵" parent="Ground/DeployLayer" index="4" node_paths=PackedStringArray("focus_node") instance=ExtResource("3_52pqy")]
position = Vector2(539, 79)
focus_node = NodePath("../Ghost")
@ -359,7 +338,6 @@ character = "小小蝶"
player_movement_rect = Rect2(37, -158, 3423, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -165
limit_right = 3500
limit_bottom = 165
@ -372,5 +350,3 @@ energy = 0.4
blend_mode = 1
[editable path="Ground"]
[editable path="Ground/DeployLayer/portal_2"]
[editable path="Ground/DeployLayer/portal_2/Sign"]

View File

@ -58,10 +58,7 @@ character = "小小蝶"
player_movement_rect = Rect2(18, -158, 653, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 701
limit_bottom = 158
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
points = PackedVector2Array(18, 150, 671, 150)

View File

@ -31,7 +31,7 @@ func _on_ground_ready() -> void:
camera.limit_bottom = 158
await SceneManager.ground_start
# 相机抖动
camera.shake_camera(6.0, 1.5)
camera.shake_camera(6.0, 2.5)
# 不显示玩家,锁定玩家移动
SceneManager.lock_player()
main_character = $"../DeployLayer/车夫与吕萍"

View File

@ -614,7 +614,6 @@ character = "小小蝶"
player_movement_rect = Rect2(37, -158, 11313, 316)
[node name="CameraFocusMarker" parent="Ground" index="6" node_paths=PackedStringArray("focusing_node")]
limit_left = 0
limit_top = -384
limit_right = 11377
limit_bottom = 384

View File

@ -323,10 +323,7 @@ character = "小小蝶"
player_movement_rect = Rect2(37, -158, 3013, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 3070
limit_bottom = 158
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
points = PackedVector2Array(37, 150, 3050, 150)

View File

@ -112,10 +112,7 @@ position = Vector2(78, 98)
player_movement_rect = Rect2(37, -158, 683, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 755
limit_bottom = 158
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
points = PackedVector2Array(37, 150, 720, 150)

View File

@ -28,6 +28,7 @@ func _ready() -> void:
func _on_ground_ready() -> void:
Util.timer(4.0, $"Sfx楼道怪声".play)
wind_blows = $"../DeployLayer/WindBlows"
if data.first_enter:
wind_blows.visible = false

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=32 format=3 uid="uid://brck77w81fhvc"]
[gd_scene load_steps=33 format=3 uid="uid://brck77w81fhvc"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_wrr6r"]
[ext_resource type="Script" uid="uid://bfrgnmde3hjn0" path="res://scene/ground/scene/c02/s02_过道.gd" id="2_5p8ev"]
@ -7,9 +7,10 @@
[ext_resource type="Texture2D" uid="uid://5428j51dwarc" path="res://asset/art/scene/c02/s02_大门过道/bg_过道背景.png" id="3_gjwum"]
[ext_resource type="AudioStream" uid="uid://o7fj0r0fbm1h" path="res://asset/audio/sfx/交互/第一章/sfx_冷飕飕.ogg" id="4_36l5t"]
[ext_resource type="SpriteFrames" uid="uid://b7fhheih1hbvf" path="res://config/animation/entity_sprite_frames.tres" id="4_wbif8"]
[ext_resource type="AudioStream" uid="uid://bjwguxsoehrne" path="res://asset/audio/sfx/环境音/第一章/楼道场景2.ogg" id="5_2lo60"]
[ext_resource type="AudioStream" uid="uid://6oc0cgc3mbqb" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道2.ogg" id="5_2lo60"]
[ext_resource type="Texture2D" uid="uid://r0n7qy4kr3w2" path="res://asset/art/ui/action_mark/UI场景切换.png" id="5_m1xet"]
[ext_resource type="Texture2D" uid="uid://b8pcnqvdddo5g" path="res://asset/art/prop/c02/海报特写/除鼠二杰.png" id="7_jg8g0"]
[ext_resource type="AudioStream" uid="uid://cs5kdeolswovh" path="res://asset/audio/sfx/环境音/第一章/楼道怪声.ogg" id="7_n6caa"]
[ext_resource type="Texture2D" uid="uid://cvgw2mxrlr6io" path="res://asset/art/scene/c02/旧版/s02_走道/ux_进门鼠疫海报yz.png" id="7_wdwbi"]
[ext_resource type="Texture2D" uid="uid://5pl1b7cor715" path="res://asset/art/scene/c02/旧版/s02_走道/e_纸人.png" id="7_xsghn"]
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="8_52as8"]
@ -76,6 +77,13 @@ mode = "场景背景音"
"感应玩家操作" = false
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="Sfx楼道怪声" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="2"]
process_mode = 1
stream = ExtResource("7_n6caa")
bus = &"game_sfx"
script = ExtResource("14_jg8g0")
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
[node name="BGSprite2D" parent="Ground" index="2"]
self_modulate = Color(0.831373, 0.886275, 0.956863, 1)
position = Vector2(-1, 0)
@ -96,6 +104,7 @@ target_portal = "left"
[node name="InteractableLeftPortal" parent="Ground/DeployLayer" index="2" instance=ExtResource("13_ck13g")]
position = Vector2(28, -24)
action_key = 3
unrevealed_sign_texture = ExtResource("5_m1xet")
matched_sign_texture = ExtResource("5_m1xet")
one_shot = false
@ -123,6 +132,7 @@ content_key = "c02_海报1"
position = Vector2(253, -31)
texture = ExtResource("10_jg8g0")
packed_scene = ExtResource("11_jg8g0")
on_display_hide_hud = true
first_interact_os_key = "c02_海报_剪辫子侦探"
[node name="青岛啤酒" parent="Ground/DeployLayer" index="7" instance=ExtResource("12_0fckv")]
@ -252,10 +262,7 @@ player_movement_rect = Rect2(19, -158, 667, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 700
limit_bottom = 158
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
points = PackedVector2Array(19, 150, 686, 150)

View File

@ -85,7 +85,7 @@ func _on_ground_ready() -> void:
$"../DeployLayer/Ambush偷听对话".enabled = false
eavesdrop_window.visible = false
if ArchiveManager.get_global_value(&"c02_show_grounded_coins"):
if ArchiveManager.get_global_value(&"c02_show_grounded_coins") and EventManager.get_chapter_stage() <= 2:
# 奠字 + 纸钱
$"../DeployLayer/新背景_奠".visible = true
@ -316,6 +316,8 @@ func _on_counter_interacted():
func _walk_to_xchan_and_run_away() -> void:
SceneManager.lock_player()
# 火灾演出过程暂不隐藏 hud跑到尽头后转场在谢幕演出开始二楼会隐藏
# SceneManager.toggle_hud_display(false)
# 从走向小蝉就开始放
$"Sfx牵手演出氛围音".global_play()
var player = SceneManager.get_player() as MainPlayer

View File

@ -644,6 +644,7 @@ texture = ExtResource("22_3y5s5")
[node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="23" instance=ExtResource("23_81juy")]
position = Vector2(466, 3)
packed_scene = ExtResource("24_0o4rt")
on_display_hide_hud = true
collision_width_and_x = Vector2(40, 0)
[node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="24" instance=ExtResource("25_iyaiw")]
@ -666,6 +667,7 @@ frame_progress = 0.643855
z_index = 6
position = Vector2(2063, 50)
packed_scene = ExtResource("26_yy4fp")
on_display_hide_hud = true
action_key = 3
[node name="Npc井边疯子" parent="Ground/DeployLayer" index="28" instance=ExtResource("35_plfv5")]
@ -1059,10 +1061,7 @@ player_movement_rect = Rect2(17, -158, 2233, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 2380
limit_bottom = 158
[node name="BGParallaxLayer" parent="Ground/ParallaxForeground" index="0"]
use_parent_material = true

View File

@ -92,6 +92,7 @@ texture = ExtResource("9_k74x7")
unique_name_in_owner = true
position = Vector2(189, 15)
packed_scene = ExtResource("7_fvlg0")
on_display_hide_hud = true
first_interact_os_key = "c02_保卫科祭台os"
[node name="Closeup老鼠精" parent="Ground/DeployLayer" index="7" instance=ExtResource("6_66gue")]
@ -99,11 +100,13 @@ light_mask = 5
position = Vector2(207.5, -40.5)
texture = ExtResource("11_ffvrp")
packed_scene = ExtResource("8_cm3g6")
on_display_hide_hud = true
[node name="Closeup花名册" parent="Ground/DeployLayer" index="8" instance=ExtResource("6_66gue")]
unique_name_in_owner = true
position = Vector2(351, 31)
packed_scene = ExtResource("6_fvlg0")
on_display_hide_hud = true
first_interact_os_key = "c02_保卫科花名册os"
[node name="煤油灯" type="Sprite2D" parent="Ground/DeployLayer" index="9"]
@ -136,12 +139,6 @@ position = Vector2(447, 98)
player_movement_rect = Rect2(66, -158, 429, 316)
facing_direction = Vector2(-1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 564
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(45, -76)
scale = Vector2(1.05, 1.05)

View File

@ -77,6 +77,7 @@ func wood_puppet() -> void:
await SceneManager.get_inspector().quit_and_hidden
SceneManager.lock_player(0, 17, true)
$"../DeployLayer/DizzyShader".dizzy()
$"Sfx背景音".change_volumn_db(-10.0)
$"Sfx记忆闪回音效".play()
# SceneManager.get_camera_marker().shake_camera()
await Util.wait(2.5)
@ -92,6 +93,7 @@ func wood_puppet() -> void:
SceneManager.unlock_player()
EventManager.set_stage_if_greater(&"handnote_c02_xchan_sheKnowsMe", 1)
$"Sfx记忆闪回音效".easing_kill()
$"Sfx背景音".reset_volumn_to_default()
func bucket_meat() -> void:

View File

@ -2,7 +2,7 @@
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_6w6et"]
[ext_resource type="Script" uid="uid://dydpmjpcvt3v1" path="res://scene/ground/scene/c02/s05_一楼内侧楼道.gd" id="2_70lf6"]
[ext_resource type="AudioStream" uid="uid://blf1rtu71vy17" path="res://asset/audio/sfx/环境音/第一章/楼道场景1.ogg" id="3_74b3r"]
[ext_resource type="AudioStream" uid="uid://dvc2emnfcmabx" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道1.ogg" id="3_74b3r"]
[ext_resource type="Texture2D" uid="uid://dbtepltemtmy2" path="res://asset/art/scene/c02/s05_一楼内侧楼道/bg_楼道背景.png" id="3_rcuxq"]
[ext_resource type="AudioStream" uid="uid://d3tnbdx2j4tmy" path="res://asset/audio/sfx/bgm/第一章/sfx_一楼楼道记忆闪回.ogg" id="4_74b3r"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_tueh3"]
@ -179,6 +179,8 @@ hook_method = "wood_puppet"
position = Vector2(-108, -168)
packed_scene = ExtResource("10_7mq0m")
quit_closeup_on_cancel = false
on_display_hide_hud = true
on_display_changed_volumn_db = 0.0
action_key = 3
first_interact_os_key = "c02_一楼戏台"
@ -216,8 +218,9 @@ range_item_cull_mask = 4
texture = ExtResource("8_mrltr")
[node name="Closeup戏台" parent="Ground/DeployLayer" index="7" instance=ExtResource("10_2yvhw")]
position = Vector2(305, -249)
position = Vector2(314, 30)
packed_scene = ExtResource("11_2yvhw")
on_display_hide_hud = true
first_interact_os_key = "c02_一楼戏台"
[node name="Note一楼内侧通道" parent="Ground/DeployLayer" index="8" instance=ExtResource("10_8t4w6")]
@ -343,10 +346,7 @@ player_movement_rect = Rect2(23, -158, 677, 316)
current = true
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 716
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(45, -9)

View File

@ -157,6 +157,7 @@ func _toggle_candles(show: bool) -> void:
# 第一章火灾结束,尾声演出
func _c02_final_show():
SceneManager.toggle_hud_display(false)
_toggle_candles(false)
var player = SceneManager.get_player()
player.set_facing_direction(Vector2(-1, 0))
@ -216,6 +217,7 @@ func _on_exit_final_show(_arg):
ArchiveManager.set_chapter_if_greater(3)
await SceneManager.pop_chapter_notification(3)
SceneManager.unlock_player()
SceneManager.toggle_hud_display(true)
func unlock_2floor_map():

View File

@ -2,7 +2,7 @@
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_qkymk"]
[ext_resource type="Script" uid="uid://cbt0ubygchxvv" path="res://scene/ground/scene/c02/s06_二楼.gd" id="2_4dg6u"]
[ext_resource type="AudioStream" uid="uid://bjwguxsoehrne" path="res://asset/audio/sfx/环境音/第一章/楼道场景2.ogg" id="3_lipxo"]
[ext_resource type="AudioStream" uid="uid://6oc0cgc3mbqb" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道2.ogg" id="3_lipxo"]
[ext_resource type="Texture2D" uid="uid://6ol2om68cd1q" path="res://asset/art/scene/c02/s06_二楼楼道/bg_背景.png" id="3_och2w"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_2e08x"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_haidv"]
@ -1179,6 +1179,7 @@ quit_closeup_on_cancel = false
[node name="Closeup水盆" parent="Ground/DeployLayer" index="16" instance=ExtResource("11_owxx3")]
position = Vector2(289, 16)
packed_scene = ExtResource("16_p6da7")
on_display_hide_hud = true
first_interact_os_key = "c02_二楼水盆"
[node name="Closeup谢幕演出" parent="Ground/DeployLayer" index="17" instance=ExtResource("11_owxx3")]
@ -1352,10 +1353,7 @@ player_movement_rect = Rect2(26, -158, 874, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 927
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(0, -5)

View File

@ -2,7 +2,7 @@
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_oao56"]
[ext_resource type="Script" uid="uid://cnjdxjni5v3cs" path="res://scene/ground/scene/c02/s07_二楼内侧楼道.gd" id="2_t0s64"]
[ext_resource type="AudioStream" uid="uid://bjwguxsoehrne" path="res://asset/audio/sfx/环境音/第一章/楼道场景2.ogg" id="3_e4bwj"]
[ext_resource type="AudioStream" uid="uid://6oc0cgc3mbqb" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道2.ogg" id="3_e4bwj"]
[ext_resource type="Texture2D" uid="uid://u7rp66mboqq4" path="res://asset/art/scene/c02/s07_二楼内侧楼道/bg_背景.png" id="3_t0s64"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_4anfx"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_5krke"]
@ -77,6 +77,7 @@ position = Vector2(-5, 78)
position = Vector2(292, -11)
texture = ExtResource("10_6ivku")
packed_scene = ExtResource("11_vxng8")
on_display_hide_hud = true
first_interact_os_key = "c02_海报_戏法班"
[node name="Note老鼠洞" parent="Ground/DeployLayer" index="7" instance=ExtResource("13_s75vl")]
@ -115,10 +116,7 @@ position = Vector2(41, 98)
player_movement_rect = Rect2(37, -158, 573, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 645
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(11, -1)

View File

@ -30,8 +30,8 @@ func _on_ground_ready() -> void:
ambush_lookback = $"../DeployLayer/Ambush回看洞口"
gaslight = $"../DeployLayer/灯座Sprite2D/煤油灯"
boxcat_portal = $"../DeployLayer/portal_1"
# 0默认 1拿了麻将 2偷听结束 3已爬出
if data.hole_interacted_times >= 3:
# 0默认 1偷听结束 2已爬出 (不再拿麻将)
if data.hole_interacted_times >= 2:
setup_rect_after_entered()
else:
color_mask.color.a = 1.0
@ -88,8 +88,6 @@ func hole_interacted():
print("hole_interacted_times=", times)
if times == 0:
SceneManager.enable_prop_item("prop_麻将")
elif times == 1:
# 注意:每种情况结束后,都需要将 interacting 设置为 false
interacting = true
eavesdrop_start()
@ -99,7 +97,8 @@ func hole_interacted():
func eavesdrop_start() -> void:
SceneManager.freeze_player(0, 5)
SceneManager.toggle_hud_display(false)
SceneManager.lock_player(0, 5)
var node = $"../DeployLayer/瞎子小蝉对话"
node.visible = true
# 偷听动作
@ -117,7 +116,8 @@ func eavesdrop_start() -> void:
tween.parallel().tween_property(color_mask, "color:a", 1.0, 2.0)
await tween.finished
node.visible = false
SceneManager.release_player()
SceneManager.unlock_player()
SceneManager.toggle_hud_display(true)
interacting = false

View File

@ -1,12 +1,12 @@
[gd_scene load_steps=38 format=3 uid="uid://ce2vyyg2reg52"]
[gd_scene load_steps=40 format=3 uid="uid://ce2vyyg2reg52"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_judx3"]
[ext_resource type="Script" uid="uid://hbbgymjs5xte" path="res://scene/ground/scene/c02/s08_瞎子卧室.gd" id="2_m4uw8"]
[ext_resource type="Texture2D" uid="uid://v3sj36aijq5b" path="res://asset/art/scene/c02/s08_瞎子卧室/bg_瞎子卧室.png" id="3_iares"]
[ext_resource type="AudioStream" uid="uid://b2mudqvq1dmng" path="res://asset/audio/sfx/环境音/白噪音/白噪声房间里1.ogg" id="3_nnqdd"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="3_t3h08"]
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_1ws4i"]
[ext_resource type="Texture2D" uid="uid://vqyhgyka3sfo" path="res://asset/art/scene/c02/s08_瞎子卧室/瞎子卧室前景.png" id="4_gx8oy"]
[ext_resource type="AudioStream" uid="uid://o57tyriodr0c" path="res://asset/audio/sfx/环境音/白噪音/白噪声房间里2.ogg" id="4_quq80"]
[ext_resource type="AudioStream" uid="uid://dk3e1w3n2snur" path="res://asset/audio/sfx/旧版/c02/纸人出现.ogg" id="5_0qeqe"]
[ext_resource type="Texture2D" uid="uid://b5pwb4fm46sad" path="res://asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张.png" id="5_f6mma"]
[ext_resource type="Texture2D" uid="uid://7ay1ttob8qwm" path="res://asset/art/scene/c02/s08_瞎子卧室/e_床板.png" id="5_vjjde"]
@ -23,6 +23,7 @@
[ext_resource type="Texture2D" uid="uid://bgtxwxerl2dxh" path="res://asset/art/scene/c02/s08_瞎子卧室/十字架.png" id="11_t3h08"]
[ext_resource type="Texture2D" uid="uid://bcqcvohj7jy40" path="res://asset/art/scene/c02/杂物/煤油灯 关灯.png" id="11_u4psw"]
[ext_resource type="Texture2D" uid="uid://bmid3iu2ch35o" path="res://asset/art/scene/c02/s08_瞎子卧室/八卦图.png" id="12_1ws4i"]
[ext_resource type="AudioStream" uid="uid://dqdjxy04ge0r5" path="res://asset/audio/sfx/旧版/c02/场景转场.ogg" id="12_quq80"]
[ext_resource type="SpriteFrames" uid="uid://b7fhheih1hbvf" path="res://config/animation/entity_sprite_frames.tres" id="13_t3h08"]
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="14_1ws4i"]
[ext_resource type="PackedScene" uid="uid://cxv7vdgwb8lqb" path="res://scene/ground/script/c02/s08_画特写2.tscn" id="16_nub1x"]
@ -73,6 +74,10 @@ _data = {
&"RESET": SubResource("Animation_f6mma")
}
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nnqdd"]
resource_local_to_scene = true
size = Vector2(30, 130)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a48k2"]
resource_local_to_scene = true
size = Vector2(20, 70)
@ -113,7 +118,7 @@ script = ExtResource("2_m4uw8")
[node name="Sfx背景音" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"]
process_mode = 1
stream = ExtResource("4_quq80")
stream = ExtResource("3_nnqdd")
volume_db = -5.0
autoplay = true
bus = &"game_sfx"
@ -179,6 +184,18 @@ status = "opened"
default_sign_texture = ExtResource("8_dkqw0")
opened_sign_texture = ExtResource("8_dkqw0")
[node name="SfxOpen" parent="Ground/DeployLayer/portal_1" index="1"]
stream = ExtResource("12_quq80")
[node name="SfxEnter" parent="Ground/DeployLayer/portal_1" index="2"]
stream = ExtResource("12_quq80")
[node name="CollisionShape2D" parent="Ground/DeployLayer/portal_1/Area2D" index="0"]
shape = SubResource("RectangleShape2D_nnqdd")
[node name="SignSnapper" parent="Ground/DeployLayer/portal_1" index="7"]
action_on_arrived = 4
[node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/portal_1"]
show_behind_parent = true
light_mask = 33
@ -197,11 +214,13 @@ texture_scale = 0.15
[node name="Closeup画" parent="Ground/DeployLayer" index="3" instance=ExtResource("10_a48k2")]
position = Vector2(214, -19)
packed_scene = ExtResource("11_mc126")
on_display_hide_hud = true
enabled = false
[node name="Closeup讨厌他们" parent="Ground/DeployLayer" index="4" instance=ExtResource("10_a48k2")]
position = Vector2(214, -19)
packed_scene = ExtResource("16_nub1x")
on_display_hide_hud = true
enabled = false
[node name="灯座Sprite2D" type="Sprite2D" parent="Ground/DeployLayer" index="5"]
@ -361,10 +380,7 @@ texture = SubResource("GradientTexture2D_bp5fr")
current = true
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 725
limit_bottom = 158
[node name="Sprite2D" type="Sprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="0"]
position = Vector2(291, 94)
@ -382,5 +398,6 @@ energy = 0.9
blend_mode = 1
[editable path="Ground"]
[editable path="Ground/DeployLayer/portal_1"]
[editable path="Ground/DeployLayer/灯座Sprite2D/煤油灯"]
[editable path="Ground/DeployLayer/Ambush偷听"]

View File

@ -183,6 +183,7 @@ texture = ExtResource("8_3ftnp")
position = Vector2(349, 15)
texture = ExtResource("18_3kyh4")
packed_scene = ExtResource("18_5t4pt")
on_display_hide_hud = true
sign_mark_offset = Vector2(0, -7.93)
first_interact_os_key = "c02_互动小蝉头套"
@ -271,12 +272,6 @@ position = Vector2(315, 98)
player_movement_rect = Rect2(50, -158, 460, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 564
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
visible = false
position = Vector2(193, 0)

View File

@ -219,10 +219,7 @@ player_movement_rect = Rect2(37, -158, 2213, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 2380
limit_bottom = 158
[node name="FGParallaxLayer" parent="Ground/ParallaxForeground" index="1"]
visible = false

View File

@ -63,10 +63,6 @@ player_movement_rect = Rect2(37, -158, 363, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 564
limit_bottom = 158
force_offset = Vector2(-20, 0)
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]

View File

@ -120,10 +120,7 @@ character = "盒子猫"
player_movement_rect = Rect2(37, -158, 833, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 903
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(-1, -16)

View File

@ -61,10 +61,7 @@ character = "盒子猫"
player_movement_rect = Rect2(101, -158, 559, 316)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 696
limit_bottom = 158
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
points = PackedVector2Array(101, 150, 660, 150)

View File

@ -55,10 +55,7 @@ player_movement_rect = Rect2(125, -158, 535, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 696
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(-1, -15)

View File

@ -67,10 +67,7 @@ player_movement_rect = Rect2(37, -158, 618, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 696
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(3584, -7)

View File

@ -53,6 +53,7 @@ debug_note = "出来就不能回来了"
portal_name = "1"
target_scene = "c02_s12"
target_portal = "left"
status = "opened"
[node name="Ambush猫咪敲门互动2" parent="Ground/DeployLayer" index="3" instance=ExtResource("8_m6dyn")]
position = Vector2(106, 6)
@ -70,10 +71,7 @@ player_movement_rect = Rect2(26, -158, 842, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 903
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(3584, -7)

View File

@ -84,10 +84,7 @@ player_movement_rect = Rect2(37, -158, 823, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 903
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
position = Vector2(3584, -7)

View File

@ -2,7 +2,7 @@
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_eb2op"]
[ext_resource type="Script" uid="uid://c0rh2n36ait6i" path="res://scene/ground/scene/c03/s01_三楼.gd" id="2_ow08b"]
[ext_resource type="AudioStream" uid="uid://bjwguxsoehrne" path="res://asset/audio/sfx/环境音/第一章/楼道场景2.ogg" id="3_hmme5"]
[ext_resource type="AudioStream" uid="uid://6oc0cgc3mbqb" path="res://asset/audio/sfx/环境音/白噪音/白噪声楼道2.ogg" id="3_hmme5"]
[ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_1ebn8"]
[ext_resource type="Texture2D" uid="uid://cpjd3dqri51fq" path="res://asset/art/scene/c03/s01_三楼/bg_三楼走廊.png" id="4_ow08b"]
[ext_resource type="Texture2D" uid="uid://b7t2sfe5ugtsc" path="res://asset/art/scene/c03/引导纸人/指引纸人3.png" id="5_fnwup"]
@ -255,6 +255,7 @@ texture = SubResource("GradientTexture2D_4rrrd")
position = Vector2(573, -6)
texture = ExtResource("11_amci2")
packed_scene = ExtResource("7_d27sg")
on_display_hide_hud = true
[node name="小蜡烛系列" type="Node2D" parent="Ground/DeployLayer" index="6"]
position = Vector2(0, 6)
@ -360,10 +361,7 @@ player_movement_rect = Rect2(30, -158, 693, 316)
facing_direction = Vector2(1, 0)
[node name="CameraFocusMarker" parent="Ground" index="6"]
limit_left = 0
limit_top = -158
limit_right = 749
limit_bottom = 158
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
visible = false

View File

@ -17,10 +17,11 @@ func _ready():
await get_parent().ready
# 盒子猫镜头左右各增加边框宽度
var camera = SceneManager.get_camera_marker()
camera.limit_left -= 100
camera.limit_right += 100
camera.limit_top -= 50
# camera.limit_bottom += 50
var rect: Rect2i = camera.default_camera_rect
rect.position.x -= 100
rect.size.x += 200
# rect.position.y -= 50
camera.apply_limits(rect)
if show_cat and not ArchiveManager.get_global_value(&"c02_boxcat_skip_intro"):
cat_fg.visible = true
var tween = create_tween()

View File

@ -10,10 +10,10 @@ extends Node2D
@export var trun_back_detect_x := 150
# 抓取范围,优先 catch_front 播放 猪头怪抓盒子猫
# 其次 catch_nearby 播放 猪头怪抓盒子猫后段
@export var catch_front_x_range := Vector2(55 - 3, 55 + 3)
@export var catch_nearby_x_range := Vector2(-10, 55)
var catch_front_x_range := Vector2(55 - 3, 55 + 3)
var catch_nearby_x_range := Vector2(-10, 55)
# 观测范围,在观测范围内进入盒子仍旧会被抓
@export var watching_x := 180
var watching_x := 80
# 允许被抓后重开游戏
var allow_restart_game := true
@ -50,6 +50,7 @@ func _on_ground_ready():
var archive = ArchiveManager.archive as AssembledArchive
var portal = archive.entrance_portal
var chasing_started = ArchiveManager.get_global_value(&"c02_boxcat_chasing_started", false)
# 盒子猫二楼 c02_s13
if archive.current_scene == "c02_s13":
# 开始追逐后,禁用二楼两只
if chasing_started and not transfer_mode:
@ -89,8 +90,8 @@ func _on_ground_ready():
global_position.x = portal_node.global_position.x
# 禁用传送过来的 portal 3s
_disable_portal_a_few_seconds(portal_node)
# 3 秒后传送
Util.timer(1.0, _do_transfer)
# 2.5 秒后传送
Util.timer(2.5, _do_transfer)
if GlobalConfig.DEBUG:
print("猪头怪 Transfer to: " + portal)
else:
@ -126,10 +127,10 @@ func toggle_footstep_sfx(play := true):
footstep_timer.stop()
# 禁用传送过来的 portal 3s
# 禁用传送过来的 portal 4s
func _disable_portal_a_few_seconds(portal_node: Portal2D):
portal_node.enabled = false
await create_tween().tween_interval(3.0).finished
await create_tween().tween_interval(4.0).finished
portal_node.enabled = true
@ -183,6 +184,8 @@ func do_catch(front: bool):
SceneManager.unlock_player()
# 等待动画播放后秒,再检查是否允许重开游戏
if allow_restart_game:
# 重置追击状态
ArchiveManager.set_global_entry(&"c02_boxcat_chasing_started", false)
SceneManager.get_ground_loader().transition_to_scene("c02_s12", "left")

View File

@ -33,7 +33,22 @@ signal dropped(node: Draggable2D)
sprite.texture = texture
@export var limit_rect := Rect2(Vector2.ZERO, Vector2(564, 316))
@onready var sprite = $Sprite2D as Sprite2D
@onready var sprite: Sprite2D = $Sprite2D
# Whether the item is currently being held by the player
var holding := false:
set(val):
if holding != val:
holding = val
var touching := false
# 静态变量优化:使用对象引用而非字符串
static var current_focusing_node: Draggable2D = null
static var pending_enter_callables: Array[Callable] = []
# 缓存变量
var _highlight_tween: Tween
var _lights: Array[PointLight2D] = []
func _ready() -> void:
@ -41,26 +56,29 @@ func _ready() -> void:
sprite.offset = sprite_offset
if Engine.is_editor_hint():
return
# 初始化隐藏白边
sprite.material.set("shader_parameter/thickness", 0.0)
mouse_entered.connect(_on_mouse_entered)
mouse_exited.connect(_on_mouse_exited)
# add lights
_travarse_add_light(self)
# 初始化熄灭
_toggle_draggable_highlight(false)
# 安全检查
if has_signal("mouse_entered"):
mouse_entered.connect(_on_mouse_entered)
mouse_exited.connect(_on_mouse_exited)
else:
printerr("Draggable2D: mouse_entered or mouse_exited signal not found.")
# Whether the item is currently being held by the player
var holding = false
var touching = false
static var current_focusing_item = "":
set(val):
current_focusing_item = val
if GlobalConfig.DEBUG:
print("current_focusing_item=", current_focusing_item)
static var pending_enter_callables := [] as Array[Callable]
func _travarse_add_light(node: Node) -> void:
if node is PointLight2D:
_lights.append(node)
for c in node.get_children():
_travarse_add_light(c)
func is_focused() -> bool:
return current_focusing_item == item_name
return current_focusing_node == self
func _on_mouse_entered() -> bool:
@ -69,69 +87,63 @@ func _on_mouse_entered() -> bool:
return false
if holding or is_focused():
return true
# 尝试获得 current_focusing_item
if current_focusing_item != "":
# 尝试获得 current_focusing_node
if current_focusing_node:
if not pending_enter_callables.has(_on_mouse_entered):
pending_enter_callables.append(_on_mouse_entered)
return false
current_focusing_item = item_name
_toggle_outline(true)
current_focusing_node = self
_toggle_draggable_highlight(true)
return true
func _on_mouse_exited() -> void:
touching = false
pending_enter_callables.erase(_on_mouse_entered)
# frezzing 不影响 mouse exited
if is_focused():
current_focusing_item = ""
for c in pending_enter_callables:
# freezing 不影响 mouse exited
if is_focused() and not holding:
_toggle_draggable_highlight(false)
current_focusing_node = null
while pending_enter_callables.size() > 0:
var c = pending_enter_callables.pop_front()
if c.call():
break
_toggle_outline(false)
func _notification(what: int) -> void:
if what == NOTIFICATION_PREDELETE:
if holding:
_drop()
elif touching:
_on_mouse_exited()
func _input(event: InputEvent) -> void:
if freezing or Engine.is_editor_hint() or not is_visible_in_tree():
return
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
# Trigger the pick action
if touching and not holding:
_try_pick()
elif holding:
_drop()
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
if is_focused() and not holding:
get_viewport().set_input_as_handled()
_try_pick.call_deferred()
elif holding:
get_viewport().set_input_as_handled()
_drop()
elif holding and event is InputEventMouseMotion:
_update_pos_to_mouse()
func _update_pos_to_mouse():
func _update_pos_to_mouse() -> void:
# update global position
global_position = get_global_mouse_position()
global_position.x = clamp(global_position.x, limit_rect.position.x, limit_rect.end.x)
global_position.y = clamp(global_position.y, limit_rect.position.y, limit_rect.end.y)
var target_pos = get_global_mouse_position()
global_position.x = clamp(target_pos.x, limit_rect.position.x, limit_rect.end.x)
global_position.y = clamp(target_pos.y, limit_rect.position.y, limit_rect.end.y)
func _try_pick() -> void:
if act_as_button:
# 作为按钮,发送 picked 信号
picked.emit(self)
var tween = create_tween()
tween.tween_property(sprite.material, "shader_parameter/alpha_ratio", 1.0, 0.15)
return
if current_focusing_item != item_name:
if not is_focused():
return
# reset rotation
rotation = 0
_toggle_outline(false)
holding = true
# z_index += 1
picked.emit(self)
@ -141,23 +153,45 @@ func _try_pick() -> void:
func _drop() -> void:
if holding:
holding = false
if not touching:
current_focusing_node = null
# 清空数组前创建副本,避免在迭代时修改数组
var callables_copy = pending_enter_callables.duplicate()
for c in callables_copy:
if c.call():
break
# z_index -= 1
dropped.emit(self)
if is_focused():
_toggle_outline(true)
else:
# not touching but dropped, remove current_focusing_item if any
current_focusing_item = ""
if not touching:
_toggle_draggable_highlight(false)
func _toggle_outline(display = true):
var tween = create_tween()
if display:
tween.tween_property(sprite.material, "shader_parameter/thickness", 1.0, 0.2)
else:
tween.tween_property(sprite.material, "shader_parameter/thickness", 0.0, 0.2)
func _toggle_draggable_highlight(display: bool) -> void:
# 避免重复创建 tween
if _highlight_tween and _highlight_tween.is_running():
_highlight_tween.kill()
if _lights.is_empty():
printerr("Draggable2D: No lights found to toggle highlight.")
return
for l in _lights:
l.enabled = display
func _exit_tree() -> void:
if touching:
_on_mouse_exited()
_on_mouse_exited()
# 清理静态引用,避免内存泄漏
if current_focusing_node == self:
current_focusing_node = null
func force_hold() -> void:
if holding:
return
if not is_focused() and current_focusing_node:
current_focusing_node._drop()
_toggle_draggable_highlight(true)
current_focusing_node = self
holding = true
picked.emit(self)

View File

@ -1,32 +1,14 @@
[gd_scene load_steps=7 format=3 uid="uid://bg7oictr1wgex"]
[gd_scene load_steps=3 format=3 uid="uid://bg7oictr1wgex"]
[ext_resource type="Script" uid="uid://f217t2lytw84" path="res://scene/little_game/general/draggable.gd" id="1_txku8"]
[ext_resource type="Shader" uid="uid://cgy5ujo5afab2" path="res://asset/shader/outline.gdshader" id="2_pq7cf"]
[ext_resource type="Texture2D" uid="uid://di0gqyxa0c3eg" path="res://asset/art/little_game/八音盒/新版贴图/小婵玩偶.png" id="3_de4ll"]
[sub_resource type="Gradient" id="Gradient_h88gi"]
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_pe1ot"]
gradient = SubResource("Gradient_h88gi")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pe1ot"]
resource_local_to_scene = true
shader = ExtResource("2_pq7cf")
shader_parameter/color = SubResource("GradientTexture1D_pe1ot")
shader_parameter/alpha_ratio = 1.0
shader_parameter/gradientResolution = 10
shader_parameter/thickness = 1.0
shader_parameter/tolerance = 0.0
shader_parameter/diagonals = true
shader_parameter/rounded = true
[node name="Draggable2D" type="Area2D"]
script = ExtResource("1_txku8")
texture = ExtResource("3_de4ll")
[node name="Sprite2D" type="Sprite2D" parent="."]
unique_name_in_owner = true
light_mask = 129
y_sort_enabled = true
material = SubResource("ShaderMaterial_pe1ot")
texture = ExtResource("3_de4ll")

View File

@ -1 +0,0 @@
extends Node2D

View File

@ -1 +0,0 @@
uid://3p40cd3bp3ta

View File

@ -64,19 +64,19 @@ func _ready() -> void:
box_closed.picked.connect(_on_box_picked)
drawer_btn.picked.connect(_on_drawer_picked)
if ArchiveManager.get_global_value(&"c02_musicbox_pic_taken"):
if ArchiveManager.get_global_value(&"c02_musicbox_taken_prop_撕下的照片上"):
pic.queue_free()
if ArchiveManager.get_global_value(&"c02_musicbox_danzhu_taken"):
if ArchiveManager.get_global_value(&"c02_musicbox_taken_prop_弹珠"):
danzhu.queue_free()
if ArchiveManager.get_global_value(&"c02_musicbox_xiaomao_taken"):
if ArchiveManager.get_global_value(&"c02_musicbox_taken_prop_无头小猫玩具"):
xiaomao.queue_free()
if ArchiveManager.get_global_value(&"c02_musicbox_xiaochan_taken"):
if ArchiveManager.get_global_value(&"c02_musicbox_taken_prop_木头人偶"):
xiaochan.queue_free()
pic.picked.connect(_on_prop_picked.bind("pic"))
danzhu.picked.connect(_on_prop_picked.bind("danzhu"))
xiaomao.picked.connect(_on_prop_picked.bind("xiaomao"))
xiaochan.picked.connect(_on_prop_picked.bind("xiaochan"))
pic.picked.connect(_on_prop_picked.bind("prop_撕下的照片上"))
danzhu.picked.connect(_on_prop_picked.bind("prop_弹珠"))
xiaomao.picked.connect(_on_prop_picked.bind("prop_无头小猫玩具"))
xiaochan.picked.connect(_on_prop_picked.bind("prop_木头人偶"))
d1.picked.connect(_on_picked)
d1.dropped.connect(_on_dropped)
@ -94,12 +94,8 @@ func _ready() -> void:
_chechout_stage(stage, false)
func _toggle_side_handle_outline(display: bool):
var tween = create_tween()
if display:
tween.tween_property(side_handle.material, "shader_parameter/thickness", 1.0, 0.2)
else:
tween.tween_property(side_handle.material, "shader_parameter/thickness", 0.0, 0.2)
func _toggle_side_handle_hightlight(display: bool):
side_handle.get_node("PointLight2D").enabled = display
func _on_box_picked(_node):
@ -128,9 +124,8 @@ func _on_drawer_picked(_node):
create_tween().tween_property(box_drawer, "modulate:a", 1.0, 0.5)
func _on_prop_picked(node: Draggable2D, archive_key: String):
func _on_prop_picked(node: Draggable2D, prop_key: String):
node.freezing = true
var key = node.item_name
# var tween = create_tween()
# # 撕下来的 fade out
# tween.tween_property(node, "modulate:a", 0.0, 1.0)
@ -138,10 +133,10 @@ func _on_prop_picked(node: Draggable2D, archive_key: String):
# tween.tween_interval(0.5)
# await tween.finished
node.queue_free()
SceneManager.enable_prop_item(key)
if key == "prop_无头小猫玩具":
SceneManager.enable_prop_item(prop_key)
if prop_key == "prop_无头小猫玩具":
_on_pick_catty()
ArchiveManager.set_global_entry(&"c02_musicbox_" + archive_key + "_taken", true)
ArchiveManager.set_global_entry(&"c02_musicbox_taken_" + prop_key, true)
func _on_picked(node: Draggable2D):
@ -263,6 +258,13 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
stage = s
_hide_all()
var display_handle_outline = false
if s >= 3:
# 隐藏道具栏
SceneManager.toggle_hud_display(false)
# 禁止退出特写
var closeup = get_parent() as Closeup2D
if closeup:
closeup.hold_cancel_before_exit()
# 1关闭 2打开 3放入小蝉人偶 4全部放置正确可摇手柄 5已播放完成
match s:
0:
@ -291,6 +293,7 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
if play_sfx:
sfx_open_lid.play()
3:
SceneManager.pop_center_notification("ui_center_notify_drag_to_rotate")
box_opened.visible = true
d4.visible = true
if pic:
@ -301,7 +304,7 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
sfx_open_lid.play()
4:
box_closed.visible = true
_toggle_side_handle_outline(display_handle_outline)
_toggle_side_handle_hightlight(display_handle_outline)
func _settle_plug_positions():
@ -317,7 +320,7 @@ func _unhandled_input(event: InputEvent) -> void:
get_viewport().set_input_as_handled()
# 尝试使用道具
var hud = SceneManager.get_prop_hud() as PropHud
var key = SceneManager.get_current_prop(false)
var key = SceneManager.get_current_prop()
if key == "prop_木头人偶":
SceneManager.disable_prop_item(key)
_chechout_stage(2)
@ -326,6 +329,10 @@ func _unhandled_input(event: InputEvent) -> void:
hud.on_toggle_invalid_prop()
elif event.is_action_pressed("cancel"):
get_viewport().set_input_as_handled()
if stage == 3:
# 摇把手阶段不可退出
return
SceneManager.toggle_hud_display(true)
exit.emit(false)

View File

@ -1,11 +1,10 @@
[gd_scene load_steps=47 format=3 uid="uid://beleib3mmu0af"]
[gd_scene load_steps=44 format=3 uid="uid://beleib3mmu0af"]
[ext_resource type="Texture2D" uid="uid://2xbl572hv2qf" path="res://asset/art/little_game/八音盒/背景.png" id="1_j0wst"]
[ext_resource type="Script" uid="uid://bian8ga7cet8k" path="res://scene/little_game/八音盒/八音盒.gd" id="2_opptd"]
[ext_resource type="Texture2D" uid="uid://daxg4b7lu1ep6" path="res://asset/art/little_game/八音盒/插销动画/插销-1.png" id="3_etora"]
[ext_resource type="Texture2D" uid="uid://cik6ro8nowsd3" path="res://asset/art/little_game/八音盒/插销动画/插销-2.png" id="4_ubbcw"]
[ext_resource type="AudioStream" uid="uid://duxo1jopqqf0q" path="res://asset/audio/sfx/交互/序章/04_书店内_移动书本.ogg" id="4_ytjup"]
[ext_resource type="Shader" uid="uid://cgy5ujo5afab2" path="res://asset/shader/outline.gdshader" id="5_dtoml"]
[ext_resource type="AudioStream" uid="uid://gxoubqjqpuks" path="res://asset/audio/sfx/交互/序章/04_书店内_点击书本.ogg" id="5_m5jrq"]
[ext_resource type="Texture2D" uid="uid://bslr2p2dgymxm" path="res://asset/art/little_game/八音盒/插销动画/插销-3.png" id="5_mxndl"]
[ext_resource type="Texture2D" uid="uid://bp8o30lfc7xrx" path="res://asset/art/little_game/八音盒/插销动画/插销-4.png" id="6_2lerk"]
@ -18,7 +17,6 @@
[ext_resource type="Texture2D" uid="uid://cxdsucu5wi464" path="res://asset/art/little_game/八音盒/插销动画/插销-8.png" id="10_j5b7e"]
[ext_resource type="Texture2D" uid="uid://d0mw5ohdf5ncj" path="res://asset/art/little_game/八音盒/插销动画/插销-9.png" id="11_rg33s"]
[ext_resource type="PackedScene" uid="uid://dry6mhv6x0ppl" path="res://scene/little_game/gadget/wheel.tscn" id="15_obian"]
[ext_resource type="Script" uid="uid://3p40cd3bp3ta" path="res://scene/little_game/八音盒/panel.gd" id="16_8vbnc"]
[ext_resource type="SpriteFrames" uid="uid://drst7gokusjgi" path="res://asset/art/gif/c02_八音盒/c02_八音盒_frames.tres" id="16_50eha"]
[ext_resource type="Texture2D" uid="uid://dthnevvjj3i5f" path="res://asset/art/little_game/八音盒/新版贴图/八音盒打开.png" id="16_dtoml"]
[ext_resource type="PackedScene" uid="uid://bg7oictr1wgex" path="res://scene/little_game/general/draggable.tscn" id="16_h88gi"]
@ -65,22 +63,6 @@ _data = {
&"handle_animation": SubResource("Animation_j415e")
}
[sub_resource type="Gradient" id="Gradient_cbhp3"]
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_28n4a"]
gradient = SubResource("Gradient_cbhp3")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ljgfp"]
shader = ExtResource("5_dtoml")
shader_parameter/color = SubResource("GradientTexture1D_28n4a")
shader_parameter/alpha_ratio = 1.0
shader_parameter/gradientResolution = 10
shader_parameter/thickness = 1.0
shader_parameter/tolerance = 0.0
shader_parameter/diagonals = true
shader_parameter/rounded = true
[sub_resource type="SpriteFrames" id="SpriteFrames_t7gu7"]
animations = [{
"frames": [{
@ -116,6 +98,15 @@ animations = [{
"speed": 5.0
}]
[sub_resource type="Gradient" id="Gradient_wq2wm"]
offsets = PackedFloat32Array(1)
colors = PackedColorArray(1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_sg8mt"]
gradient = SubResource("Gradient_wq2wm")
width = 128
height = 128
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cbhp3"]
resource_local_to_scene = true
size = Vector2(290, 60)
@ -180,13 +171,19 @@ offset_bottom = 188.0
[node name="SideHandle" type="AnimatedSprite2D" parent="All"]
show_behind_parent = true
material = SubResource("ShaderMaterial_ljgfp")
light_mask = 513
position = Vector2(-6.5, 40)
sprite_frames = SubResource("SpriteFrames_t7gu7")
centered = false
[node name="PointLight2D" type="PointLight2D" parent="All/SideHandle"]
position = Vector2(469.5, 141)
energy = 1.5
range_layer_max = 10
range_item_cull_mask = 512
texture = SubResource("GradientTexture2D_sg8mt")
[node name="ClosedBox" parent="All" instance=ExtResource("16_h88gi")]
visible = false
position = Vector2(277, 194.5)
act_as_button = true
item_name = "盒子"
@ -198,7 +195,14 @@ limit_rect = Rect2(150, 150, 220, 70)
position = Vector2(2.99999, -33.5)
polygon = PackedVector2Array(123, -48, -102, -48, -102, -45.8, -104.8, -43, -106.3, -43, -147.3, 42, -149.3, 42, -139, 110.3, -139, 112.5, -135, 119.4, -135, 120, 155.1, 120, 157.4, 114, 158.7, 114, 167.7, 55, 169, 55, 169, 43.5, 123, -45.6)
[node name="PointLight2D" type="PointLight2D" parent="All/ClosedBox"]
position = Vector2(3, -35)
energy = 1.5
range_layer_max = 10
texture = ExtResource("22_rdaqv")
[node name="OpenedBox" type="Sprite2D" parent="All"]
visible = false
position = Vector2(-48, 38)
texture = ExtResource("16_dtoml")
centered = false
@ -206,7 +210,6 @@ centered = false
[node name="Panel" type="Node2D" parent="All/OpenedBox"]
y_sort_enabled = true
position = Vector2(68.5, -38)
script = ExtResource("16_8vbnc")
[node name="Draggable2D1" parent="All/OpenedBox/Panel" instance=ExtResource("16_h88gi")]
position = Vector2(180, 196)
@ -216,10 +219,22 @@ sprite_offset = Vector2(3, -35)
texture = ExtResource("17_gm7pw")
limit_rect = Rect2(150, 150, 220, 70)
[node name="Sprite2D" parent="All/OpenedBox/Panel/Draggable2D1" index="0"]
light_mask = 3
texture = ExtResource("17_gm7pw")
offset = Vector2(3, -35)
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="All/OpenedBox/Panel/Draggable2D1"]
position = Vector2(3.20175, -33.5559)
polygon = PackedVector2Array(2.5, -45.5, -8.5, -45.5, -9.3, -44.5, -11.9, -44.5, -9.5, -31.1, -9.5, -30.4, -15.2, -25.5, -17.1, -25.5, -18.5, -19.2, -18.5, -3.9, -14.5, -0.700001, -13.5, 33.3, -14.5, 34.8, -14.5, 41.7, -7.7, 45.5, 4.3, 45.5, 6.3, 43.5, 8.1, 43.5, 9.5, 37.7, 9.5, 35.7, 5.8, 32, 6.3, 31.5, 8.7, 31.5, 7.5, 16.5, 7.5, -5.5, 13.8, -5.5, 18.5, -15.9, 18.5, -26.8, 16.2, -27.8, 9.5, -22.5, 9.5, -20.5, 8.6, -20.5, 3.1, -28.8, 6.5, -38.1, 6.5, -42.5)
[node name="PointLight2D" type="PointLight2D" parent="All/OpenedBox/Panel/Draggable2D1"]
position = Vector2(3.20175, -33.5559)
energy = 0.7
range_layer_max = 10
range_item_cull_mask = 2
texture = SubResource("GradientTexture2D_sg8mt")
[node name="Draggable2D2" parent="All/OpenedBox/Panel" instance=ExtResource("16_h88gi")]
position = Vector2(286.5, 197)
rotation = 1.58777
@ -228,10 +243,22 @@ sprite_offset = Vector2(1, -34)
texture = ExtResource("18_8vbnc")
limit_rect = Rect2(150, 150, 220, 70)
[node name="Sprite2D" parent="All/OpenedBox/Panel/Draggable2D2" index="0"]
light_mask = 5
texture = ExtResource("18_8vbnc")
offset = Vector2(1, -34)
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="All/OpenedBox/Panel/Draggable2D2"]
position = Vector2(1.42264, -34.029)
polygon = PackedVector2Array(11.5, -41.9, 2, -45.5, -5.5, -45.5, -9.4, -40.5, -12.1, -40.5, -10.5, -34.5, -10.5, -31.5, -6, -27.9, -10.3, -23.5, -12.3, -23.5, -12.5, -21.9, -12.5, -7.8, -10.9, -3.5, -12.5, 9.4, -12.5, 29.3, -9.5, 32.3, -12.5, 34.4, -12.5, 41.7, -5.7, 45.5, 6.3, 45.5, 8.3, 43.5, 10.1, 43.5, 11.5, 37.7, 11.5, 35.7, 8, 32.2, 10.2, 30.5, 12.5, 30.5, 12.5, 28.1, 8.5, -2.5, 8.5, -3.6, 12.2, -6.5, 12.5, -19.6, 5.4, -29.3, 11.5, -37.9)
[node name="PointLight2D" type="PointLight2D" parent="All/OpenedBox/Panel/Draggable2D2"]
position = Vector2(0.439749, -33.0122)
energy = 0.7
range_layer_max = 10
range_item_cull_mask = 4
texture = SubResource("GradientTexture2D_sg8mt")
[node name="Draggable2D3" parent="All/OpenedBox/Panel" instance=ExtResource("16_h88gi")]
position = Vector2(354, 169)
rotation = -1.26607
@ -240,10 +267,23 @@ sprite_offset = Vector2(1, -23)
texture = ExtResource("19_858bj")
limit_rect = Rect2(150, 150, 220, 70)
[node name="Sprite2D" parent="All/OpenedBox/Panel/Draggable2D3" index="0"]
light_mask = 9
texture = ExtResource("19_858bj")
offset = Vector2(1, -23)
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="All/OpenedBox/Panel/Draggable2D3"]
light_mask = 9
position = Vector2(1.18075, -22.9097)
polygon = PackedVector2Array(9.5, -23.1, 4.6, -26.3, 2.5, -25.2, 2.5, -24, -6.6, -24, -8.6, -21, -10.5, -21, -10.5, -18.8, -9.5, -15, -9.5, -8.9, -6.5, -6.9, -10.5, -2.8, -10.5, 16, -7.4, 18.3, -10, 20, -10.5, 29.5, -8.5, 31, -8.5, 32, 6.3, 32, 8.3, 30, 10.5, 30, 10.5, 27.6, 7, 17.3, 8.6, 15, 10.5, 15, 10.5, 13, 7.2, -9, 9.5, -20.8)
[node name="PointLight2D" type="PointLight2D" parent="All/OpenedBox/Panel/Draggable2D3"]
position = Vector2(0.439749, -33.0122)
energy = 0.7
range_layer_max = 10
range_item_cull_mask = 8
texture = SubResource("GradientTexture2D_sg8mt")
[node name="Draggable2D4" parent="All/OpenedBox/Panel" instance=ExtResource("16_h88gi")]
position = Vector2(310, 173)
rotation = -1.14307
@ -251,10 +291,21 @@ item_name = "蝉"
sprite_offset = Vector2(-4, -23)
limit_rect = Rect2(150, 150, 220, 70)
[node name="Sprite2D" parent="All/OpenedBox/Panel/Draggable2D4" index="0"]
light_mask = 17
offset = Vector2(-4, -23)
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="All/OpenedBox/Panel/Draggable2D4"]
position = Vector2(-4.7032, -24.7816)
polygon = PackedVector2Array(12, -29.6, -2.9, -33, -5, -33, -5, -31.3, -7, -30.2, -7, -25.3, -1.3, -17.7, -15, -5.9, -15, -3.2, -11.8, 0, -7.3, 0, -3.9, -2.8, -5, 1.8, -5, 6.7, -1, 12, -1, 17.9, -5.7, 21, -8, 21, -8, 29, -4, 32, -4, 33, 10.8, 33, 12.8, 31, 14.6, 31, 16, 25.2, 16, 22.8, 9, 18.8, 9, 15.8, 9.8, 15, 11.8, 15, 12.8, 7, 14.9, 7, 11, -3.5, 11, -8.4, 16, -17.5, 16, -27.3, 15.5, -29, 12, -29)
[node name="PointLight2D" type="PointLight2D" parent="All/OpenedBox/Panel/Draggable2D4"]
position = Vector2(0.439749, -33.0122)
energy = 0.7
range_layer_max = 10
range_item_cull_mask = 16
texture = SubResource("GradientTexture2D_sg8mt")
[node name="Marker2D1" type="Marker2D" parent="All/OpenedBox/Panel"]
position = Vector2(198, 178)
@ -284,6 +335,10 @@ limit_rect = Rect2(150, 150, 220, 70)
position = Vector2(-12, 9)
shape = SubResource("RectangleShape2D_cbhp3")
[node name="PointLight2D" type="PointLight2D" parent="All/BrokenBox/Draggable抽屉"]
range_layer_max = 10
texture = ExtResource("28_b3w8p")
[node name="Draggable照片" parent="All" instance=ExtResource("16_h88gi")]
position = Vector2(241, 71)
act_as_button = true
@ -295,6 +350,11 @@ limit_rect = Rect2(150, 150, 220, 70)
position = Vector2(6.4373e-06, -9.53674e-07)
polygon = PackedVector2Array(31.5, -37.5, 29.7, -38, 18.4, -38, -19.7, -28.9, -26, -32, -30.7, -32, -32.5, -28.4, -32.5, -23.2, -24.5, -15.2, -24.5, -9.6, -20.5, -8.3, -20.5, 4.5, -17.7, 10, -14.5, 30.3, -14.5, 32, -10.5, 35, -10.5, 37, 3.3, 37, 4.5, 26.1, 6.2, 25, 9.3, 25, 7.5, 19.6, 10.6, 14, 13.1, 14, 10.5, 4, 10.5, 3.2, 21, -2, 23.6, -2, 31.6, -14, 32.5, -14, 32.5, -22.4, 31.5, -28.3)
[node name="PointLight2D" type="PointLight2D" parent="All/Draggable照片"]
energy = 0.7
range_layer_max = 10
texture = ExtResource("19_cbhp3")
[node name="Drawer" type="Node2D" parent="All"]
visible = false
position = Vector2(20.5, 0)
@ -315,6 +375,10 @@ limit_rect = Rect2(150, 150, 220, 70)
position = Vector2(1, 7.62939e-06)
shape = SubResource("CircleShape2D_wq2wm")
[node name="PointLight2D" type="PointLight2D" parent="All/Drawer/Draggable1"]
range_layer_max = 10
texture = ExtResource("30_tgpfj")
[node name="Draggable2" parent="All/Drawer" instance=ExtResource("16_h88gi")]
position = Vector2(249.5, 143)
rotation = -0.254158
@ -326,6 +390,10 @@ limit_rect = Rect2(150, 150, 220, 70)
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="All/Drawer/Draggable2"]
polygon = PackedVector2Array(5.5, -37.9, 3, -36.8, 3, -35.8, 1, -34.7, 1, -30.5, 2.2, -29.6, 1.2, -28.1, -4.2, -33.5, -6.8, -33.5, -10, -30.3, -10, -27.5, -12.7, -25.5, -14.2, -25.5, -15, -31.5, -15, -35.5, -24.3, -31.5, -26.3, -31.5, -27.4, -29, -24, -25.7, -24, -23.3, -24.8, -22.5, -26.6, -22.5, -27.5, -18.8, -35, -26.3, -35, -28.5, -43.8, -28.5, -52.8, -19.5, -54.7, -19.5, -56.7, -7.5, -58.1, -7.5, -57, 10.6, -57, 16.1, -53, 22.1, -53, 24.5, -44, 31.4, -44, 33.5, -31.1, 33.5, -27, 40.1, -27, 42.3, -19, 43.2, -19, 44.5, 10.1, 44.5, 15.5, 35.8, 18.8, 36.5, 22.9, 36.5, 26.8, 43.5, 42.8, 43.5, 45.8, 40.5, 49.1, 40.5, 55.1, 31.5, 57.4, 31.5, 48, -20.9, 48, -22.3, 38, -32.3, 38, -34.5, 28.4, -34.5, 27, -28.7, 27, -25.6, 25.4, -24.6, 23, -26.5, 23, -27.8, 20.5, -28.9, 17.4, -25.9)
[node name="PointLight2D" type="PointLight2D" parent="All/Drawer/Draggable2"]
range_layer_max = 10
texture = ExtResource("31_wq2wm")
[node name="Draggable3" parent="All/Drawer" instance=ExtResource("16_h88gi")]
position = Vector2(368.5, 175)
rotation = 0.330288
@ -338,6 +406,11 @@ limit_rect = Rect2(150, 150, 220, 70)
position = Vector2(-1.99999, 0.999999)
polygon = PackedVector2Array(-11, -44.2, -11, -42.1, -14, -40.1, -14, -34.4, -9, -26.4, -9, -23.8, -5.6, -22.1, -12, -14.8, -12, -14.2, -27.6, -4, -29.2, -4, -30.3, -1.9, -27.1, 3, -20.5, 3, -8.7, -3.4, -11, 6.8, -11, 11.7, -5, 18.8, -5, 29, -12.7, 35, -15, 35, -15, 43.8, -11, 47.8, -11, 49.3, -2.4, 53, 6.8, 53, 15.7, 45, 18, 45, 18, 36, 13, 32, 13, 30, 8, 30, 8, 25.6, 10, 23, 11.7, 23, 13.7, 12, 15.6, 12, 11.5, -3, 12, -9.9, 12, -15.4, 19, -25, 21, -25, 21, -34.8, 16.8, -39, 13.8, -39, 12, -35.7, 12, -41.8)
[node name="PointLight2D" type="PointLight2D" parent="All/Drawer/Draggable3"]
position = Vector2(0, -1.52588e-05)
range_layer_max = 10
texture = ExtResource("32_sg8mt")
[node name="BoxAnimation" type="AnimatedSprite2D" parent="All"]
visible = false
position = Vector2(302.5, 249)
@ -372,3 +445,8 @@ texture = ExtResource("35_wq2wm")
position = Vector2(3, -0.98594)
range_item_cull_mask = 32
texture = ExtResource("36_sg8mt")
[editable path="All/OpenedBox/Panel/Draggable2D1"]
[editable path="All/OpenedBox/Panel/Draggable2D2"]
[editable path="All/OpenedBox/Panel/Draggable2D3"]
[editable path="All/OpenedBox/Panel/Draggable2D4"]

View File

@ -51,12 +51,11 @@ func intro():
func intro_finished():
SceneManager.disable_prop_item("prop_弹珠")
# 老虎钳 - 弹珠交换功能结束
EventManager.set_stage_if_greater(&"handnote_c02_hand_exchange", 2)
SceneManager.disable_prop_item_temp("prop_弹珠")
# SceneManager.disable_prop_item("prop_弹珠")
# 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束(小猫纸片) 4:游戏结束(小猫离开)
# 放入弹珠,开始游戏
EventManager.set_stage(&"c02_ball_game_stage", 2)
# EventManager.set_stage(&"c02_ball_game_stage", 2)
var ball = pivot.get_child(0) as RigidBody2D
ball.angular_velocity = 20
animation_player.play("give_ball")
@ -73,6 +72,9 @@ var shooting = false
func checkout_round(r: int):
if r == 0:
# 游戏开始,隐藏 hud
SceneManager.toggle_hud_display(false)
round_id = r
# 关闭所有碰撞
for i in range(3):
@ -252,6 +254,8 @@ func game_win() -> void:
animation_player.stop()
# 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束(小猫纸片) 4:游戏结束(小猫离开)
EventManager.set_stage(&"c02_ball_game_stage", 3)
# 老虎钳 - 弹珠交换功能结束
EventManager.set_stage_if_greater(&"handnote_c02_hand_exchange", 2)
$"Sfx结尾小孩跑_耳鸣".global_play()
Util.shake_layer(self, 2.0)
# 弹珠雨
@ -260,6 +264,7 @@ func game_win() -> void:
var scene = DialogueManager.show_dialogue_balloon_scene(dialog_balloon_scene, dialogue_c02, "c02_弹珠游戏4")
await scene.ball_dialogue_ended
await Util.wait(3.0)
SceneManager.toggle_hud_display(true)
exit.emit(true)

View File

@ -12,8 +12,6 @@ func _ready() -> void:
%UILayer.layer = GlobalConfig.CANVAS_LAYER_UI
%ColorRectTop.visible = true
%ColorRectBottom.visible = true
# focus_mode = Control.FOCUS_CLICK
# settings.exited.connect(grab_focus)
var debug_button_last_press_msec := 0

View File

@ -74,9 +74,9 @@ item_key = "prop_令牌"
display_time = 1.5
metadata/_edit_use_anchors_ = true
[node name="PropInspector" parent="." instance=ExtResource("5_ux0rw")]
unique_name_in_owner = true
[node name="GroundLoader" parent="." instance=ExtResource("10_8rc5n")]
position = Vector2(1, 0)
entrance_portal = "right"
[node name="PropInspector" parent="." instance=ExtResource("5_ux0rw")]
unique_name_in_owner = true

View File

@ -35,18 +35,21 @@ func show_center_texture(texture, duration := 3.0):
center_texture.texture = texture
var tween = create_tween()
tween.tween_property(center_texture, "modulate:a", 1, 0.4)
tween.tween_interval(max(0.1, duration - .8))
tween.tween_interval(max(0.1, duration - 0.8))
tween.tween_property(center_texture, "modulate:a", 0, 0.4)
var center_notification_tween: Tween
func show_center_notification(msg, duration := 3.0):
if not top_center_label:
return
top_center_label.text = msg
var tween = create_tween()
tween.tween_property(top_center_label, "modulate:a", 1, 0.4)
tween.tween_interval(max(0.1, duration - .8))
tween.tween_property(top_center_label, "modulate:a", 0, 0.4)
if center_notification_tween and center_notification_tween.is_running():
center_notification_tween.kill()
center_notification_tween = create_tween()
center_notification_tween.tween_property(top_center_label, "modulate:a", 1, 0.4)
center_notification_tween.tween_interval(max(0.1, duration - 0.8))
center_notification_tween.tween_property(top_center_label, "modulate:a", 0, 0.4)
func show_notification(msg, number):

View File

@ -34,6 +34,9 @@ func _load_item_buttons() -> void:
# prop keys
var inventory = hud.inventory
for prop_key in inventory.important_items:
if not hud.items_dict.has(prop_key):
printerr("Important item not found in items_dict: ", prop_key)
continue
var button = preload("uid://wxd25ec3cqyy").instantiate()
button.text = tr(prop_key)
button.pressed.connect(_display_item.bind(prop_key, button))
@ -59,7 +62,7 @@ func _display_item(prop_key, button = null):
button.icon = null
# prop keys
var item_data = hud.items_dict[prop_key]
var content = hud.items_description_dict[prop_key]
var content = hud.get_item_description(prop_key)
content_text_edit.text = content
texture_rect.texture = load(item_data.texture_path)

View File

@ -11,11 +11,15 @@ custom_minimum_size = Vector2(130, 26)
offset_right = 20.0
offset_bottom = 20.0
theme_type_variation = &"FlatButton"
theme_override_colors/font_hover_pressed_color = Color(0.299547, 0.299547, 0.299547, 1)
theme_override_colors/font_hover_color = Color(0.181798, 0.181798, 0.181798, 1)
theme_override_colors/icon_hover_color = Color(1, 1, 1, 0.913725)
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_focus_color = Color(1, 1, 1, 0.819608)
theme_override_colors/icon_normal_color = Color(1, 1, 1, 0.6)
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0.160269, 0.160269, 0.160269, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_constants/icon_max_width = 8
theme_override_fonts/font = ExtResource("1_5nv8m")
theme_override_font_sizes/font_size = 15

View File

@ -0,0 +1,104 @@
class_name InspectorBalloon
extends MarginContainer
signal quitted(is_manually: bool)
@export var prop_title_to_content_wait_time := 3.0
@export var auto_quit_time := 5.0
@onready var character_label = %CharacterLabel as RichTextLabel
@onready var content_label = %ContentLabel as RichTextLabel
enum { DISPLAYING_NONE, DISPLAYING_TITLE, DISPLAYING_CONTENT }
var _display_mutex := Mutex.new()
var _displaying_status := DISPLAYING_NONE
var _pending_content := ""
var _balloon_tween: Tween
func _ready() -> void:
character_label.text = ""
content_label.text = ""
func show_prop_balloon(obtain_str: String, prop_title: String, content: String) -> void:
_display_mutex.lock()
if _balloon_tween and _balloon_tween.is_running():
_balloon_tween.kill()
_balloon_tween = create_tween()
show()
_pending_content = content
obtain_str = "[color=orange]" + obtain_str + "[/color]"
_displaying_status = DISPLAYING_TITLE
character_label.show()
character_label.text = obtain_str
content_label.text = prop_title
if not _pending_content.is_empty():
_balloon_tween.tween_interval(prop_title_to_content_wait_time)
_balloon_tween.tween_callback(_display_content)
else:
_balloon_tween.tween_interval(auto_quit_time)
_balloon_tween.tween_callback(_finished.bind(false))
_display_mutex.unlock()
func _display_content() -> void:
_display_mutex.lock()
if _balloon_tween and _balloon_tween.is_running():
_balloon_tween.kill()
show()
_displaying_status = DISPLAYING_CONTENT
character_label.hide()
content_label.text = _pending_content
_pending_content = ""
_balloon_tween = create_tween()
_balloon_tween.tween_interval(auto_quit_time)
_balloon_tween.tween_callback(_finished.bind(false))
_display_mutex.unlock()
func show_prop_content(content: String) -> void:
_pending_content = content
_display_content()
func _finished(manually: bool) -> void:
_display_mutex.lock()
character_label.text = ""
content_label.text = ""
_displaying_status = DISPLAYING_NONE
hide()
quitted.emit(manually)
_display_mutex.unlock()
func _input(event: InputEvent) -> void:
if _displaying_status == DISPLAYING_NONE:
return
if event.is_action_pressed("interact") or event.is_action_pressed("cancel"):
get_viewport().set_input_as_handled()
_display_mutex.lock()
if _balloon_tween and _balloon_tween.is_running():
_balloon_tween.kill()
if _displaying_status == DISPLAYING_TITLE:
if not _pending_content.is_empty():
_display_content()
else:
# 如果没有文本,直接退出
_finished(true)
elif _displaying_status == DISPLAYING_CONTENT:
_finished(true)
_display_mutex.unlock()
# 不释放 quitted 结束 balloon
func kill_without_signal() -> void:
_display_mutex.lock()
if _balloon_tween and _balloon_tween.is_running():
_balloon_tween.kill()
character_label.text = ""
content_label.text = ""
_displaying_status = DISPLAYING_NONE
hide()
_display_mutex.unlock()

View File

@ -0,0 +1 @@
uid://dhjjskfl8r5nk

View File

@ -0,0 +1,76 @@
[gd_scene load_steps=4 format=3 uid="uid://dufshurokh0ws"]
[ext_resource type="Theme" uid="uid://dlrwa60futc45" path="res://config/balloon_theme.tres" id="1_wqjpu"]
[ext_resource type="Script" uid="uid://dhjjskfl8r5nk" path="res://scene/ux/inspector_balloon.gd" id="2_d4kw8"]
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_kla48"]
[node name="InspectorBalloon" type="MarginContainer"]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -35.5
offset_top = -69.0
offset_right = 35.5
grow_horizontal = 2
grow_vertical = 0
focus_mode = 2
mouse_filter = 2
theme = ExtResource("1_wqjpu")
theme_override_constants/margin_bottom = 38
script = ExtResource("2_d4kw8")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
mouse_filter = 2
[node name="Panel" type="MarginContainer" parent="VBoxContainer"]
clip_children = 2
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
mouse_filter = 2
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = 5
[node name="Container" type="HBoxContainer" parent="VBoxContainer/Panel"]
layout_direction = 1
layout_mode = 2
mouse_filter = 2
alignment = 1
[node name="CharacterLabel" type="RichTextLabel" parent="VBoxContainer/Panel/Container"]
unique_name_in_owner = true
clip_contents = false
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
mouse_filter = 2
theme_override_colors/font_shadow_color = Color(0.305882, 0.305882, 0.305882, 0.388235)
theme_override_constants/shadow_offset_y = 1
theme_override_constants/shadow_offset_x = 1
bbcode_enabled = true
text = "c"
fit_content = true
scroll_active = false
autowrap_mode = 0
[node name="ContentLabel" parent="VBoxContainer/Panel/Container" instance=ExtResource("2_kla48")]
unique_name_in_owner = true
clip_contents = false
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
mouse_filter = 2
theme_override_colors/font_shadow_color = Color(0.306923, 0.306923, 0.306923, 0.388235)
theme_override_constants/shadow_offset_y = 1
theme_override_constants/shadow_offset_x = 1
text = "l"
autowrap_mode = 0
seconds_per_step = 0.005
seconds_per_pause_step = 0.1

Some files were not shown because too many files have changed in this diff Show More