diff --git a/asset/art/gif/c02_盒子猫/c02_盒子猫_frames.tres b/asset/art/gif/c02_盒子猫/c02_盒子猫_frames.tres index 430a49c7..c41b338c 100644 --- a/asset/art/gif/c02_盒子猫/c02_盒子猫_frames.tres +++ b/asset/art/gif/c02_盒子猫/c02_盒子猫_frames.tres @@ -213,33 +213,33 @@ animations = [{ "speed": 30.0 }, { "frames": [{ -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("25_ty3yp") }, { -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("26_x3isd") }, { -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("27_hwoj5") }, { -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("28_n6lou") }, { -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("29_6p0ya") }, { -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("30_uxs1n") }, { -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("31_rdknj") }, { -"duration": 6.0, +"duration": 1.0, "texture": ExtResource("32_c28wc") }], -"loop": false, +"loop": true, "name": &"猪头怪走路", -"speed": 30.0 +"speed": 5.0 }, { "frames": [{ "duration": 6.0, diff --git a/asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png b/asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png new file mode 100644 index 00000000..a6b1177b Binary files /dev/null and b/asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png differ diff --git a/asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png.import b/asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png.import new file mode 100644 index 00000000..7f652855 --- /dev/null +++ b/asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://v6q6ao6fiqm1" +path="res://.godot/imported/e_老鼠画像横板.png-8a76220ba2bd471be83a15a7a523bd66.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png" +dest_files=["res://.godot/imported/e_老鼠画像横板.png-8a76220ba2bd471be83a15a7a523bd66.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png b/asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png new file mode 100644 index 00000000..bf0e4569 Binary files /dev/null and b/asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png differ diff --git a/asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png.import b/asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png.import new file mode 100644 index 00000000..6169e62c --- /dev/null +++ b/asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d1xr7g5huv5or" +path="res://.godot/imported/ux_老鼠画像特写.png-2cde5d57d18ad26389a54b7fa4b7cebc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png" +dest_files=["res://.godot/imported/ux_老鼠画像特写.png-2cde5d57d18ad26389a54b7fa4b7cebc.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张.png b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张.png index 98c5f32b..eeb655cb 100644 Binary files a/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张.png and b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张.png differ diff --git a/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_blood.png b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_blood.png new file mode 100644 index 00000000..c5e8cbf8 Binary files /dev/null and b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_blood.png differ diff --git a/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_blood.png.import b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_blood.png.import new file mode 100644 index 00000000..53bf8f30 --- /dev/null +++ b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_blood.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8sv81cw7mcn4" +path="res://.godot/imported/e_墙上纸张_blood.png-a16cd8e2f7a6f90b4ea7789b6f8f87bb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_blood.png" +dest_files=["res://.godot/imported/e_墙上纸张_blood.png-a16cd8e2f7a6f90b4ea7789b6f8f87bb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_boxcat.png b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_boxcat.png new file mode 100644 index 00000000..f61ca0f4 Binary files /dev/null and b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_boxcat.png differ diff --git a/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_boxcat.png.import b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_boxcat.png.import new file mode 100644 index 00000000..2b9bda84 --- /dev/null +++ b/asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_boxcat.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://efhwoqtn21d8" +path="res://.godot/imported/e_墙上纸张_boxcat.png-5eb6f77c7e1c91b16a3b24d04acd8491.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/scene/c02/s08_瞎子卧室/e_墙上纸张_boxcat.png" +dest_files=["res://.godot/imported/e_墙上纸张_boxcat.png-5eb6f77c7e1c91b16a3b24d04acd8491.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png b/asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png new file mode 100644 index 00000000..d7b471fc Binary files /dev/null and b/asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png differ diff --git a/asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png.import b/asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png.import new file mode 100644 index 00000000..2c4e8137 --- /dev/null +++ b/asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ttocw3erg8jv" +path="res://.godot/imported/bg_一楼楼道(粉笔画).png-38d0deade9dcb0ce3adead29afdf6eb3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png" +dest_files=["res://.godot/imported/bg_一楼楼道(粉笔画).png-38d0deade9dcb0ce3adead29afdf6eb3.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/asset/dialogue/item_description.csv b/asset/dialogue/item_description.csv index 357ad593..c3c5f4b0 100644 --- a/asset/dialogue/item_description.csv +++ b/asset/dialogue/item_description.csv @@ -5,6 +5,7 @@ keys,zh_CN,_character,_notes,_tags,zh_SH,en 3,3,,,,, 4,4,,,,, c02_杂物堆,杂物堵住了,,,,, +prop_新鲜的肉,新鲜的肉,,,[#texture=c02/新鲜的肉.png],, index_新游戏,新游戏,,,,,New Game index_继续游戏,继续游戏,,,,,Resume index_退出游戏,退出游戏,,,,,Exit @@ -28,6 +29,7 @@ ui_use_prop,按 E 使用道具,,,,,Press E to use prop ui_important_item_update,重要物品已更新(按 B 打开背包),,,,, ui_switch_prop,点击图标可切换道具(或按 Z/C),,,,, ui_press_shift,按住 Shift 奔跑,,,,, +ui_boxcat_press_s,按住 S 躲藏,,,,, input_拼凑信件,点击选择信件碎片,方向键移动,按 E 旋转,,,,, ui_获得,获得,,,,, ui_退出,退出,,,,, @@ -61,7 +63,6 @@ prop_锡箔元宝,锡箔元宝,,,[#texture=c02/锡箔元宝.png],, prop_小鞋子1,小鞋子1,,,[#texture=c02/小鞋子.png],, prop_小鞋子2,小鞋子2,,,[#texture=c02/小鞋子.png],, prop_麻将,麻将,,,[#texture=c02/麻将.png],, -prop_新鲜的肉,新鲜的肉,,,[#texture=c02/新鲜的肉.png],, prop_奇怪的肉,奇怪的肉,,,[#texture=c02/奇怪的肉.png],, prop_弹珠,弹珠,,,[#texture=c02/弹珠.png],, prop_木头人偶,木头人偶,,,[#texture=c02/小蝉人偶.png],, @@ -116,9 +117,11 @@ c02_卫生宣传画,几张卫生宣传画,,,,, c02_老鼠洞,一个老鼠洞
在这种楼里挺常见的,,,,, c02_十几年前的报纸,十几年前的报纸,,,,, c02_院子_算命摊位,算命的摊位?,,,,, +c02_院子_要下雨,好像要下雨了?,,,,, c02_保卫科花名册os,芦昌公寓居民登记簿,黄国栋记。,,,,, c02_一楼楼道被挡住,被挡住了,,,,, c02_瞎子卧室_八卦图,「乾三连,坤六断;震仰盂,艮覆碗;离中虚,坎中满;兑上缺,巽下断」
咦,这口诀是谁教我的来着...,,,,, +c02_瞎子卧室_血脚印,这画上的脚印和刚刚看到的一样。,,,,, c02_瞎子卧室_十字架,院长房间里也有一个类似的十字架。,,,,, c02_火灾等待准备,还没准备好点火呢,,,,, 小猫玩具发光,嗯?玩具在发光,,,,, diff --git a/asset/dialogue/item_description.dialogue b/asset/dialogue/item_description.dialogue index 3240be63..615e5c0a 100644 --- a/asset/dialogue/item_description.dialogue +++ b/asset/dialogue/item_description.dialogue @@ -26,6 +26,7 @@ 重要物品已更新(按 B 打开背包) [ID:ui_important_item_update] 点击图标可切换道具(或按 Z/C) [ID:ui_switch_prop] 按住 Shift 奔跑 [ID:ui_press_shift] +按住 S 躲藏 [ID:ui_boxcat_press_s] 点击选择信件碎片,方向键移动,按 E 旋转 [ID:input_拼凑信件] 获得 [ID:ui_获得] @@ -159,17 +160,18 @@ 十几年前的报纸 [ID:c02_十几年前的报纸] # c02 院子 算命的摊位? [ID:c02_院子_算命摊位] +好像要下雨了? [ID:c02_院子_要下雨] # c02 保卫科 芦昌公寓居民登记簿,黄国栋记。 [ID:c02_保卫科花名册os] # c02 内侧楼道 被挡住了 [ID:c02_一楼楼道被挡住] # 瞎子卧室 「乾三连,坤六断;震仰盂,艮覆碗;离中虚,坎中满;兑上缺,巽下断」
咦,这口诀是谁教我的来着... [ID:c02_瞎子卧室_八卦图] +这画上的脚印和刚刚看到的一样。 [ID:c02_瞎子卧室_血脚印] 院长房间里也有一个类似的十字架。[ID:c02_瞎子卧室_十字架] # c02 火灾 还没准备好点火呢 [ID:c02_火灾等待准备] 嗯?玩具在发光 [ID:小猫玩具发光] 没时间浪费了!想想办法救出小蝉... [ID:c02_点火前阻止右移] -# c02 => END diff --git a/config/animation/entity_sprite_frames.tres b/config/animation/entity_sprite_frames.tres index 9c89fd2f..85ca31c8 100644 --- a/config/animation/entity_sprite_frames.tres +++ b/config/animation/entity_sprite_frames.tres @@ -1,4 +1,4 @@ -[gd_resource type="SpriteFrames" load_steps=810 format=3 uid="uid://b7fhheih1hbvf"] +[gd_resource type="SpriteFrames" load_steps=806 format=3 uid="uid://b7fhheih1hbvf"] [ext_resource type="Texture2D" uid="uid://bpqrd6vo3j17m" path="res://asset/art/animation/c00_吕萍_记笔记_right/吕萍-拿本子记录1.png" id="1_6sdvl"] [ext_resource type="Texture2D" uid="uid://dvq64espa37lx" path="res://asset/art/animation/c00_吕萍_idle_left/zhhx1.png" id="1_ekv0l"] @@ -755,9 +755,7 @@ [ext_resource type="Texture2D" uid="uid://iqgnednnykdr" path="res://asset/art/animation/c02_吕萍_钻出/0.png" id="605_v8kdt"] [ext_resource type="Texture2D" uid="uid://cgnn3ohqr52uf" path="res://asset/art/gif/c02_盒子猫/盒子猫呼吸/0.png" id="720_u1ns1"] [ext_resource type="Texture2D" uid="uid://bn1v0rbsayjuf" path="res://asset/art/gif/c02_盒子猫/盒子猫呼吸/1.png" id="721_i6nr0"] -[ext_resource type="Texture2D" uid="uid://cgft6wepygo84" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_l/0.png" id="722_143ox"] [ext_resource type="Texture2D" uid="uid://55rmstkju630" path="res://asset/art/gif/c02_盒子猫/盒子猫走路/0.png" id="722_kk2bf"] -[ext_resource type="Texture2D" uid="uid://bdbp0kc0v4gbw" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_l/1.png" id="723_2vft2"] [ext_resource type="Texture2D" uid="uid://b2dt0032711li" path="res://asset/art/gif/c02_盒子猫/盒子猫走路/1.png" id="723_7otbe"] [ext_resource type="Texture2D" uid="uid://b7ewg60u7s2d" path="res://asset/art/gif/c02_盒子猫/盒子猫走路/2.png" id="724_pq372"] [ext_resource type="Texture2D" uid="uid://ca00x7jqj8fjy" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_l/2.png" id="724_pwc7e"] @@ -773,8 +771,6 @@ [ext_resource type="Texture2D" uid="uid://f8nq6xbuwiw0" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_l/7.png" id="729_h6bhr"] [ext_resource type="Texture2D" uid="uid://csj5jede3wryh" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_l/8.png" id="730_dlxoy"] [ext_resource type="Texture2D" uid="uid://cand6orv3g28w" path="res://asset/art/gif/c02_盒子猫/盒子猫停止躲藏/盒子猫出盒子2.png" id="730_karh2"] -[ext_resource type="Texture2D" uid="uid://b3piexlfdu7cc" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_r/0.png" id="731_oibw0"] -[ext_resource type="Texture2D" uid="uid://bedsecuscfsu7" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_r/1.png" id="732_cmym6"] [ext_resource type="Texture2D" uid="uid://1mtlgg1y5530" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_r/2.png" id="733_4rlhx"] [ext_resource type="Texture2D" uid="uid://dqmjk8do1yyao" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_r/3.png" id="734_chy64"] [ext_resource type="Texture2D" uid="uid://dnfn5wd7wxem7" path="res://asset/art/gif/c02_盒子猫/盒子猫敲门_r/4.png" id="735_mliv3"] @@ -3486,12 +3482,6 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": ExtResource("722_143ox") -}, { -"duration": 1.0, -"texture": ExtResource("723_2vft2") -}, { -"duration": 1.0, "texture": ExtResource("724_pwc7e") }, { "duration": 1.0, @@ -3518,12 +3508,6 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": ExtResource("731_oibw0") -}, { -"duration": 1.0, -"texture": ExtResource("732_cmym6") -}, { -"duration": 1.0, "texture": ExtResource("733_4rlhx") }, { "duration": 1.0, diff --git a/scene/ground/ground_loader.gd b/scene/ground/ground_loader.gd index 5d3e2aa3..82df854f 100644 --- a/scene/ground/ground_loader.gd +++ b/scene/ground/ground_loader.gd @@ -48,6 +48,7 @@ static var GROUND_SCENE_PATH_DICT = { "c02_s15": "res://scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn", "c02_s16": "res://scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn", "c02_s17": "res://scene/ground/scene/c02/s17_盒子猫三楼.tscn", + "c02_s18": "res://scene/ground/scene/c02/s18_盒子猫一楼.tscn", } func _ready() -> void: diff --git a/scene/ground/scene/c02/s03_animation.gd b/scene/ground/scene/c02/s03_animation.gd index b2dd3c7b..831a997d 100644 --- a/scene/ground/scene/c02/s03_animation.gd +++ b/scene/ground/scene/c02/s03_animation.gd @@ -128,8 +128,28 @@ func _on_gate_interacted() -> void: func shocking_lighting() -> void: + var root = $"../DeployLayer/闷雷_纸人闪现" as Node2D + var normal_ppl = root.get_node("排队常人") as Sprite2D + var paper_ppl = root.get_node("排队纸人") as Sprite2D + var light = root.get_node("PointLight2D") as PointLight2D + root.visible = true + normal_ppl.modulate.a = 0 + paper_ppl.modulate.a = 0 + light.energy = 0 + var sfx = $"Sfx闷雷" + var tween = create_tween() + tween.tween_property(light, "energy", 7.0, 0.1) + tween.tween_property(light, "energy", 4.0, 0.02) + tween.parallel().tween_property(normal_ppl, "modulate:a", 1.0, 0.03) + tween.tween_property(light, "energy", 8.0, 0.01) + tween.tween_property(light, "energy", 3.0, 0.02) + tween.tween_property(light, "energy", 7.0, 0.01) + tween.parallel().tween_property(paper_ppl, "modulate:a", 1.0, 0.03) + tween.tween_property(light, "energy", 0.0, 0.1) + tween.tween_callback(root.hide) # 纸人闪现 惊悚闪电 闷雷声缓缓而来 - $"Sfx闷雷".play() + tween.tween_interval(2.0) + tween.tween_callback(sfx.play) # TODO diff --git a/scene/ground/scene/c02/s03_院子.tscn b/scene/ground/scene/c02/s03_院子.tscn index c6b00a3e..930c9403 100644 --- a/scene/ground/scene/c02/s03_院子.tscn +++ b/scene/ground/scene/c02/s03_院子.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=74 format=3 uid="uid://djc2uaefhmu7"] +[gd_scene load_steps=76 format=3 uid="uid://djc2uaefhmu7"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_0dylx"] [ext_resource type="Script" uid="uid://dsp5plrdkrsd7" path="res://scene/ground/scene/c02/s03_animation.gd" id="2_dt5aj"] @@ -246,6 +246,15 @@ fill = 1 fill_from = Vector2(0.5, 0.465812) fill_to = Vector2(1, 1) +[sub_resource type="Gradient" id="Gradient_vddfx"] +offsets = PackedFloat32Array(0.00475436, 1) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_3nako"] +gradient = SubResource("Gradient_vddfx") +width = 1000 +height = 300 + [sub_resource type="RectangleShape2D" id="RectangleShape2D_er6ob"] resource_local_to_scene = true size = Vector2(40, 70) @@ -372,11 +381,6 @@ sprite_frames = ExtResource("4_gd6xp") animation = &"小婵晃脚掉鞋" autoplay = "一楼二楼外侧楼道拼接-晃脚动画" -[node name="楼梯" type="Sprite2D" parent="Ground/BGSprite2D" index="1"] -z_index = 10 -position = Vector2(1388, 1) -texture = ExtResource("10_ud2jg") - [node name="portal_left" parent="Ground/DeployLayer" index="0"] position = Vector2(25, 11) target_scene = "c02_s02" @@ -502,29 +506,42 @@ z_index = 15 position = Vector2(1964, -209) [node name="闷雷_纸人闪现" type="Node2D" parent="Ground/DeployLayer" index="8"] +visible = false [node name="Ambush闷雷纸人" parent="Ground/DeployLayer/闷雷_纸人闪现" instance=ExtResource("25_iyaiw")] position = Vector2(1353, 33) hook_method = "shocking_lighting" [node name="排队常人" type="Sprite2D" parent="Ground/DeployLayer/闷雷_纸人闪现"] -z_index = 20 +light_mask = 5 +z_index = 30 position = Vector2(1227.5, -119) texture = ExtResource("18_crgo6") centered = false [node name="排队纸人" type="Sprite2D" parent="Ground/DeployLayer/闷雷_纸人闪现"] -z_index = 20 +light_mask = 5 +z_index = 30 position = Vector2(1227.5, -119) texture = ExtResource("19_vddfx") centered = false -[node name="火灾背景" type="Sprite2D" parent="Ground/DeployLayer" index="9"] +[node name="PointLight2D" type="PointLight2D" parent="Ground/DeployLayer/闷雷_纸人闪现"] +position = Vector2(1411, 12) +range_layer_max = 2 +range_item_cull_mask = 4 +texture = SubResource("GradientTexture2D_3nako") + +[node name="Ambush要下雨了" parent="Ground/DeployLayer" index="9" instance=ExtResource("25_iyaiw")] +position = Vector2(1611, 46) +hook_os_key = "c02_院子_要下雨" + +[node name="火灾背景" type="Sprite2D" parent="Ground/DeployLayer" index="10"] modulate = Color(1, 1, 1, 0) position = Vector2(1189, 0) texture = ExtResource("6_d7h4s") -[node name="Pickable小鞋子" parent="Ground/DeployLayer" index="10" instance=ExtResource("7_em2ma")] +[node name="Pickable小鞋子" parent="Ground/DeployLayer" index="11" instance=ExtResource("7_em2ma")] position = Vector2(809, 75) sign_mark_offset = Vector2(0, -16.88) enabled = false @@ -535,8 +552,9 @@ position = Vector2(0, -7) scale = Vector2(0.15, 0.15) texture = ExtResource("8_plfv5") -[node name="Interactable铁门" parent="Ground/DeployLayer" index="11" instance=ExtResource("8_xt8j0")] -position = Vector2(1212, 28) +[node name="Interactable铁门" parent="Ground/DeployLayer" index="12" instance=ExtResource("8_xt8j0")] +light_mask = 5 +position = Vector2(1222, 28) texture = ExtResource("7_gd6xp") interacted_texture = ExtResource("9_liq0c") prop_key = "prop_老虎钳" @@ -552,7 +570,7 @@ collision_mask = 0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Ground/DeployLayer/Interactable铁门/Wall"] shape = SubResource("RectangleShape2D_mdix7") -[node name="Note算命摊位" parent="Ground/DeployLayer" index="12" instance=ExtResource("6_t48d1")] +[node name="Note算命摊位" parent="Ground/DeployLayer" index="13" instance=ExtResource("6_t48d1")] position = Vector2(725, 45) note_key = "c02_院子_算命摊位" @@ -560,13 +578,13 @@ note_key = "c02_院子_算命摊位" position = Vector2(0, 18) texture = ExtResource("6_1tart") -[node name="煤油灯" parent="Ground/DeployLayer" index="13" instance=ExtResource("10_jme4f")] +[node name="煤油灯" parent="Ground/DeployLayer" index="14" instance=ExtResource("10_jme4f")] position = Vector2(290, 1) gaslight_energy = 1.5 gaslight_ground_energy = 0.7 mute_when_interacted = false -[node name="煤油灯2" parent="Ground/DeployLayer" index="14" instance=ExtResource("10_jme4f")] +[node name="煤油灯2" parent="Ground/DeployLayer" index="15" instance=ExtResource("10_jme4f")] position = Vector2(610, 1) gaslight_texture = ExtResource("11_g0qhj") ground_light_texture = ExtResource("12_ni5ro") @@ -574,7 +592,7 @@ gaslight_energy = 1.5 gaslight_ground_energy = 0.7 mute_when_interacted = false -[node name="煤油灯3" parent="Ground/DeployLayer" index="15" instance=ExtResource("10_jme4f")] +[node name="煤油灯3" parent="Ground/DeployLayer" index="16" instance=ExtResource("10_jme4f")] position = Vector2(857, 1) gaslight_texture = ExtResource("13_hw832") ground_light_texture = ExtResource("14_7pq5y") @@ -582,44 +600,45 @@ gaslight_energy = 1.5 gaslight_ground_energy = 0.7 mute_when_interacted = false -[node name="井" type="Sprite2D" parent="Ground/DeployLayer" index="16"] +[node name="井" type="Sprite2D" parent="Ground/DeployLayer" index="17"] self_modulate = Color(0.739288, 0.739288, 0.739288, 1) light_mask = 5 z_index = 10 position = Vector2(2062, 60) texture = ExtResource("21_4n8vm") -[node name="药车" type="Sprite2D" parent="Ground/DeployLayer" index="17"] +[node name="药车" type="Sprite2D" parent="Ground/DeployLayer" index="18"] +light_mask = 5 z_index = 10 position = Vector2(1025, 27) texture = ExtResource("22_3y5s5") -[node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="18" instance=ExtResource("23_81juy")] +[node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="19" instance=ExtResource("23_81juy")] position = Vector2(466, 3) packed_scene = ExtResource("24_0o4rt") -[node name="Closeup井" parent="Ground/DeployLayer" index="19" instance=ExtResource("23_81juy")] +[node name="Closeup井" parent="Ground/DeployLayer" index="20" instance=ExtResource("23_81juy")] z_index = 6 position = Vector2(2063, 50) packed_scene = ExtResource("26_yy4fp") -[node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="20" instance=ExtResource("25_iyaiw")] +[node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="21" instance=ExtResource("25_iyaiw")] position = Vector2(1319, 40) hook_method = "shocking_lighting" -[node name="Ambush偷听对话" parent="Ground/DeployLayer" index="21" instance=ExtResource("25_iyaiw")] -position = Vector2(1791, 8) +[node name="Ambush偷听对话" parent="Ground/DeployLayer" index="22" instance=ExtResource("25_iyaiw")] +position = Vector2(1836, 7) trigger_mode = "interact" one_shot = false hook_method = "eavesdrop" -[node name="李氏赖子房间人影" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="22"] +[node name="李氏赖子房间人影" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="23"] position = Vector2(1835, -16) sprite_frames = SubResource("SpriteFrames_0o4rt") autoplay = "default" frame_progress = 0.643855 -[node name="Npc井边疯子" parent="Ground/DeployLayer" index="23" instance=ExtResource("35_plfv5")] +[node name="Npc井边疯子" parent="Ground/DeployLayer" index="24" instance=ExtResource("35_plfv5")] z_index = 10 position = Vector2(2037, 67) sprite_frames = SubResource("SpriteFrames_kyfht") @@ -645,7 +664,7 @@ position = Vector2(-11, -3) shape = SubResource("RectangleShape2D_bbhbr") disabled = true -[node name="霸凌" type="Node2D" parent="Ground/DeployLayer" index="24"] +[node name="霸凌" type="Node2D" parent="Ground/DeployLayer" index="25"] visible = false position = Vector2(2154, 60) @@ -710,7 +729,7 @@ collision_mask = 0 shape = SubResource("RectangleShape2D_d7h4s") disabled = true -[node name="火灾" type="Node2D" parent="Ground/DeployLayer" index="25"] +[node name="火灾" type="Node2D" parent="Ground/DeployLayer" index="26"] visible = false [node name="右窗" type="AnimatedSprite2D" parent="Ground/DeployLayer/火灾"] @@ -881,7 +900,7 @@ offset_bottom = -23.0 [node name="CollisionShape2D" parent="Ground/DeployLayer/火灾/Ambush等待的小蝉/Area2D" index="0"] shape = SubResource("RectangleShape2D_em2ma") -[node name="Interactable柜子" parent="Ground/DeployLayer" index="26" instance=ExtResource("8_xt8j0")] +[node name="Interactable柜子" parent="Ground/DeployLayer" index="27" instance=ExtResource("8_xt8j0")] visible = false position = Vector2(1772, 48) texture = ExtResource("32_cpifc") @@ -897,7 +916,7 @@ animation = &"箱子着火" autoplay = "箱子着火" frame_progress = 0.453645 -[node name="最终跑路" type="RigidBody2D" parent="Ground/DeployLayer" index="27"] +[node name="最终跑路" type="RigidBody2D" parent="Ground/DeployLayer" index="28"] visible = false position = Vector2(2150, 30) collision_layer = 4 @@ -922,11 +941,17 @@ range_item_cull_mask = 4 texture = SubResource("GradientTexture2D_plfv5") [node name="MainPlayer" parent="Ground" index="4"] -position = Vector2(407, 93) +position = Vector2(1384, 101) [node name="BGParallaxLayer" parent="Ground/ParallaxForeground" index="0"] use_parent_material = true +[node name="楼梯" type="Sprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="0"] +light_mask = 5 +z_index = 20 +position = Vector2(1393.5, 0) +texture = ExtResource("10_ud2jg") + [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(-88, -7) scale = Vector2(1.08, 1.08) diff --git a/scene/ground/scene/c02/s04_保卫科.tscn b/scene/ground/scene/c02/s04_保卫科.tscn index b3c58727..d84d503a 100644 --- a/scene/ground/scene/c02/s04_保卫科.tscn +++ b/scene/ground/scene/c02/s04_保卫科.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=3 uid="uid://bivc5cdap370p"] +[gd_scene load_steps=20 format=3 uid="uid://bivc5cdap370p"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_2jej0"] [ext_resource type="Script" uid="uid://dmhh4g47bdxxy" path="res://scene/ground/scene/c02/s04_animation.gd" id="2_jyere"] @@ -17,6 +17,7 @@ [ext_resource type="Texture2D" uid="uid://ch6uf4qi1i0h2" path="res://asset/art/scene/c02/s03_公寓一楼院子/光晕/光晕3.png" id="9_a43aq"] [ext_resource type="PackedScene" uid="uid://xovlfee503a4" path="res://scene/ground/script/c02/小手讨东西.tscn" id="10_a43aq"] [ext_resource type="Texture2D" uid="uid://dtmd13ktss5hk" path="res://asset/art/scene/c02/s03_公寓一楼院子/地面物品反光/地反光5.png" id="10_svuj3"] +[ext_resource type="Texture2D" uid="uid://v6q6ao6fiqm1" path="res://asset/art/scene/c02/s04_保卫科/e_老鼠画像横板.png" id="11_ffvrp"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_gk1h4"] resource_local_to_scene = true @@ -82,7 +83,8 @@ position = Vector2(189, 15) packed_scene = ExtResource("7_fvlg0") [node name="Closeup老鼠精" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_66gue")] -position = Vector2(208, -32) +position = Vector2(207.5, -40.5) +texture = ExtResource("11_ffvrp") packed_scene = ExtResource("8_cm3g6") [node name="Closeup花名册" parent="Ground/DeployLayer" index="5" instance=ExtResource("6_66gue")] diff --git a/scene/ground/scene/c02/s08_animation.gd b/scene/ground/scene/c02/s08_animation.gd index 4196baee..9722b64f 100644 --- a/scene/ground/scene/c02/s08_animation.gd +++ b/scene/ground/scene/c02/s08_animation.gd @@ -15,11 +15,17 @@ func _ready() -> void: var color_mask: ColorRect var ambush_eavesdrop: Ambush2D +var ambush_lookback: Ambush2D +var gaslight: Gaslight +var boxcat_portal: Portal2D func _on_ground_ready() -> void: color_mask = $"../BGSprite2D/ColorMask" ambush_eavesdrop = $"../DeployLayer/Ambush偷听" + ambush_lookback = $"../DeployLayer/Ambush回看洞口" + gaslight = $"../DeployLayer/灯座Sprite2D/煤油灯" + boxcat_portal = $"../DeployLayer/portal_1" # 0默认 1拿了麻将 2偷听结束 3已爬出 if data.hole_interacted_times >= 3: setup_rect_after_entered() @@ -27,9 +33,25 @@ func _on_ground_ready() -> void: color_mask.color.a = 1.0 # # 如果没有出隧道,则设置镜头右侧 limit + 500 # SceneManager.get_camera_marker().limit_right += 500 - - if ArchiveManager.get_global_value("c02_the_blind_room_unlocked"): + var looked_back = ambush_lookback.played + var boxcat_played = ArchiveManager.get_global_value("c02_the_blind_room_unlocked") + if gaslight.interacted_times > 0: + ambush_lookback.enabled = true + else: + gaslight.interacted.connect(func(): ambush_lookback.enabled = true) + if looked_back: + gaslight.enabled = false + gaslight.visible = false + if not boxcat_played: + boxcat_portal.enabled = true + boxcat_portal.get_node("PointLight2D2").enabled = true + boxcat_portal.get_node("Sprite2D").texture = preload("uid://efhwoqtn21d8") # e_墙上纸张_boxcat + $"../DeployLayer/Closeup画".enabled = false + if boxcat_played: $"../DeployLayer/portal_left".status = "opened" + # 玩过小猫游戏,画框内容更新 禁止再进入 + boxcat_portal.get_node("Sprite2D").texture = preload("uid://b8sv81cw7mcn4") # e_墙上纸张_blood + $"../DeployLayer/Note画上脚印".enabled = true var interacting = false: @@ -86,9 +108,8 @@ var room_camera_r_limit = 550 # 钻出隧道,进入房间 func enter_room() -> void: - var look_back_ambush = $"../DeployLayer/Ambush回看洞口" # 防止过程中 look back - look_back_ambush.enabled = false + ambush_lookback.enabled = false var player = SceneManager.get_player() as MainPlayer var player_x = 513.0 SceneManager.freeze_player(0) @@ -112,7 +133,6 @@ func enter_room() -> void: player.hide_sprite = false SceneManager.release_player() interacting = false - look_back_ambush.enabled = true func setup_rect_after_entered() -> void: @@ -153,6 +173,18 @@ func _on_shocked(): $"Sfx癞子对视惊吓".play() SceneManager.freeze_player(0, 11, true) SceneManager.get_player().animation_finished.connect(_on_shocked_finished, CONNECT_ONE_SHOT) + await create_tween().tween_interval(1.1).finished + # 熄火 + gaslight.enabled = false + gaslight.visible = false + # 启用 boxcat_portal + boxcat_portal.enabled = true + var light = boxcat_portal.get_node("PointLight2D2") as PointLight2D + boxcat_portal.get_node("Sprite2D").texture = preload("uid://efhwoqtn21d8") # e_墙上纸张_boxcat + light.enabled = true + light.energy = 0 + create_tween().tween_property(light, "energy", 0.6, 1.5) + $"../DeployLayer/Closeup画".enabled = false func _on_shocked_finished(): diff --git a/scene/ground/scene/c02/s08_瞎子卧室.tscn b/scene/ground/scene/c02/s08_瞎子卧室.tscn index 0b27f570..51d10f9b 100644 --- a/scene/ground/scene/c02/s08_瞎子卧室.tscn +++ b/scene/ground/scene/c02/s08_瞎子卧室.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=28 format=3 uid="uid://ce2vyyg2reg52"] +[gd_scene load_steps=34 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_animation.gd" id="2_m4uw8"] @@ -10,10 +10,15 @@ [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"] [ext_resource type="SpriteFrames" uid="uid://3nas025c2c5u" path="res://asset/art/gif/c02_杂项/c02_杂项_frames.tres" id="7_j6ltr"] +[ext_resource type="Texture2D" uid="uid://dtyg0nugb2tnf" path="res://asset/art/ui/action_mark/UI探索.png" id="8_dkqw0"] +[ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="10_a48k2"] [ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="10_f6mma"] [ext_resource type="Texture2D" uid="uid://brdo2cpu6vcqd" path="res://asset/art/scene/c02/杂物/煤油灯 开灯.png" id="10_vjjde"] +[ext_resource type="PackedScene" uid="uid://cxw5rovg5mu1a" path="res://scene/ground/script/c02/s00_煤油灯.tscn" id="11_7w12o"] [ext_resource type="Texture2D" uid="uid://b7gyapghy3tsy" path="res://asset/art/neutral_point_light.png" id="11_kwj7c"] +[ext_resource type="PackedScene" uid="uid://dd8dfoik0ig3y" path="res://scene/ground/script/c02/s08_画特写.tscn" id="11_mc126"] [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="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"] @@ -64,6 +69,10 @@ _data = { &"RESET": SubResource("Animation_f6mma") } +[sub_resource type="RectangleShape2D" id="RectangleShape2D_a48k2"] +resource_local_to_scene = true +size = Vector2(5, 70) + [sub_resource type="RectangleShape2D" id="RectangleShape2D_kwj7c"] resource_local_to_scene = true size = Vector2(10, 70) @@ -153,20 +162,66 @@ position = Vector2(676, 63) matched_sign_texture = null [node name="portal_1" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_1ws4i")] -position = Vector2(193, 34) +position = Vector2(214, 31) debug_note = "墙画:盒子猫" +enabled = false portal_name = "1" target_scene = "c02_s12" target_portal = "left" status = "opened" +default_sign_texture = ExtResource("8_dkqw0") +opened_sign_texture = ExtResource("8_dkqw0") matched_sign_texture = null [node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/portal_1"] show_behind_parent = true +light_mask = 33 position = Vector2(0, -47) texture = ExtResource("5_f6mma") -[node name="瞎子小蝉对话" type="Node2D" parent="Ground/DeployLayer" index="3"] +[node name="PointLight2D2" type="PointLight2D" parent="Ground/DeployLayer/portal_1"] +light_mask = 33 +position = Vector2(0, -47) +enabled = false +energy = 0.6 +range_item_cull_mask = 32 +texture = ExtResource("11_kwj7c") +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") + +[node name="Note画上脚印" parent="Ground/DeployLayer" index="4" instance=ExtResource("14_1ws4i")] +position = Vector2(214, -19) +enabled = false +title_filter = "c02" +note_key = "c02_瞎子卧室_血脚印" + +[node name="灯座Sprite2D" type="Sprite2D" parent="Ground/DeployLayer" index="5"] +position = Vector2(169, 18) +texture = ExtResource("11_u4psw") + +[node name="煤油灯" parent="Ground/DeployLayer/灯座Sprite2D" instance=ExtResource("11_7w12o")] +position = Vector2(0, 15) +animation_low_mode = true +hide_texture = true +gaslight_energy = 2.0 + +[node name="CollisionShape2D" parent="Ground/DeployLayer/灯座Sprite2D/煤油灯/Area2D" index="0"] +shape = SubResource("RectangleShape2D_a48k2") + +[node name="PointLight2D" parent="Ground/DeployLayer/灯座Sprite2D/煤油灯" index="3"] +energy = 2.0 + +[node name="灯座" parent="Ground/DeployLayer/灯座Sprite2D/煤油灯" index="6"] +visible = false + +[node name="Sign" parent="Ground/DeployLayer/灯座Sprite2D/煤油灯" index="7"] +offset_top = -18.0 +offset_bottom = -18.0 + +[node name="瞎子小蝉对话" type="Node2D" parent="Ground/DeployLayer" index="6"] visible = false [node name="瞎子谈话" type="AnimatedSprite2D" parent="Ground/DeployLayer/瞎子小蝉对话"] @@ -193,7 +248,7 @@ energy = 1.5 texture = ExtResource("11_kwj7c") texture_scale = 1.5 -[node name="Ambush偷听" parent="Ground/DeployLayer" index="4" instance=ExtResource("10_f6mma")] +[node name="Ambush偷听" parent="Ground/DeployLayer" index="7" instance=ExtResource("10_f6mma")] position = Vector2(571, 28) trigger_mode = "interact" one_shot = false @@ -208,7 +263,7 @@ offset_bottom = 5.0 [node name="CollisionShape2D" parent="Ground/DeployLayer/Ambush偷听/Area2D" index="0"] shape = SubResource("RectangleShape2D_kwj7c") -[node name="吕萍钻出" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="5"] +[node name="吕萍钻出" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="8"] visible = false position = Vector2(534, 0) sprite_frames = ExtResource("13_t3h08") @@ -216,33 +271,44 @@ animation = &"c02_吕萍_钻出" frame = 6 frame_progress = 1.0 -[node name="癞子偷窥" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="6"] +[node name="癞子偷窥" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="9"] visible = false position = Vector2(569, 56) sprite_frames = ExtResource("13_t3h08") animation = &"c02_王癞子_蹲着呼吸" autoplay = "c02_王癞子_蹲着呼吸" -[node name="Ambush回看洞口" parent="Ground/DeployLayer" index="7" instance=ExtResource("10_f6mma")] +[node name="Ambush回看洞口" parent="Ground/DeployLayer" index="10" instance=ExtResource("10_f6mma")] position = Vector2(522, 31) +enabled = false trigger_mode = "interact" hook_method = "look_back_hole" -[node name="Note十字架" parent="Ground/DeployLayer" index="8" instance=ExtResource("14_1ws4i")] -position = Vector2(322, -10) -texture = ExtResource("11_t3h08") +[node name="Note十字架" parent="Ground/DeployLayer" index="11" instance=ExtResource("14_1ws4i")] +position = Vector2(329, -3) sign_mark_offset = Vector2(0, -13.89) title_filter = "c02" note_key = "c02_瞎子卧室_十字架" -[node name="Note八卦图" parent="Ground/DeployLayer" index="9" instance=ExtResource("14_1ws4i")] +[node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/Note十字架"] +show_behind_parent = true +position = Vector2(0, -3) +scale = Vector2(0.5, 0.5) +texture = ExtResource("11_t3h08") + +[node name="Note八卦图" parent="Ground/DeployLayer" index="12" instance=ExtResource("14_1ws4i")] position = Vector2(144, -14) -texture = ExtResource("12_1ws4i") sign_mark_offset = Vector2(0, -10.86) title_filter = "c02" note_key = "c02_瞎子卧室_八卦图" -[node name="Pickable粘鼠板" parent="Ground/DeployLayer" index="10" instance=ExtResource("17_5fx68")] +[node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/Note八卦图"] +show_behind_parent = true +position = Vector2(0, -2) +scale = Vector2(0.5, 0.5) +texture = ExtResource("12_1ws4i") + +[node name="Pickable粘鼠板" parent="Ground/DeployLayer" index="13" instance=ExtResource("17_5fx68")] position = Vector2(105, 70) texture = ExtResource("18_dkqw0") sign_mark_offset = Vector2(0, -9.34) @@ -292,4 +358,5 @@ energy = 0.9 blend_mode = 1 [editable path="Ground"] +[editable path="Ground/DeployLayer/灯座Sprite2D/煤油灯"] [editable path="Ground/DeployLayer/Ambush偷听"] diff --git a/scene/ground/scene/c02/s12_animation.gd b/scene/ground/scene/c02/s12_animation.gd index b79fc201..56da3f78 100644 --- a/scene/ground/scene/c02/s12_animation.gd +++ b/scene/ground/scene/c02/s12_animation.gd @@ -18,19 +18,24 @@ func _on_ground_ready() -> void: func _intro(): - SceneManager.freeze_player(0) + SceneManager.lock_player() # var player = SceneManager.get_player() as MainPlayer var player = %MainPlayer as MainPlayer player.hide_sprite = true player.position.x = 231.0 player.set_facing_direction(Vector2.RIGHT) - var duration = $"../盒子猫CanvasLayer".show_cat_duration - await get_tree().create_timer(duration).timeout var anim = $"../DeployLayer/小猫初始动画" as AnimatedSprite2D - anim.play() - var camera = SceneManager.get_camera_marker() - create_tween().tween_property(camera, "force_offset", Vector2.ZERO, 1.0) - await anim.animation_finished + if not ArchiveManager.get_global_value("c02_boxcat_skip_intro"): + var layer = $"../盒子猫CanvasLayer" + layer.disable_crawl = true + var duration = layer.show_cat_duration + await get_tree().create_timer(duration).timeout + anim.play() + var camera = SceneManager.get_camera_marker() + create_tween().tween_property(camera, "force_offset", Vector2.ZERO, 1.0) + await anim.animation_finished + layer.disable_crawl = false anim.visible = false player.hide_sprite = false - SceneManager.release_player() + SceneManager.unlock_player() + SceneManager.pop_center_notification(tr("ui_boxcat_press_s")) diff --git a/scene/ground/scene/c02/s12_盒子猫.tscn b/scene/ground/scene/c02/s12_盒子猫.tscn index d8365772..6a91b016 100644 --- a/scene/ground/scene/c02/s12_盒子猫.tscn +++ b/scene/ground/scene/c02/s12_盒子猫.tscn @@ -10,6 +10,7 @@ [node name="Ground" parent="." instance=ExtResource("1_ngo77")] scene_name = "c02_s12" +display_hud = false player_y = 87 footstep_type = "盒子猫" @@ -19,7 +20,7 @@ oneshot_animation = "" [node name="BGSprite2D" parent="Ground" index="1"] texture = ExtResource("3_oskpk") -offset = Vector2(0, -102) +offset = Vector2(0, -103.7) [node name="portal_left" parent="Ground/DeployLayer" index="0"] position = Vector2(152, 56) diff --git a/scene/ground/scene/c02/s13_animation.gd b/scene/ground/scene/c02/s13_animation.gd index f2e981d8..940ad25f 100644 --- a/scene/ground/scene/c02/s13_animation.gd +++ b/scene/ground/scene/c02/s13_animation.gd @@ -17,9 +17,40 @@ func _on_ground_ready() -> void: pass -func final_show(): +func knock_light_door(): + var knock_stream = preload("uid://7of24bqow07e") + var player = SceneManager.get_player() + # 一直循环下去 + for _i in range(100): + SceneManager.freeze_player(0, 6) + await get_tree().create_timer(0.6).timeout + # 被抓时打断 + if not player.visible or player.hide_sprite: + _outtro_show() + break + AudioManager.play_sfx(knock_stream) + await get_tree().create_timer(0.2).timeout + # 被抓时打断 + if not player.visible or player.hide_sprite: + _outtro_show() + break + AudioManager.play_sfx(knock_stream) + await get_tree().create_timer(0.2).timeout + # 被抓时打断 + if not player.visible or player.hide_sprite: + _outtro_show() + break + + +# 收尾演出 +func _outtro_show(): + $"../DeployLayer/Ambush终点光芒互动".enabled = false + # 禁止猪头怪动画播放结束后重开游戏 + $"../DeployLayer/追猫猪头怪_传送".allow_restart_game = false + $"Sfx结尾演出".play() + await get_tree().create_timer(8.0).timeout + $"../盒子猫CanvasLayer".show_footprint() # 盒子猫逃脱成功/被抓走,游戏结束,解锁瞎子卧室门 - $"Sfx开锁声".play() + await get_tree().create_timer(10.0).timeout ArchiveManager.set_global_entry("c02_the_blind_room_unlocked", true) - await get_tree().create_timer(1.0).timeout SceneManager.get_ground_loader().transition_to_scene("c02_s08", "1") diff --git a/scene/ground/scene/c02/s13_盒子猫二楼.tscn b/scene/ground/scene/c02/s13_盒子猫二楼.tscn index 75d87065..b86bd8ad 100644 --- a/scene/ground/scene/c02/s13_盒子猫二楼.tscn +++ b/scene/ground/scene/c02/s13_盒子猫二楼.tscn @@ -1,14 +1,12 @@ -[gd_scene load_steps=13 format=3 uid="uid://bvjutch6jex0v"] +[gd_scene load_steps=11 format=3 uid="uid://bvjutch6jex0v"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_71lma"] [ext_resource type="Script" uid="uid://28ujp27cbdh2" path="res://scene/ground/scene/c02/s13_animation.gd" id="2_w5nqu"] [ext_resource type="AudioStream" uid="uid://ccng5y2fip6mc" path="res://asset/audio/sfx/UI/开锁声.mp3" id="3_g6cxj"] [ext_resource type="Texture2D" uid="uid://dweafdywxenu6" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/bg_二楼楼道.png" id="3_miykx"] -[ext_resource type="Texture2D" uid="uid://b3ootg88b63rb" path="res://asset/art/scene/c02/旧版/s13_院子诡异版/fg_楼梯调色后.png" id="4_4adgb"] [ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="4_yywsi"] -[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="5_gge8e"] [ext_resource type="Texture2D" uid="uid://csrfyvaufo1wb" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/l_瞎子理发店光.png" id="6_gge8e"] -[ext_resource type="Texture2D" uid="uid://gui0ubwlwoi0" path="res://asset/art/ui/action_mark/UI手.png" id="7_g6cxj"] +[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="6_yywsi"] [ext_resource type="PackedScene" uid="uid://khwxm5qbfj3k" path="res://scene/ground/script/c02/盒子猫canvas_layer.tscn" id="7_u2fv1"] [ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="9_yywsi"] [ext_resource type="PackedScene" uid="uid://dewbg4phd8c17" path="res://scene/ground/script/c02/追猫猪头怪.tscn" id="10_kmk38"] @@ -17,6 +15,7 @@ [node name="Ground" parent="." instance=ExtResource("1_71lma")] scene_name = "c02_s13" +display_hud = false player_y = 85 footstep_type = "盒子猫" @@ -24,7 +23,7 @@ footstep_type = "盒子猫" script = ExtResource("2_w5nqu") oneshot_animation = "" -[node name="Sfx开锁声" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] +[node name="Sfx结尾演出" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_g6cxj") bus = &"game_sfx" script = ExtResource("4_yywsi") @@ -40,55 +39,62 @@ target_scene = "c02_s14" target_portal = "left" [node name="portal_right" parent="Ground/DeployLayer" index="1"] -position = Vector2(776, 55) +position = Vector2(853, 56) +target_scene = "c02_s18" +target_portal = "right" + +[node name="portal_1" parent="Ground/DeployLayer" index="2" instance=ExtResource("6_yywsi")] +position = Vector2(779, 56) +portal_name = "1" target_scene = "c02_s17" target_portal = "right" -[node name="NotePortal" parent="Ground/DeployLayer" index="2" instance=ExtResource("5_gge8e")] -position = Vector2(853, 6) -note_sign_texture = ExtResource("7_g6cxj") -note_key = "notes_无法通过" - [node name="终点光芒" type="Sprite2D" parent="Ground/DeployLayer" index="3"] -modulate = Color(1, 1, 1, 0.34902) -position = Vector2(226, 11) +position = Vector2(226, 14) texture = ExtResource("6_gge8e") -[node name="Ambush猫咪敲门互动" parent="Ground/DeployLayer" index="4" instance=ExtResource("9_yywsi")] +[node name="Ambush终点光芒互动" parent="Ground/DeployLayer" index="4" instance=ExtResource("9_yywsi")] +position = Vector2(214, 11) +trigger_mode = "interact" +one_shot = false +hook_method = "knock_light_door" + +[node name="Ambush猫咪敲门互动" parent="Ground/DeployLayer" index="5" instance=ExtResource("9_yywsi")] position = Vector2(103, 6) trigger_mode = "interact" one_shot = false freeze_time = 1.5 global_method = "c02_cat_play_with_door" -[node name="Ambush猫咪敲门互动2" parent="Ground/DeployLayer" index="5" instance=ExtResource("9_yywsi")] +[node name="Ambush猫咪敲门互动2" parent="Ground/DeployLayer" index="6" instance=ExtResource("9_yywsi")] position = Vector2(539, 6) trigger_mode = "interact" one_shot = false freeze_time = 1.5 global_method = "c02_cat_play_with_door" -[node name="Ambush猫咪敲门互动3" parent="Ground/DeployLayer" index="6" instance=ExtResource("9_yywsi")] +[node name="Ambush猫咪敲门互动3" parent="Ground/DeployLayer" index="7" instance=ExtResource("9_yywsi")] position = Vector2(663, 5) trigger_mode = "interact" one_shot = false freeze_time = 1.5 global_method = "c02_cat_play_with_door" -[node name="追猫猪头怪" parent="Ground/DeployLayer" index="7" instance=ExtResource("10_kmk38")] -position = Vector2(642, 17) +[node name="追猫猪头怪_左侧" parent="Ground/DeployLayer" index="8" instance=ExtResource("10_kmk38")] +position = Vector2(269, 88) +transfer_mode = false -[node name="追猫猪头怪2" parent="Ground/DeployLayer" index="8" instance=ExtResource("10_kmk38")] -position = Vector2(154, 18) +[node name="追猫猪头怪_右侧" parent="Ground/DeployLayer" index="9" instance=ExtResource("10_kmk38")] +position = Vector2(608, 82) +transfer_mode = false + +[node name="追猫猪头怪_传送" parent="Ground/DeployLayer" index="10" instance=ExtResource("10_kmk38")] +position = Vector2(984, 76) [node name="MainPlayer" parent="Ground" index="4"] position = Vector2(41, 73) character = "盒子猫" -[node name="楼梯" type="Sprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="0"] -position = Vector2(1267, -4) -texture = ExtResource("4_4adgb") - [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(-1, -16) scale = Vector2(1.05, 1.05) @@ -96,6 +102,9 @@ scale = Vector2(1.05, 1.05) [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(37, 150, 870, 150) +[node name="DirectionalLight2D" parent="Ground" index="8"] +blend_mode = 1 + [node name="盒子猫CanvasLayer" parent="Ground" instance=ExtResource("7_u2fv1")] visible = false diff --git a/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn b/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn index b84b459c..fbe46a56 100644 --- a/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn +++ b/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn @@ -1,15 +1,17 @@ -[gd_scene load_steps=6 format=3 uid="uid://d0p4x5st2r315"] +[gd_scene load_steps=7 format=3 uid="uid://d0p4x5st2r315"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_cr1hi"] [ext_resource type="Script" uid="uid://bjisuntcem2lv" path="res://scene/ground/scene/c02/s14_animation.gd" id="2_o47bv"] [ext_resource type="Texture2D" uid="uid://y0e47513ca22" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/bg_二楼内侧楼道(粉笔画).png" id="3_cr1hi"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_o47bv"] [ext_resource type="PackedScene" uid="uid://khwxm5qbfj3k" path="res://scene/ground/script/c02/盒子猫canvas_layer.tscn" id="5_cr1hi"] +[ext_resource type="PackedScene" uid="uid://dewbg4phd8c17" path="res://scene/ground/script/c02/追猫猪头怪.tscn" id="5_o47bv"] [node name="S14" type="Node2D"] [node name="Ground" parent="." instance=ExtResource("1_cr1hi")] scene_name = "c02_s14" +display_hud = false player_y = 85 footstep_type = "盒子猫" @@ -37,6 +39,9 @@ portal_name = "1" target_scene = "c02_s16" target_portal = "right" +[node name="追猫猪头怪" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_o47bv")] +position = Vector2(193, 79) + [node name="MainPlayer" parent="Ground" index="4"] position = Vector2(41, 73) character = "盒子猫" @@ -44,6 +49,9 @@ character = "盒子猫" [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(101, 150, 660, 150) +[node name="DirectionalLight2D" parent="Ground" index="8"] +blend_mode = 1 + [node name="盒子猫CanvasLayer" parent="Ground" instance=ExtResource("5_cr1hi")] visible = false diff --git a/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn b/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn index b5dba00a..cdc8c638 100644 --- a/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn +++ b/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn @@ -1,16 +1,16 @@ -[gd_scene load_steps=7 format=3 uid="uid://b21p53g42j2nt"] +[gd_scene load_steps=6 format=3 uid="uid://b21p53g42j2nt"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_qxg0l"] [ext_resource type="Script" uid="uid://ebaq235h32fd" path="res://scene/ground/scene/c02/s15_animation.gd" id="2_etqjj"] [ext_resource type="Texture2D" uid="uid://c4eb71kdnqy3y" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼内侧楼道(粉笔画).png" id="3_qxg0l"] -[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="4_etqjj"] [ext_resource type="PackedScene" uid="uid://khwxm5qbfj3k" path="res://scene/ground/script/c02/盒子猫canvas_layer.tscn" id="5_isic3"] -[ext_resource type="Texture2D" uid="uid://gui0ubwlwoi0" path="res://asset/art/ui/action_mark/UI手.png" id="5_qxg0l"] +[ext_resource type="PackedScene" uid="uid://dewbg4phd8c17" path="res://scene/ground/script/c02/追猫猪头怪.tscn" id="6_etqjj"] [node name="S15" type="Node2D"] [node name="Ground" parent="." instance=ExtResource("1_qxg0l")] scene_name = "c02_s15" +display_hud = false player_y = 85 footstep_type = "盒子猫" @@ -23,17 +23,17 @@ texture = ExtResource("3_qxg0l") offset = Vector2(0, -102) [node name="portal_left" parent="Ground/DeployLayer" index="0"] -position = Vector2(160, 57) +position = Vector2(367, 58) +target_scene = "c02_s18" +target_portal = "left" [node name="portal_right" parent="Ground/DeployLayer" index="1"] position = Vector2(496, 57) target_scene = "c02_s14" target_portal = "right" -[node name="NotePortal" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_etqjj")] -position = Vector2(366, 10) -note_sign_texture = ExtResource("5_qxg0l") -note_key = "notes_无法通过" +[node name="追猫猪头怪" parent="Ground/DeployLayer" index="2" instance=ExtResource("6_etqjj")] +position = Vector2(76, 85) [node name="MainPlayer" parent="Ground" index="4"] position = Vector2(64, 73) @@ -46,6 +46,9 @@ position = Vector2(-1, -15) [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(125, 150, 660, 150) +[node name="DirectionalLight2D" parent="Ground" index="8"] +blend_mode = 1 + [node name="盒子猫CanvasLayer" parent="Ground" instance=ExtResource("5_isic3")] visible = false diff --git a/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn b/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn index 99114fd2..f0c996f0 100644 --- a/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn +++ b/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://22hc3oe8t0id"] +[gd_scene load_steps=8 format=3 uid="uid://22hc3oe8t0id"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_umyae"] [ext_resource type="Script" uid="uid://dx2w5v1erjyls" path="res://scene/ground/scene/c02/s16_animation.gd" id="2_tmnwc"] @@ -6,6 +6,7 @@ [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_qkv3g"] [ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="5_qkv3g"] [ext_resource type="PackedScene" uid="uid://khwxm5qbfj3k" path="res://scene/ground/script/c02/盒子猫canvas_layer.tscn" id="5_tmnwc"] +[ext_resource type="PackedScene" uid="uid://dewbg4phd8c17" path="res://scene/ground/script/c02/追猫猪头怪.tscn" id="6_fjtlb"] [node name="S16" type="Node2D"] @@ -44,6 +45,8 @@ one_shot = false freeze_time = 1.5 global_method = "c02_cat_play_with_door" +[node name="追猫猪头怪" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_fjtlb")] + [node name="MainPlayer" parent="Ground" index="4"] position = Vector2(235, 73) character = "盒子猫" @@ -55,6 +58,9 @@ position = Vector2(3584, -7) [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(37, 150, 655, 150) +[node name="DirectionalLight2D" parent="Ground" index="8"] +blend_mode = 1 + [node name="盒子猫CanvasLayer" parent="Ground" instance=ExtResource("5_tmnwc")] visible = false diff --git a/scene/ground/scene/c02/s17_盒子猫三楼.tscn b/scene/ground/scene/c02/s17_盒子猫三楼.tscn index 6aef09f7..c60db54c 100644 --- a/scene/ground/scene/c02/s17_盒子猫三楼.tscn +++ b/scene/ground/scene/c02/s17_盒子猫三楼.tscn @@ -12,6 +12,7 @@ [node name="Ground" parent="." instance=ExtResource("1_e436a")] scene_name = "c02_s17" +display_hud = false player_y = 85 footstep_type = "盒子猫" @@ -29,9 +30,9 @@ target_scene = "c02_s16" target_portal = "1" [node name="portal_right" parent="Ground/DeployLayer" index="1"] -position = Vector2(853, 56) +position = Vector2(852, 57) target_scene = "c02_s13" -target_portal = "right" +target_portal = "1" [node name="portal_1" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_e436a")] position = Vector2(662, 57) @@ -66,6 +67,9 @@ position = Vector2(3584, -7) [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(37, 150, 860, 150) +[node name="DirectionalLight2D" parent="Ground" index="8"] +blend_mode = 1 + [node name="盒子猫CanvasLayer" parent="Ground" instance=ExtResource("4_n3bxc")] visible = false diff --git a/scene/ground/scene/c02/s18_animation.gd b/scene/ground/scene/c02/s18_animation.gd new file mode 100644 index 00000000..6abbcac0 --- /dev/null +++ b/scene/ground/scene/c02/s18_animation.gd @@ -0,0 +1,17 @@ +@tool +extends AnimationRoot + + +# 覆盖该方法 +func _default_data() -> Dictionary: + return {} + + +func _ready() -> void: + super._ready() + if Engine.is_editor_hint(): + return + + +func _on_ground_ready() -> void: + pass \ No newline at end of file diff --git a/scene/ground/scene/c02/s18_animation.gd.uid b/scene/ground/scene/c02/s18_animation.gd.uid new file mode 100644 index 00000000..7214820c --- /dev/null +++ b/scene/ground/scene/c02/s18_animation.gd.uid @@ -0,0 +1 @@ +uid://b3mak700k2qwt diff --git a/scene/ground/scene/c02/s18_盒子猫一楼.tscn b/scene/ground/scene/c02/s18_盒子猫一楼.tscn new file mode 100644 index 00000000..166d24d4 --- /dev/null +++ b/scene/ground/scene/c02/s18_盒子猫一楼.tscn @@ -0,0 +1,70 @@ +[gd_scene load_steps=7 format=3 uid="uid://d27gv3pbkn4b8"] + +[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_4bsvj"] +[ext_resource type="Script" uid="uid://b3mak700k2qwt" path="res://scene/ground/scene/c02/s18_animation.gd" id="2_4bsvj"] +[ext_resource type="Texture2D" uid="uid://ttocw3erg8jv" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/bg_一楼楼道(粉笔画).png" id="3_owpnf"] +[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="5_emyx1"] +[ext_resource type="PackedScene" uid="uid://dewbg4phd8c17" path="res://scene/ground/script/c02/追猫猪头怪.tscn" id="6_xoyld"] +[ext_resource type="PackedScene" uid="uid://khwxm5qbfj3k" path="res://scene/ground/script/c02/盒子猫canvas_layer.tscn" id="7_8eo7o"] + +[node name="S18" type="Node2D"] + +[node name="Ground" parent="." instance=ExtResource("1_4bsvj")] +scene_name = "c02_s18" +display_hud = false +player_y = 85 +footstep_type = "盒子猫" + +[node name="AnimationPlayer" parent="Ground" index="0"] +script = ExtResource("2_4bsvj") +oneshot_animation = "" + +[node name="BGSprite2D" parent="Ground" index="1"] +texture = ExtResource("3_owpnf") +offset = Vector2(0, -102) + +[node name="portal_left" parent="Ground/DeployLayer" index="0"] +position = Vector2(32, 56) +target_scene = "c02_s15" +target_portal = "left" + +[node name="portal_right" parent="Ground/DeployLayer" index="1"] +position = Vector2(776, 55) +target_scene = "c02_s13" +target_portal = "right" + +[node name="Ambush猫咪敲门互动" parent="Ground/DeployLayer" index="2" instance=ExtResource("5_emyx1")] +position = Vector2(661, 6) +trigger_mode = "interact" +one_shot = false +freeze_time = 1.5 +global_method = "c02_cat_play_with_door" + +[node name="Ambush猫咪敲门互动2" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_emyx1")] +position = Vector2(104, 6) +trigger_mode = "interact" +one_shot = false +freeze_time = 1.5 +global_method = "c02_cat_play_with_door" + +[node name="追猫猪头怪" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_xoyld")] +position = Vector2(-18, 74) + +[node name="MainPlayer" parent="Ground" index="4"] +position = Vector2(235, 73) +character = "盒子猫" +facing_direction = Vector2(1, 0) + +[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] +position = Vector2(3584, -7) + +[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] +points = PackedVector2Array(37, 150, 860, 150) + +[node name="DirectionalLight2D" parent="Ground" index="8"] +blend_mode = 1 + +[node name="盒子猫CanvasLayer" parent="Ground" instance=ExtResource("7_8eo7o")] +visible = false + +[editable path="Ground"] diff --git a/scene/ground/script/c02/s08_画特写.tscn b/scene/ground/script/c02/s08_画特写.tscn new file mode 100644 index 00000000..e2c96512 --- /dev/null +++ b/scene/ground/script/c02/s08_画特写.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=4 format=3 uid="uid://dd8dfoik0ig3y"] + +[ext_resource type="Script" uid="uid://dnrql1t0j6v8i" path="res://scene/ground/script/c02/通用特写脚本.gd" id="1_jgyts"] +[ext_resource type="Texture2D" uid="uid://d1seskftkw08q" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/ux_特写.png" id="2_jo6o1"] +[ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/prop/特写通用遮罩.png" id="3_myoho"] + +[node name="s08_画特写" type="CanvasLayer"] +script = ExtResource("1_jgyts") + +[node name="TextureRect" type="TextureRect" parent="."] +offset_right = 40.0 +offset_bottom = 40.0 +texture = ExtResource("2_jo6o1") + +[node name="遮罩" type="TextureRect" parent="."] +offset_left = -35.0 +offset_top = -3.0 +offset_right = 585.0 +offset_bottom = 313.0 +texture = ExtResource("3_myoho") diff --git a/scene/ground/script/c02/盒子猫canvas_layer.gd b/scene/ground/script/c02/盒子猫canvas_layer.gd index 23b8c730..20bd85ee 100644 --- a/scene/ground/script/c02/盒子猫canvas_layer.gd +++ b/scene/ground/script/c02/盒子猫canvas_layer.gd @@ -1,9 +1,14 @@ extends CanvasLayer +@export var disable_crawl := false: + set(val): + disable_crawl = val + if disable_crawl and is_node_ready(): + down_pressing = false @export var show_cat := false -@export var show_cat_duration := 3.0 +@export var show_cat_duration := 6.0 -@onready var cat := $TextureCat as TextureRect +@onready var cat_fg := $TextureCat as TextureRect func _ready(): @@ -14,10 +19,15 @@ func _ready(): var camera = SceneManager.get_camera_marker() camera.limit_left -= 100 camera.limit_right += 100 - if show_cat: - create_tween().tween_property(cat, "modulate:a", 0.0, show_cat_duration) + camera.limit_top -= 50 + # camera.limit_bottom += 50 + if show_cat and not ArchiveManager.get_global_value("c02_boxcat_skip_intro"): + cat_fg.visible = true + var tween = create_tween() + tween.tween_interval(2.5) + tween.tween_property(cat_fg, "modulate:a", 0.0, show_cat_duration - 3) else: - cat.visible = false + cat_fg.visible = false var down_pressing = false: @@ -26,6 +36,7 @@ var down_pressing = false: down_pressing = val _try_toggle_crawl() +# 用来判断盒子猫是否在下蹲状态 var crawling = false: set(val): crawling = val @@ -57,7 +68,23 @@ func _try_toggle_crawl(): func _unhandled_input(event: InputEvent) -> void: - if event.is_action_pressed("down") and not down_pressing: - down_pressing = true - elif event.is_action_released("down") and down_pressing: - down_pressing = false + if disable_crawl: + return + if event.is_action_pressed("down"): + get_viewport().set_input_as_handled() + if not down_pressing: + down_pressing = true + elif event.is_action_released("down"): + get_viewport().set_input_as_handled() + if down_pressing: + down_pressing = false + + +func show_footprint(): + $TextureFootprint.show() + var frame = $TextureFrame + frame.modulate.a = 0.0 + frame.visible = true + var tween = create_tween() + tween.tween_interval(2.0) + tween.tween_property(frame, "modulate:a", 1.0, 4.0) diff --git a/scene/ground/script/c02/盒子猫canvas_layer.tscn b/scene/ground/script/c02/盒子猫canvas_layer.tscn index 2794e843..1c49a4ec 100644 --- a/scene/ground/script/c02/盒子猫canvas_layer.tscn +++ b/scene/ground/script/c02/盒子猫canvas_layer.tscn @@ -1,8 +1,13 @@ -[gd_scene load_steps=4 format=3 uid="uid://khwxm5qbfj3k"] +[gd_scene load_steps=9 format=3 uid="uid://khwxm5qbfj3k"] [ext_resource type="Texture2D" uid="uid://xhksp8eu3jqy" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/ux_镂空.png" id="1_tgkyo"] [ext_resource type="Script" uid="uid://ngb7wh7mqo0c" path="res://scene/ground/script/c02/盒子猫canvas_layer.gd" id="1_ygosu"] [ext_resource type="Texture2D" uid="uid://d3es8r30qvxdl" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/ux_盒子猫初始特写.png" id="3_ygosu"] +[ext_resource type="Texture2D" uid="uid://tcjm158n8hnw" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/小脚脚印.png" id="4_bc5tk"] +[ext_resource type="Texture2D" uid="uid://ccfbubistf0ov" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/ux_镂空_纸.png" id="5_l6g3a"] +[ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/prop/特写通用遮罩.png" id="6_aeggu"] +[ext_resource type="Texture2D" uid="uid://cylsq5cvhlp18" path="res://asset/art/tool/point_light.png" id="6_qw0v6"] +[ext_resource type="Texture2D" uid="uid://dx3i8mchgux1d" path="res://asset/art/scene/c02/s12_to_s17_盒子猫/ux_纸张.png" id="6_rxlkc"] [node name="盒子猫CanvasLayer" type="CanvasLayer"] layer = 0 @@ -19,6 +24,8 @@ texture = ExtResource("1_tgkyo") stretch_mode = 4 [node name="TextureCat" type="TextureRect" parent="."] +visible = false +light_mask = 17 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -26,3 +33,77 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 texture = ExtResource("3_ygosu") + +[node name="遮罩" type="TextureRect" parent="TextureCat"] +layout_mode = 0 +offset_left = -35.0 +offset_top = -3.0 +offset_right = 585.0 +offset_bottom = 313.0 +texture = ExtResource("6_aeggu") + +[node name="TextureFrame" type="TextureRect" parent="."] +visible = false +light_mask = 17 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -50.5 +offset_top = -68.5 +offset_right = 50.5 +offset_bottom = 68.5 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("5_l6g3a") + +[node name="TexturePaper" type="TextureRect" parent="TextureFrame"] +modulate = Color(1, 1, 1, 0.329412) +light_mask = 17 +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -171.0 +offset_top = -98.0 +offset_right = 153.0 +offset_bottom = 105.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("6_rxlkc") + +[node name="遮罩" type="TextureRect" parent="TextureFrame"] +layout_mode = 0 +offset_left = -35.0 +offset_top = -3.0 +offset_right = 585.0 +offset_bottom = 313.0 +texture = ExtResource("6_aeggu") + +[node name="TextureFootprint" type="TextureRect" parent="."] +visible = false +light_mask = 49 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -50.5 +offset_top = -68.5 +offset_right = 50.5 +offset_bottom = 68.5 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("4_bc5tk") + +[node name="PointLight2D" type="PointLight2D" parent="TextureFootprint"] +light_mask = 33 +position = Vector2(45.5, 72.5) +range_item_cull_mask = 32 +texture = ExtResource("6_qw0v6") diff --git a/scene/ground/script/c02/老鼠精画像.tscn b/scene/ground/script/c02/老鼠精画像.tscn index 30be63dc..c953f314 100644 --- a/scene/ground/script/c02/老鼠精画像.tscn +++ b/scene/ground/script/c02/老鼠精画像.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://cdf2qe8l7323i"] +[gd_scene load_steps=3 format=3 uid="uid://cdf2qe8l7323i"] [ext_resource type="Script" uid="uid://dnrql1t0j6v8i" path="res://scene/ground/script/c02/通用特写脚本.gd" id="1_lpmq3"] -[ext_resource type="Texture2D" uid="uid://cypvxj1vsl5yk" path="res://asset/art/scene/c02/s04_保卫科/花名册/bg_花名册桌面.png" id="2_l77sh"] -[ext_resource type="Texture2D" uid="uid://sx3i3lkt2vfd" path="res://asset/art/scene/c02/s04_保卫科/花名册/花名册封皮.png" id="3_sdpps"] +[ext_resource type="Texture2D" uid="uid://d1xr7g5huv5or" path="res://asset/art/scene/c02/s04_保卫科/ux_老鼠画像特写.png" id="2_eyynm"] [node name="老鼠精画像" type="CanvasLayer"] script = ExtResource("1_lpmq3") @@ -13,27 +12,4 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("2_l77sh") - -[node name="TextureButton" type="TextureButton" parent="."] -visible = false -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -62.5 -offset_top = -81.5 -offset_right = 62.5 -offset_bottom = 81.5 -grow_horizontal = 2 -grow_vertical = 2 -texture_normal = ExtResource("3_sdpps") - -[node name="Label" type="Label" parent="."] -offset_left = 225.0 -offset_top = 149.0 -offset_right = 345.0 -offset_bottom = 179.0 -theme_override_font_sizes/font_size = 24 -text = "老鼠精画像" +texture = ExtResource("2_eyynm") diff --git a/scene/ground/script/c02/追猫猪头怪.gd b/scene/ground/script/c02/追猫猪头怪.gd index 425c4025..343bb2af 100644 --- a/scene/ground/script/c02/追猫猪头怪.gd +++ b/scene/ground/script/c02/追猫猪头怪.gd @@ -1,35 +1,113 @@ extends Node2D -@export var enabled := true -# 追击开始距离 -@export var start_distance := 400 -# 追击开始方位(左/右) -@export var from_left := true -# 追击速度 -@export var speed := 30 +# transfer_mode 意味着检测 portal_key,然后显示 +@export var transfer_mode := true # 脚步声周期时间 -@export var footstep_wait_time := 0.7 +@export var footstep_wait_time := 0.5 +# 追击速度 +@export var speed := 50 +# 转身范围,超过这个范围/在这个范围内不 hidden 都会转身 +@export var trun_back_detact_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) +# 观测范围,在观测范围内进入盒子仍旧会被抓 +@export var watching_x := 180 -@onready var sfx_footstep = $SfxFootstep as Sfx +# 允许被抓后重开游戏 +var allow_restart_game := true -var footstep_timer +@onready var sfx_footstep = $SfxFootstep as Sfx2D +@onready var sprite2d = $AnimatedSprite2D as AnimatedSprite2D + +# 检测到猫钻进盒子的过程 +var cat_hiding_detacted = false +var footstep_timer := Timer.new() +var player +var camera +var catty_canvas_layer + +# 运动&检测, 初始为 false +var move_and_detact = false: + set(val): + move_and_detact = val + toggle_footstep_sfx(move_and_detact) + if val and is_node_ready(): + sprite2d.play("猪头怪走路") + # 启用的瞬间先执行检测 + _physics_process(0.0) func _ready() -> void: - var player = SceneManager.get_player() - # 高度对齐 + SceneManager.get_ground().ready.connect(_on_ground_ready) + # 抓盒子猫后,传送回初始场景,跳过其 intro 过程(从纸面逐渐进入黑板粉笔空间) + ArchiveManager.archive.set_global_entry("c02_boxcat_skip_intro", true) + + +func _on_ground_ready(): + player = SceneManager.get_player() + camera = SceneManager.get_camera_marker() + catty_canvas_layer = SceneManager.get_ground().get_node("盒子猫CanvasLayer") + var archive = ArchiveManager.archive as AssembledArchive + var portal = archive.entrance_portal + var chasing_started = ArchiveManager.get_global_value("c02_boxcat_chasing_started", false) + if archive.current_scene == "c02_s13": + # 开始追逐后,禁用二楼两只 + if chasing_started and not transfer_mode: + queue_free() + return + elif not chasing_started: + if transfer_mode: + queue_free() + return + if portal == "left" and name != &"追猫猪头怪_左侧": + queue_free() + return + if portal != "left" and name != &"追猫猪头怪_右侧": + queue_free() + return + # c02_s13 开始追逐; call_deferred 延时设置 + ArchiveManager.archive.set_global_entry.call_deferred( + "c02_boxcat_chasing_started", true + ) + elif not chasing_started: + # 如果没有开始追逐,且不是 13 号场景(二楼),则销毁 + queue_free() + return + # TODO 高度对齐 position.y = player.position.y # 脚步声 timer - footstep_timer = Timer.new() + footstep_timer.one_shot = false footstep_timer.autostart = false footstep_timer.wait_time = footstep_wait_time - add_child(footstep_timer) footstep_timer.timeout.connect(_on_footstep_timer_timeout) + add_child(footstep_timer) + if transfer_mode: + visible = false + var portal_node = ( + SceneManager.get_ground().get_node("DeployLayer/portal_" + portal) as Portal2D + ) + global_position.x = portal_node.global_position.x + # 禁用传送过来的 portal 3s + _disable_portal_a_few_seconds(portal_node) + # 3 秒后传送 + get_tree().create_timer(1.0).timeout.connect(_do_transfer) + if GlobalConfig.DEBUG: + print("猪头怪 Transfer to: " + portal) + else: + move_and_detact = true + + +var footstep_count := 0 func _on_footstep_timer_timeout() -> void: sfx_footstep.play() - # shake camera + footstep_count += 1 + if footstep_count % 2 == 0: + # shake camera + camera.shake_camera(4.0, 5.0) # 启用/禁用脚步声 @@ -40,57 +118,102 @@ func toggle_footstep_sfx(play := true): footstep_timer.stop() -var move_tween: Tween +# 禁用传送过来的 portal 3s +func _disable_portal_a_few_seconds(portal_node: Portal2D): + portal_node.enabled = false + await create_tween().tween_interval(3.0).finished + portal_node.enabled = true -# 开始追击 -func start_chasing() -> void: - toggle_footstep_sfx(true) - # 初始位置与方向 - - -# 停止追击 -func stop_chasing() -> void: - toggle_footstep_sfx(false) +func _do_transfer(): + if player.global_position.x > global_position.x: + _toggle_flip_h() + modulate.a = 0.0 + visible = true + var tween = create_tween() + tween.tween_property(self, "modulate:a", 1.0, 2.0) + await tween.finished + move_and_detact = true # 转身追击 func turn_back(): + move_and_detact = false # 呼吸一帧,然后转身 - pass + sprite2d.play("猪头怪呼吸") + await sprite2d.animation_looped + _toggle_flip_h() + move_and_detact = true -# 正在抓取 -var catching = false -# 检测到猫钻进盒子的过程 -var cat_hiding_detacted = false - -var catch_x_range = Vector2(5, 10) +func _toggle_flip_h(): + sprite2d.flip_h = !sprite2d.flip_h + sprite2d.offset.x = -sprite2d.offset.x -func detact_pos(player_pos: Vector2): - if catching: +# 抓小猫 +func do_catch(front: bool): + move_and_detact = false + SceneManager.freeze_player(0) + # 抓小猫时 lock palyer + SceneManager.lock_player() + # 呼吸一帧,然后抓取 + sprite2d.play("猪头怪呼吸") + await sprite2d.animation_looped + player.hide_sprite = true + if front: + # 优先 catch_front 播放 猪头怪抓盒子猫 + sprite2d.play("猪头怪抓盒子猫") + else: + # 其次 catch_nearby 播放 猪头怪抓盒子猫后段 + sprite2d.play("猪头怪抓盒子猫后段") + # TODO 音效 + SceneManager.pop_debug_dialog_info("音效", "抓取过程。 从捡小猫开始=" + str(front)) + await sprite2d.animation_finished + # 等待动画播放后秒,再检查是否允许重开游戏 + if allow_restart_game: + SceneManager.get_ground_loader().transition_to_scene("c02_s12", "left") + + +func _physics_process(delta: float) -> void: + if not move_and_detact: return - var signed_x_diff = (player_pos.x - position.x) * sign(position.x) + var player_pos = player.global_position - # 检查是否需要转身 + # 玩家到猪头怪面前的距离(有符号) + var signed_x_diff = player_pos.x - global_position.x + # 默认向左, flip_h 后向右 + if not sprite2d.flip_h: + signed_x_diff *= -1 - # 检查盒子猫状态 - cat_hiding_detacted = true - # 如果离开一定范围,重置 catch_box_cat - cat_hiding_detacted = false + # 猫是否在盒子里 + var is_cat_hideen = catty_canvas_layer.crawling + + # 检查隐藏小猫,在观测范围内进入盒子仍旧会被抓 + if signed_x_diff < 0 or signed_x_diff > watching_x: + # 如果离开一定范围,重置 cat_hiding_detacted + cat_hiding_detacted = false + else: + cat_hiding_detacted = cat_hiding_detacted or not is_cat_hideen # 检查是否抓取 - if cat_hiding_detacted and is_in_range(signed_x_diff, catch_x_range): - catching = true + if cat_hiding_detacted or not is_cat_hideen: + if signed_x_diff > catch_front_x_range.x and signed_x_diff < catch_front_x_range.y: + # 优先 catch_front 播放 猪头怪抓盒子猫 + do_catch(true) + return + elif signed_x_diff > catch_nearby_x_range.x and signed_x_diff < catch_nearby_x_range.y: + # 其次 catch_nearby 播放 猪头怪抓盒子猫后段 + do_catch(false) + return - if not catching: + # 检查是否需要转身,超过这个范围/在这个范围内不 hidden 都会转身 + if signed_x_diff < 0 and trun_back_detact_x < -signed_x_diff: + turn_back() return - # 如果距离近,先走到对应位置,然后使用 猪头怪抓盒子猫 - # 距离近,使用 猪头怪抓盒子猫后段 直接抓取 - - - -func is_in_range(x: float, x_range: Vector2) -> bool: - return x > x_range.x and x < x_range.y + # 更新追击位置 + var mov_delta = speed * delta + if not sprite2d.flip_h: + mov_delta *= -1 + global_position.x += mov_delta diff --git a/scene/ground/script/c02/追猫猪头怪.tscn b/scene/ground/script/c02/追猫猪头怪.tscn index 3b2bce26..d4eabeb1 100644 --- a/scene/ground/script/c02/追猫猪头怪.tscn +++ b/scene/ground/script/c02/追猫猪头怪.tscn @@ -19,12 +19,10 @@ max_distance = 600.0 attenuation = 1.7411 bus = &"game_sfx" script = ExtResource("2_35vtd") -loop_round_time = null -debug_play = null metadata/_custom_type_script = "uid://wapo47a1oddf" [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] z_index = 20 sprite_frames = ExtResource("4_3sbui") animation = &"猪头怪呼吸" -autoplay = "猪头怪呼吸" +offset = Vector2(-29, -68)