diff --git a/asset/art/gif/c02_二楼/c02_二楼_frames.tres b/asset/art/gif/c02_二楼/c02_二楼_frames.tres
index 46211a32..7bce0bc0 100644
--- a/asset/art/gif/c02_二楼/c02_二楼_frames.tres
+++ b/asset/art/gif/c02_二楼/c02_二楼_frames.tres
@@ -1,25 +1,74 @@
-[gd_resource type="SpriteFrames" load_steps=17 format=3 uid="uid://c8dl7c68f1yb0"]
+[gd_resource type="SpriteFrames" load_steps=28 format=3 uid="uid://c8dl7c68f1yb0"]
[ext_resource type="Texture2D" uid="uid://c0a8gd6jo2ov3" path="res://asset/art/gif/c02_二楼/疯子跑动/0.png" id="1_63k7g"]
[ext_resource type="Texture2D" uid="uid://b1c1c3i0yw2ec" path="res://asset/art/gif/c02_二楼/疯子撞墙/0.png" id="1_hj708"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png" id="1_wsslv"]
[ext_resource type="Texture2D" uid="uid://bfngukedof1y5" path="res://asset/art/gif/c02_二楼/疯子撞墙/1.png" id="2_1du44"]
[ext_resource type="Texture2D" uid="uid://cbasvdgqr8446" path="res://asset/art/gif/c02_二楼/疯子跑动/1.png" id="2_22fhs"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/1.png" id="2_226pc"]
[ext_resource type="Texture2D" uid="uid://cj6cjxjsi6v1o" path="res://asset/art/gif/c02_二楼/疯子跑动/2.png" id="3_jh047"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/2.png" id="3_ki3d0"]
[ext_resource type="Texture2D" uid="uid://cwt2h0rs4olgx" path="res://asset/art/gif/c02_二楼/疯子撞墙/2.png" id="3_lhftd"]
[ext_resource type="Texture2D" uid="uid://85ws4e51p7xd" path="res://asset/art/gif/c02_二楼/疯子跑动/3.png" id="4_0umtp"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/3.png" id="4_222li"]
[ext_resource type="Texture2D" uid="uid://cah0u1r1etyit" path="res://asset/art/gif/c02_二楼/疯子撞墙/3.png" id="4_mg204"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/4.png" id="5_cylr4"]
[ext_resource type="Texture2D" uid="uid://dvjfqwhwfyhbd" path="res://asset/art/gif/c02_二楼/疯子撞墙/4.png" id="5_f5uit"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/5.png" id="6_3dyjx"]
[ext_resource type="Texture2D" uid="uid://ch1xvskmqros" path="res://asset/art/gif/c02_二楼/疯子撞墙/5.png" id="6_m5vcj"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/6.png" id="7_7hwpj"]
[ext_resource type="Texture2D" uid="uid://b72c8cfitylg8" path="res://asset/art/gif/c02_二楼/疯子撞墙/6.png" id="7_1671v"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/7.png" id="8_ffct7"]
[ext_resource type="Texture2D" uid="uid://cni6i40kn1b8b" path="res://asset/art/gif/c02_二楼/疯子撞墙/7.png" id="8_mvc2t"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/8.png" id="9_82f58"]
[ext_resource type="Texture2D" uid="uid://ci2r63i3a6l6h" path="res://asset/art/gif/c02_二楼/疯子撞墙/8.png" id="9_dko4h"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/9.png" id="10_b4lti"]
[ext_resource type="Texture2D" uid="uid://blcgp2qwfjn3b" path="res://asset/art/gif/c02_二楼/疯子撞墙/9.png" id="10_rxt3q"]
+[ext_resource type="Texture2D" path="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/10.png" id="11_opiqg"]
[ext_resource type="Texture2D" uid="uid://ccdpsykfnhik8" path="res://asset/art/gif/c02_二楼/疯子跪下/2.png" id="17_7v1rg"]
[ext_resource type="Texture2D" uid="uid://8g5rukqap3w8" path="res://asset/art/gif/c02_二楼/疯子跪下/3.png" id="18_ox23s"]
[resource]
animations = [{
"frames": [{
+"duration": 6.0,
+"texture": ExtResource("1_wsslv")
+}, {
+"duration": 6.0,
+"texture": ExtResource("2_226pc")
+}, {
+"duration": 6.0,
+"texture": ExtResource("3_ki3d0")
+}, {
+"duration": 6.0,
+"texture": ExtResource("4_222li")
+}, {
+"duration": 6.0,
+"texture": ExtResource("5_cylr4")
+}, {
+"duration": 6.0,
+"texture": ExtResource("6_3dyjx")
+}, {
+"duration": 6.0,
+"texture": ExtResource("7_7hwpj")
+}, {
+"duration": 6.0,
+"texture": ExtResource("8_ffct7")
+}, {
+"duration": 6.0,
+"texture": ExtResource("9_82f58")
+}, {
+"duration": 6.0,
+"texture": ExtResource("10_b4lti")
+}, {
+"duration": 6.0,
+"texture": ExtResource("11_opiqg")
+}],
+"loop": true,
+"name": &"叼纸小猫坐着呼吸",
+"speed": 30.0
+}, {
+"frames": [{
"duration": 1.0,
"texture": ExtResource("1_hj708")
}, {
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸.gif b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸.gif
new file mode 100644
index 00000000..f7a3c957
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸.gif differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸.gif.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸.gif.import
new file mode 100644
index 00000000..da8b07bb
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸.gif.import
@@ -0,0 +1,14 @@
+[remap]
+
+importer="gif.animated.texture.plugin"
+type="SpriteFrames"
+uid="uid://ca5dpfgp7qt6m"
+path="res://.godot/imported/叼纸小猫坐着呼吸.gif-ebf8f8899f6012e57cb36a0cbc20c0aa.tres"
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸.gif"
+dest_files=["res://.godot/imported/叼纸小猫坐着呼吸.gif-ebf8f8899f6012e57cb36a0cbc20c0aa.tres"]
+
+[params]
+
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png
new file mode 100644
index 00000000..dff64949
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png.import
new file mode 100644
index 00000000..d83ca83b
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://c236epftux1w2"
+path="res://.godot/imported/0.png-922aee4d362cd8bc880e41a7e186d37f.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/0.png"
+dest_files=["res://.godot/imported/0.png-922aee4d362cd8bc880e41a7e186d37f.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/gif/c02_二楼/叼纸小猫坐着呼吸/1.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/1.png
new file mode 100644
index 00000000..dd3f0099
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/1.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/1.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/1.png.import
new file mode 100644
index 00000000..f4f41432
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/1.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://beqqq2s3pjwed"
+path="res://.godot/imported/1.png-b92d00f4ace5ead0469124bfdea6ae58.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/1.png"
+dest_files=["res://.godot/imported/1.png-b92d00f4ace5ead0469124bfdea6ae58.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/gif/c02_二楼/叼纸小猫坐着呼吸/10.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/10.png
new file mode 100644
index 00000000..54830433
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/10.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/10.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/10.png.import
new file mode 100644
index 00000000..4ee03528
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/10.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cblt1arfn4lov"
+path="res://.godot/imported/10.png-eea90f0c222a833753cc40b7b9a43588.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/10.png"
+dest_files=["res://.godot/imported/10.png-eea90f0c222a833753cc40b7b9a43588.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/gif/c02_二楼/叼纸小猫坐着呼吸/2.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/2.png
new file mode 100644
index 00000000..54830433
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/2.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/2.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/2.png.import
new file mode 100644
index 00000000..35cba896
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/2.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://1buxuxtjilqk"
+path="res://.godot/imported/2.png-d5793bc1252058454127de975fb2981b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/2.png"
+dest_files=["res://.godot/imported/2.png-d5793bc1252058454127de975fb2981b.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/gif/c02_二楼/叼纸小猫坐着呼吸/3.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/3.png
new file mode 100644
index 00000000..f647ac2f
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/3.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/3.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/3.png.import
new file mode 100644
index 00000000..38c87bf6
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/3.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://1u5chw5en7tw"
+path="res://.godot/imported/3.png-509b591c5554c88a9dba8d233b6cb5fb.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/3.png"
+dest_files=["res://.godot/imported/3.png-509b591c5554c88a9dba8d233b6cb5fb.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/gif/c02_二楼/叼纸小猫坐着呼吸/4.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/4.png
new file mode 100644
index 00000000..52dd7a2e
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/4.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/4.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/4.png.import
new file mode 100644
index 00000000..2eddea40
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/4.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://yrt55cq06fe"
+path="res://.godot/imported/4.png-ded117d8988392b6d67bd8c69f35ba1d.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/4.png"
+dest_files=["res://.godot/imported/4.png-ded117d8988392b6d67bd8c69f35ba1d.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/gif/c02_二楼/叼纸小猫坐着呼吸/5.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/5.png
new file mode 100644
index 00000000..b7e251d7
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/5.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/5.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/5.png.import
new file mode 100644
index 00000000..9a0830d9
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/5.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cwlexhsxfg88o"
+path="res://.godot/imported/5.png-18cb5808969f3ed699deda90b9065adb.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/5.png"
+dest_files=["res://.godot/imported/5.png-18cb5808969f3ed699deda90b9065adb.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/gif/c02_二楼/叼纸小猫坐着呼吸/6.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/6.png
new file mode 100644
index 00000000..fd199f95
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/6.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/6.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/6.png.import
new file mode 100644
index 00000000..c2c8a687
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/6.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cbckomfskxykj"
+path="res://.godot/imported/6.png-1bdd54a7f2ad072dfb65d9bf297bd8a8.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/6.png"
+dest_files=["res://.godot/imported/6.png-1bdd54a7f2ad072dfb65d9bf297bd8a8.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/gif/c02_二楼/叼纸小猫坐着呼吸/7.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/7.png
new file mode 100644
index 00000000..b7e251d7
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/7.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/7.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/7.png.import
new file mode 100644
index 00000000..b7680bed
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/7.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cj2hmg3cnripa"
+path="res://.godot/imported/7.png-13b26bd998a8b9041876718098906d90.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/7.png"
+dest_files=["res://.godot/imported/7.png-13b26bd998a8b9041876718098906d90.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/gif/c02_二楼/叼纸小猫坐着呼吸/8.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/8.png
new file mode 100644
index 00000000..52dd7a2e
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/8.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/8.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/8.png.import
new file mode 100644
index 00000000..6fac9888
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/8.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://br2u1ia6gs0vv"
+path="res://.godot/imported/8.png-5c8f07ac5e310e04b8996773df71213b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/8.png"
+dest_files=["res://.godot/imported/8.png-5c8f07ac5e310e04b8996773df71213b.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/gif/c02_二楼/叼纸小猫坐着呼吸/9.png b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/9.png
new file mode 100644
index 00000000..f647ac2f
Binary files /dev/null and b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/9.png differ
diff --git a/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/9.png.import b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/9.png.import
new file mode 100644
index 00000000..c5fe4be6
--- /dev/null
+++ b/asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/9.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b5ph1p5cp7dyg"
+path="res://.godot/imported/9.png-783e520bf611e5ccde008a69e8321917.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/gif/c02_二楼/叼纸小猫坐着呼吸/9.png"
+dest_files=["res://.godot/imported/9.png-783e520bf611e5ccde008a69e8321917.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/prop/c02/小猫纸条.png b/asset/art/prop/c02/小猫纸条.png
new file mode 100644
index 00000000..68588dc9
Binary files /dev/null and b/asset/art/prop/c02/小猫纸条.png differ
diff --git a/asset/art/prop/c02/小猫纸条.png.import b/asset/art/prop/c02/小猫纸条.png.import
new file mode 100644
index 00000000..fb160c72
--- /dev/null
+++ b/asset/art/prop/c02/小猫纸条.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b5kolhax7pf4u"
+path="res://.godot/imported/小猫纸条.png-2bb3dea64dd13aca468eb7e6755e754e.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://asset/art/prop/c02/小猫纸条.png"
+dest_files=["res://.godot/imported/小猫纸条.png-2bb3dea64dd13aca468eb7e6755e754e.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/asset/dialogue/event_stage.dialogue b/asset/dialogue/event_stage.dialogue
new file mode 100644
index 00000000..789348ef
--- /dev/null
+++ b/asset/dialogue/event_stage.dialogue
@@ -0,0 +1,11 @@
+~ EventStage
+# 0:关闭 1:打开 2:放入小蝉人偶 3:全部放置正确_可摇手柄 4:已播放完成
+c02_musicbox_stage
+# 1:已交互疯子 2:小鞋已掉落
+c02_madman_interacted
+# 0:默认 1:寻找弹珠_老虎钳可以换弹珠 2:给出弹珠 3:游戏结束_小猫纸片 4:游戏结束_小猫离开
+c02_ball_game_stage
+=> END
+
+~ ArchiveStage
+=> END
\ No newline at end of file
diff --git a/asset/dialogue/event_stage.dialogue.import b/asset/dialogue/event_stage.dialogue.import
new file mode 100644
index 00000000..a86407f5
--- /dev/null
+++ b/asset/dialogue/event_stage.dialogue.import
@@ -0,0 +1,16 @@
+[remap]
+
+importer="dialogue_manager"
+importer_version=15
+type="Resource"
+uid="uid://dohpsb4jttuv1"
+path="res://.godot/imported/event_stage.dialogue-6d96900dfc739f5d1bb21542d623179e.tres"
+
+[deps]
+
+source_file="res://asset/dialogue/event_stage.dialogue"
+dest_files=["res://.godot/imported/event_stage.dialogue-6d96900dfc739f5d1bb21542d623179e.tres"]
+
+[params]
+
+defaults=true
diff --git a/asset/dialogue/item_description.csv b/asset/dialogue/item_description.csv
index f49ab685..a3270a42 100644
--- a/asset/dialogue/item_description.csv
+++ b/asset/dialogue/item_description.csv
@@ -1,45 +1,22 @@
keys,zh_CN,_character,_notes,_tags,zh_SH,en
-重要物品示例,重要物品示例,,,,,
-1,1,,,,,
-2,2,,,,,
-3,3,,,,,
-4,4,,,,,
-c02_杂物堆,杂物堵住了,,,,,
-prop_新鲜的肉,新鲜的肉,,,[#texture=c02/新鲜的肉.png],,
-c02_小蝉寻人启事_脸部破碎,寻人启事...画像和字迹都看不清。,,,,,
-小猫玩具发光,嗯?玩具在发光,,,,,
-setting_画册,画册(G),,,,,
-notes_干掉的血迹,干掉的血迹,,,,,
-c02_瞎子卧室_血脚印,这画上的脚印和刚刚看到的一样。,,,,,
-bag_tab_日志,笔记,,,,,
-ux_panel_退出,退出,,,,,
-setting_主界面,回到主界面,,,,,Back to Menu
-setting_退出,保存并退出,,,,,Save & Exit
-setting_日志,笔记(B),,,,,Open the Log
-setting_记忆,记忆(G),,,,,
-setting_全屏游戏,全屏游戏,,,,,Full Screen
-setting_窗口置顶,窗口置顶,,,,,Top Window
-ux_panel_笔记,线索,,,,,
-c02_小手其他交易,...还有什么东西能跟它交换呢?,,,,,
-这是什么鬼东西,它是在讨要什么 [ID:],这是什么鬼东西,它是在讨要什么 [ID:],,,,,
-index_新游戏,新游戏,,,,,New Game
-index_继续游戏,继续游戏,,,,,Resume
-index_退出游戏,退出游戏,,,,,Exit
+index_新游戏,新游戏,,,,,
+index_继续游戏,继续游戏,,,,,
+index_退出游戏,退出游戏,,,,,
ux_panel_继续,继续,,,,,
ux_panel_线索笔记,线索,,,,,
ux_panel_设置,设置,,,,,
ux_panel_返回主菜单,返回主菜单,,,,,
ux_panel_退出游戏,退出游戏,,,,,
-setting_总音量,总音量,,,,,Main Volume
-setting_音效音量,音效音量,,,,,SFX Volume
-setting_对话音量,对话音量,,,,,Dialogue Volume
-setting_语言,语言(Lang),,,,,Language
+setting_总音量,总音量,,,,,
+setting_音效音量,音效音量,,,,,
+setting_对话音量,对话音量,,,,,
+setting_语言,语言(Lang),,,,,
setting_字幕,字幕,,,,,
setting_气泡文字自动结束,气泡文字自动结束,,,,,
setting_气泡等待时长,气泡停留,,,,,
setting_全屏,全屏游戏,,,,,
setting_置顶,窗口置顶,,,,,
-setting_自动保存,自动保存,,,,,Auto Save
+setting_自动保存,自动保存,,,,,
ui_秒,秒,,,,,S
setting_返回,返回,,,,,
bag_tab_笔记,线索,,,,,
@@ -111,6 +88,8 @@ prop_木头人偶_说明,略显粗糙的木头玩偶,能依稀辨认出是个
prop_小蝉人偶_说明,小小的人儿,小小的鞋子,小小的友情啊——像蝶依偎着花,,,,,
prop_粘鼠板,粘鼠板,,,[#texture=c02/粘鼠板特写.png],,
prop_粘鼠板_说明,自制的捕鼠工具,纸上面有黏黏的浆糊,,,,,
+prop_小猫纸条,小猫纸条,,,[#texture=c02/小猫纸条.png],,
+prop_小猫纸条_说明,「大哥,今晚老地方见 /井\」,,,,,
prop_一把香,一把香,,,[#texture=c02/一把香.png],,
prop_2014钥匙,2014钥匙,,,[#texture=c02/1012钥匙物品.png],,
prop_重要物品示例,重要物品示例,,,[#texture=c01/银元.png],,
@@ -123,16 +102,8 @@ c01_s05_检查院长房间,好像忘记了什么事情,再回去检查一遍
c01_s07_需要报纸,书店还没开门。,,,,,
c01_s08_书店工作,老板交代的工作还没做完,不能偷懒。,,,,,
c01_s08_书店工钱,这个月的工钱还没拿。,,,,,
-c02_杂物堆堵住,杂物堵住了,,,,,
-notes_纸条,纸条,,,,,
-notes_锁住了,锁住了,,,,,
-notes_打不开,打不开,,,,,
-notes_无法通过,无法通过,,,,,
-notes_有什么东西,有什么东西,,,,,
-notes_无法触碰,无法触碰,,,,,
-notes_挂画,挂画,,,,,
-notes_相框,相框,,,,,
-notes_寻人启事,寻人启事,,,,,
+mem_偷听对话,偷听对话,,,,,
+mem_疯子看井,疯子看井,,,,,
c01_鸡毛掸子,这是鸡毛掸子吗?,,,,,
c01_院长书桌,桌上放着一本《圣经》。
「得著生命的,將要失喪生命...」,,,,,
c01_院长床,这本书已经看过了。
...那些句子是什么意思呢?,,,,,
@@ -205,5 +176,3 @@ c02_小蝉恨他们,我恨他们!,,,,,
c02_火灾等待准备,还没准备好点火呢,,,,,
c02_霸凌救小蝉开始,啊!我得想办法帮帮她...,,,,,
c02_点火前阻止右移,没时间浪费了!想想办法救出小蝉...,,,,,
-g_偷听对话,偷听对话,,,,,
-g_疯子看井,疯子看井,,,,,
diff --git a/asset/dialogue/item_description.dialogue b/asset/dialogue/item_description.dialogue
index eff59850..6024ba72 100644
--- a/asset/dialogue/item_description.dialogue
+++ b/asset/dialogue/item_description.dialogue
@@ -108,6 +108,8 @@
小小的人儿,小小的鞋子,小小的友情啊——像蝶依偎着花 [ID:prop_小蝉人偶_说明]
粘鼠板 [#texture=c02/粘鼠板特写.png] [ID:prop_粘鼠板]
自制的捕鼠工具,纸上面有黏黏的浆糊[ID:prop_粘鼠板_说明]
+小猫纸条 [#texture=c02/小猫纸条.png] [ID:prop_小猫纸条]
+「大哥,今晚老地方见 /井\」[ID:prop_小猫纸条_说明]
# 未使用
一把香 [#texture=c02/一把香.png] [ID:prop_一把香]
@@ -134,24 +136,20 @@
~ HoldingReason
+# c01
好像忘记了什么事情,再回去检查一遍吧。 [ID:c01_s05_检查院长房间]
书店还没开门。 [ID:c01_s07_需要报纸]
老板交代的工作还没做完,不能偷懒。 [ID:c01_s08_书店工作]
这个月的工钱还没拿。 [ID:c01_s08_书店工钱]
-杂物堵住了 [ID:c02_杂物堆堵住]
+# c02
=> END
-~ Notes
-# 通用
-纸条 [ID:notes_纸条]
-锁住了 [ID:notes_锁住了]
-打不开 [ID:notes_打不开]
-无法通过 [ID:notes_无法通过]
-有什么东西 [ID:notes_有什么东西]
-无法触碰 [ID:notes_无法触碰]
-挂画 [ID:notes_挂画]
-相框 [ID:notes_相框]
-寻人启事 [ID:notes_寻人启事]
+~ Memory
+偷听对话[ID:mem_偷听对话]
+疯子看井[ID:mem_疯子看井]
+=> END
+
+~ Notes_c01
# c01-s05 院长房间
这是鸡毛掸子吗? [ID:c01_鸡毛掸子]
桌上放着一本《圣经》。
「得著生命的,將要失喪生命...」 [ID:c01_院长书桌]
@@ -172,6 +170,9 @@
# c01-s08 书店
这些书都被老鼠啃坏了,连木头架子都没放过。 [ID:c01_s08_书架游戏完成]
工钱还在老地方。 [ID:c01_s08_获得袁大头后]
+=> END
+
+~ Notes_c02
# c02
剪辫悬梁上侦探奇闻 [ID:c02_海报_剪辫子侦探]
朱连魁全班戏法——「各有幻女...演技新奇」 [ID:c02_海报_戏法班]
@@ -190,7 +191,7 @@
看着唬人,这尺寸只是给孩子们戴着玩的 [ID:c02_s02_大头娃娃头套]
自制的八音盒,这么用心的小玩意,怎么会被人扔在这里呢? [ID:c02_s02_八音盒]
别出心裁的小机关,缺了点东西,暂时还不能用 [ID:c02_s02_八音盒缺人偶]
-# c02 院子
+#院子
这地方有些不对劲,最好先找个人问问 [ID:c02_院子_保卫科旁]
血迹看上去干了很久,血脚印有大有小,咦,还有个特别小的... [ID:c02_s03_干掉的血迹]
算命的摊位? [ID:c02_院子_算命摊位]
@@ -199,17 +200,17 @@
被铁链锁住了 [ID:c02_s03_铁门]
三快三慢?是和那个肉铺老板交流的暗号吗? [ID:c02_偷听李癞对话后]
这里之前放着的东西好像被人挪走了? [ID:c02_柜子可放置区域]
-# c02 保卫科
+#保卫科
登记簿?
刚才那个小孩在上面写了些什么 [ID:c02_保卫科花名册os]
3012?上面有我的名字,看来确实是这里...
先去三楼看看吧[ID:c02_保卫科花名册首次互动结束]
祭台是专门供奉这只大老鼠的? [ID:c02_保卫科祭台os]
鼠歌
天地小如喉,
红轮自吞吐。
多少世间人,
都被红轮误。 [ID:c02_保卫科老鼠精]
-# c02 小手
+#小手
...还有什么东西能跟它交换呢? [ID:c02_小手还能换什么]
?! [ID:c02_小手出现摔倒]
这是什么鬼东西,它是在讨要什么 [ID:c02_小手是什么鬼]
又来一个! [ID:c02_小手再次出现]
-# c02 内侧楼道
+#内侧楼道
被挡住了 [ID:c02_一楼楼道被挡住]
盖着布的木头架子...用来做什么的呢 [ID:c02_一楼戏台]
桶是空的,飘着一股血气,又酸又腥。 [ID:c02_描述垃圾通道]
@@ -217,14 +218,14 @@
这里原来放着什么? [ID:c02_一楼粘鼠板]
老鼠被粘住死掉了。 [ID:c02_一楼死老鼠]
怎么回事...头...好痛 [ID:c02_获得木头人偶]
-
-# c02 空房间
+#空房间
我的头,又开始痛了 [ID:c02_获得小猫玩具]
吕萍阿姨,我不想死,求你...帮帮我 [ID:c02_小蝉头套文字]
-# c02 敲门_老鼠叼肉
+!!![ID:c02_互动小蝉头套]
+#敲门_老鼠叼肉
楼道有东西掉下来了? [ID:c02_敲门_肉掉落]
刚刚这里有块肉不见了? [ID:c02_敲门_老鼠叼肉]
-# c02 二楼
+#二楼
另一只小鞋子。 [ID:c02_锡箔换小鞋子]
去三楼的路被堵住了,要不先看看别的地方吧。 [ID:c02_二楼楼梯杂物堆]
盆里的水很清澈,看上去像是刚盛的。 [ID:c02_二楼水盆]
@@ -232,19 +233,31 @@
又是这种小小尖尖的血脚印... [ID:c02_二楼血脚印]
那女孩为什么要我引开这个疯男人?[ID:c02_老鼠叼鞋引开疯子]
我要去找洞里的小手把弹珠拿回来。 [ID:c02_小手换回弹珠]
-# c02 瞎子卧室
+#瞎子卧室
刚才那些...到底是怎么回事? [ID:c02_离开红色演出]
「乾三连,坤六断;震仰盂,艮覆碗;离中虚,坎中满;兑上缺,巽下断」
咦,这口诀是谁教我的来着... [ID:c02_瞎子卧室_八卦图]
院长房间里也有一个类似的十字架。[ID:c02_瞎子卧室_十字架]
我会在盒子里一直陪着你 :3 [ID:c02_小蝉盒子特写]
我恨他们![ID:c02_小蝉恨他们]
-# c02 火灾
+#火灾
还没准备好点火呢 [ID:c02_火灾等待准备]
啊!我得想办法帮帮她... [ID:c02_霸凌救小蝉开始]
没时间浪费了!想想办法救出小蝉... [ID:c02_点火前阻止右移]
=> END
-~ Memory
-偷听对话[ID:g_偷听对话]
-疯子看井[ID:g_疯子看井]
+~ Notes_c03
+# s01
+# s02
+# s03
+# s04
+# s05
+=> END
+
+~ Notes_c04
+=> END
+
+~ Notes_c05
+=> END
+
+~ Notes_c06
=> END
diff --git a/manager/event_manager/event2d.gd b/manager/event_manager/event2d.gd
index 199b9bbb..09da9f75 100644
--- a/manager/event_manager/event2d.gd
+++ b/manager/event_manager/event2d.gd
@@ -1,31 +1,51 @@
+@tool
extends Node2D
class_name Event2D
-# 前置依赖事件,为空时意味着无前置事件
-@export var pre_event: String
# 当前事件
-@export var event: String
+@export var event: StringName
+@export var hide_if_on_stage: Array[int] = []
+# 前置依赖事件,为空时意味着无前置事件
+@export var pre_event: StringName
+@export var hide_if_pre_on_stage: Array[int] = []
+@export_tool_button("创建脚本") var create_script := _create_script
var prev_stage := 0
var stage := 0
func _ready() -> void:
+ if Engine.is_editor_hint():
+ return
+ if event == &"":
+ printerr("[Event2D] event is not set. continue processing...")
stage = EventManager.get_stage(event)
- if pre_event:
- prev_stage = EventManager.get_stage(pre_event)
+ refresh_visibility()
SceneManager.ground_ready.connect(_on_ground_ready)
EventManager.stage_updated.connect(_on_global_stage_updated)
+func refresh_visibility() -> void:
+ var should_show = not stage in hide_if_on_stage and not prev_stage in hide_if_pre_on_stage
+ if visible != should_show:
+ visible = should_show
+
+
func _on_global_stage_updated(e: StringName, s: int):
+ var updated = false
+ var pre_updated = false
if e == pre_event:
+ pre_updated = prev_stage != s
prev_stage = s
print("[Event2D] Pre-event stage updated: %s, stage: %s" % [pre_event, prev_stage])
- _on_pre_stage_updated()
elif e == event:
+ updated = stage != s
stage = s
print("[Event2D] Event stage updated: %s, stage: %s" % [event, stage])
+ refresh_visibility()
+ if pre_updated:
+ _on_pre_stage_updated()
+ if updated:
_on_stage_updated()
@@ -39,3 +59,31 @@ func _on_pre_stage_updated():
func _on_stage_updated():
pass
+
+
+###### TOOL BUTTON
+
+var script_template = preload("uid://bmxsei74o3pyw") as Script
+
+
+func _create_script():
+ var script = script_template.duplicate(true) as Script
+ var ground = get_node("..")
+ while ground and not ground is Ground2D:
+ ground = ground.get_node("..")
+ if not ground:
+ printerr("[Event2D] _create_script Ground2D not found.")
+ return
+ var chapter = ground.scene_name.substr(0, 3)
+ if len(chapter) != 3:
+ printerr("[Event2D] _create_script chapter name error: %s" % ground.scene_name)
+ return
+ var file_name = name.to_snake_case() + ".gd"
+ var path = "res://scene/ground/script/" + chapter + "/" + file_name
+ if FileAccess.file_exists(path):
+ print("file exists, reattach the script to node: %s" % path)
+ set_script(load(path))
+ return
+ ResourceSaver.save(script, path)
+ set_script(load(path))
+ print("[Event2D] Script created: %s" % path)
diff --git a/project.godot b/project.godot
index 881b9efd..ff3ae317 100644
--- a/project.godot
+++ b/project.godot
@@ -222,7 +222,7 @@ panel={
[internationalization]
locale/translations=PackedStringArray("res://asset/dialogue/c01.zh_CN.translation", "res://asset/dialogue/c02.zh_CN.translation", "res://asset/dialogue/inspect_content.zh_CN.translation", "res://asset/dialogue/item_description.zh_CN.translation", "res://asset/dialogue/names.zh_CN.translation", "res://asset/dialogue/npc.zh_CN.translation", "res://asset/dialogue/c01.zh_SH.translation", "res://asset/dialogue/纯中文_无需本地化.zh_CN.translation", "res://asset/dialogue/c01.en.translation", "res://asset/dialogue/c03.zh_CN.translation", "res://asset/dialogue/c04.zh_CN.translation", "res://asset/dialogue/c05.zh_CN.translation", "res://asset/dialogue/c06.zh_CN.translation", "res://asset/dialogue/item_description.en.translation", "res://asset/dialogue/item_description.zh_SH.translation", "res://asset/dialogue/c02.zh_SH.translation", "res://asset/dialogue/npc.zh_SH.translation")
-locale/translations_pot_files=PackedStringArray("res://asset/dialogue/item_description.dialogue", "res://asset/dialogue/c01.dialogue", "res://asset/dialogue/c02.dialogue", "res://asset/dialogue/inspect_content.dialogue", "res://asset/dialogue/npc.dialogue", "res://asset/dialogue/c03.dialogue", "res://asset/dialogue/c04.dialogue", "res://asset/dialogue/c05.dialogue", "res://asset/dialogue/c06.dialogue", "res://asset/dialogue/纯中文_无需本地化.dialogue")
+locale/translations_pot_files=PackedStringArray("res://asset/dialogue/item_description.dialogue", "res://asset/dialogue/c01.dialogue", "res://asset/dialogue/c02.dialogue", "res://asset/dialogue/inspect_content.dialogue", "res://asset/dialogue/npc.dialogue", "res://asset/dialogue/c03.dialogue", "res://asset/dialogue/c04.dialogue", "res://asset/dialogue/c05.dialogue", "res://asset/dialogue/c06.dialogue", "res://asset/dialogue/纯中文_无需本地化.dialogue", "res://asset/dialogue/event_stage.dialogue")
locale/test="zh-Hans"
locale/fallback="zh"
diff --git a/scene/effect/dizzy_shader.tscn b/scene/effect/dizzy_shader.tscn
index 9be782ac..b341cd35 100644
--- a/scene/effect/dizzy_shader.tscn
+++ b/scene/effect/dizzy_shader.tscn
@@ -12,6 +12,8 @@ shader_parameter/samples = 4
shader_parameter/angle_spread = 2.0
[node name="DizzyShader" type="CanvasLayer"]
+layer = 0
+visible = false
script = ExtResource("1_t0l4c")
[node name="TextureRect" type="TextureRect" parent="."]
diff --git a/scene/entity/ambush.gd b/scene/entity/ambush.gd
index 0f698529..cb4f5cee 100644
--- a/scene/entity/ambush.gd
+++ b/scene/entity/ambush.gd
@@ -101,23 +101,26 @@ func _ready() -> void:
ground_archive = ArchiveManager.archive.ground_archive()
played = ground_archive.get_value(name, "played", false)
played_time = 0.0
- _check_sign_status()
+ if on_first_enter_tree:
+ _do_trigger.call_deferred()
if played:
if GlobalConfig.DEBUG:
print("Ambush has played, name=", name, " one_shot=", one_shot)
if interacted_sign_texture:
sign_mark.sprite2d.texture = interacted_sign_texture
- if one_shot:
- return
sign_mark.interacted.connect(_interacted)
area2d.body_entered.connect(_entered)
area2d.area_entered.connect(_area_entered)
- if on_first_enter_tree:
- _do_trigger.call_deferred()
+ visibility_changed.connect(_visibility_changed)
+ _check_sign_status()
+
+
+func _visibility_changed():
+ _check_sign_status()
func _check_sign_status():
- sign_mark.enabled = enabled and (not played or not one_shot)
+ sign_mark.enabled = visible and enabled and (not played or not one_shot)
sign_mark.display_sign = trigger_mode == "interact"
diff --git a/scene/entity/interactable.gd b/scene/entity/interactable.gd
index 13aafbf5..2fcb3346 100644
--- a/scene/entity/interactable.gd
+++ b/scene/entity/interactable.gd
@@ -6,6 +6,7 @@ signal interacted
signal interacted_with_key(key)
# 交互 prop 不匹配
signal interact_mismatch_failed
+signal canceled
signal sign_mark_offset_updated
@@ -71,15 +72,15 @@ func _ready() -> void:
area2d.position.x = collision_width_and_x.y
if Engine.is_editor_hint():
return
- area2d.body_entered.connect(_reset)
- area2d.body_exited.connect(_on_cancel)
+ area2d.body_entered.connect(_on_entered)
+ area2d.body_exited.connect(_on_exited)
sign_snapper.action_on_arrived = action_key
if enable_snapper:
sign_snapper.arrived.connect(_pre_interacted)
else:
sign_snapper.enabled = false
sign_mark.interacted.connect(_pre_interacted)
- sign_mark.cancel.connect(_on_cancel)
+ sign_mark.cancel.connect(canceled.emit)
# setup default value
ground_archive = ArchiveManager.archive.ground_archive()
icount = ground_archive.get_value(name, "icount", 0)
@@ -87,13 +88,20 @@ func _ready() -> void:
if interacted_times and interacted_texture:
texture = interacted_texture
_check_sign_status()
+ visibility_changed.connect(_visibility_changed)
+
+
+func _visibility_changed():
+ _check_sign_status()
func _check_sign_status():
- sign_mark.enabled = enabled and (not one_shot or interacted_times < one_shot_max_times)
+ sign_mark.enabled = (
+ visible and enabled and (not one_shot or interacted_times < one_shot_max_times)
+ )
-func _reset(_body = null) -> void:
+func _on_entered(_body = null) -> void:
_reset_sign_testure_to_prop()
var prop_hud = SceneManager.get_prop_hud() as PropHud
if not prop_hud.current_item_changed.is_connected(_set_sign_texture_to_prop):
@@ -118,7 +126,8 @@ func _set_sign_texture_to_prop(_key):
# else:
# sign_mark.sprite2d.texture = unmatched_sign_texture
-func _on_cancel(_body = null) -> void:
+
+func _on_exited(_body = null) -> void:
# disconnect signal
var prop_hud = SceneManager.get_prop_hud() as PropHud
if prop_hud and prop_hud.current_item_changed.is_connected(_set_sign_texture_to_prop):
@@ -142,13 +151,14 @@ func is_key_matched(key) -> bool:
func _pre_interacted() -> void:
- SceneManager.player_action(action_key)
+ SceneManager.lock_player(0, action_key)
if icount == 0 and first_interact_os_key:
sign_mark.display_sign = false
SceneManager.pop_os_with_str(first_interact_os_key)
await SceneManager.get_player().os_finished
sign_mark.display_sign = true
_on_interacted()
+ SceneManager.unlock_player()
func _on_interacted() -> void:
diff --git a/scene/entity/note.gd b/scene/entity/note.gd
index 8c05a14c..7196eef1 100644
--- a/scene/entity/note.gd
+++ b/scene/entity/note.gd
@@ -13,7 +13,7 @@ signal sign_mark_offset_updated
set(val):
enabled = val
if is_node_ready():
- sign_mark.enabled = val
+ sign_mark.enabled = enabled and visible
@export var collision_width_and_x := Vector2(20.0, 0):
set(val):
collision_width_and_x = val
@@ -44,7 +44,7 @@ signal sign_mark_offset_updated
if is_node_ready() and Engine.is_editor_hint():
notify_property_list_changed()
var note_key := ""
-@export_enum("none", "notes", "c01", "c02", "c03", "c04", "c05") var title_filter := "none":
+@export_enum("c01", "c02", "c03", "c04", "c05", "c06") var title_filter := "c01":
set(val):
title_filter = val
if is_node_ready() and Engine.is_editor_hint():
@@ -63,7 +63,6 @@ var dialogue_c05 = preload("res://asset/dialogue/c05.dialogue")
var dialogue_c06 = preload("res://asset/dialogue/c06.dialogue")
var dialogue_res = dialogue_items
-var interacting = false
var mutex = Mutex.new()
var ground_archive: GroundArchive
@@ -83,20 +82,18 @@ func _ready() -> void:
if Engine.is_editor_hint():
notify_property_list_changed()
return
- area2d.body_entered.connect(_reset)
- area2d.body_exited.connect(_on_cancel)
sign_mark.interacted.connect(_on_interacted)
- sign_mark.cancel.connect(_on_cancel)
- sign_mark.enabled = enabled
-
# setup default value
ground_archive = ArchiveManager.archive.ground_archive()
icount = ground_archive.get_value(name, "icount", 0)
+ visibility_changed.connect(_visibility_changed)
+
+
+func _visibility_changed():
+ sign_mark.enabled = enabled and visible
func _on_interacted() -> void:
- if interacting:
- return
if not note_key:
printerr("Note key is not set")
return
@@ -119,14 +116,8 @@ func _on_interacted() -> void:
func _show_os():
- interacting = true
- create_tween().tween_property(sign_mark, "modulate:a", 0.0, 0.3)
SceneManager.pop_os_with_str(note_key)
SceneManager.player_action(action)
- await SceneManager.get_player().os_finished
- var tween = create_tween()
- tween.tween_property(sign_mark, "modulate:a", 1.0, 0.3)
- interacting = false
func _show_balloon(res, title):
@@ -135,13 +126,11 @@ func _show_balloon(res, title):
# note viewing animation
if GlobalConfig.DEBUG:
print("[" + name + "] call lock")
- SceneManager.freeze_player(0, action)
- interacting = true
+ SceneManager.lock_player(0, action)
await DialogueManager.dialogue_ended
if GlobalConfig.DEBUG:
print("[" + name + "] call lock")
- SceneManager.release_player()
- interacting = false
+ SceneManager.unlock_player()
func _set(property: StringName, value: Variant) -> bool:
@@ -165,7 +154,8 @@ func _get_property_list() -> Array[Dictionary]:
if Engine.is_editor_hint():
var title_arr = []
if dialogue == "items":
- var id = dialogue_items.titles["Notes"]
+ var title = "Notes_" + title_filter
+ var id = dialogue_items.titles[title]
var current_line = dialogue_items.lines[id]
while current_line:
if current_line.has("translation_key"):
@@ -175,11 +165,7 @@ func _get_property_list() -> Array[Dictionary]:
current_line = dialogue_items.lines[current_line.next_id]
else:
title_arr = dialogue_res.get_ordered_titles()
- if title_filter and title_filter != "none":
- var filted_titles = title_arr.filter(_filter_property)
- titles = ",".join(filted_titles)
- else:
- titles = ",".join(title_arr)
+ titles = ",".join(title_arr)
return [
{
"name": "note_key",
@@ -188,15 +174,3 @@ func _get_property_list() -> Array[Dictionary]:
"hint_string": titles
}
]
-
-
-func _filter_property(property: StringName) -> bool:
- return property.find(title_filter) >= 0
-
-
-func _on_cancel(_body = null):
- interacting = false
-
-
-func _reset(_body):
- interacting = false
diff --git a/scene/entity/pickable.gd b/scene/entity/pickable.gd
index 26837f63..e08257e8 100644
--- a/scene/entity/pickable.gd
+++ b/scene/entity/pickable.gd
@@ -73,7 +73,11 @@ func _ready() -> void:
if GlobalConfig.DEBUG:
print("Prop has picked, name=", name, " key=", prop_key)
sign_snapper.arrived.connect(_interacted)
- sign_mark.enabled = enabled
+ _check_display()
+ visibility_changed.connect(_visibility_changed)
+
+
+func _visibility_changed():
_check_display()
@@ -82,7 +86,7 @@ func _check_display():
visible = false
elif visible_follow_enabled:
visible = enabled
- sign_mark.enabled = enabled
+ sign_mark.enabled = enabled and visible
func _get_animation_player() -> AnimationPlayer:
diff --git a/scene/entity/portal.gd b/scene/entity/portal.gd
index a52de1f8..57f84994 100644
--- a/scene/entity/portal.gd
+++ b/scene/entity/portal.gd
@@ -81,6 +81,7 @@ var icount: int:
icount = val
ground_archive.set_pair(name, "icount", val)
+
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
name = "portal_" + portal_name
@@ -101,6 +102,11 @@ func _ready() -> void:
area2d.body_exited.connect(_on_cancel)
sign_snapper.arrived.connect(_on_interacted)
sign_mark.cancel.connect(_on_cancel)
+ visibility_changed.connect(_visibility_changed)
+
+
+func _visibility_changed():
+ _check_sign_mark_and_texture()
func _reload_items() -> void:
@@ -118,7 +124,7 @@ func _reload_items() -> void:
func _check_sign_mark_and_texture():
if not is_node_ready():
- return
+ return
# 切换自身 texture
if status == "opened" and opened_texture:
texture = opened_texture
diff --git a/scene/ground/scene/animation_root.gd b/scene/ground/scene/animation_root.gd
index ccde6576..232332e3 100644
--- a/scene/ground/scene/animation_root.gd
+++ b/scene/ground/scene/animation_root.gd
@@ -13,6 +13,7 @@ var dialogue_c06 := preload("res://asset/dialogue/c06.dialogue") as DialogueReso
# 首次进入场景时触发
"oneshot_animation_played": false
}
+@export_tool_button("reset 存档") var reset_archive = _reset_archive
# event 也混合其中
@export var debug_global_data: Dictionary[String, Variant] = {
"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"],
@@ -21,7 +22,6 @@ var dialogue_c06 := preload("res://asset/dialogue/c06.dialogue") as DialogueReso
@export var debug_ground_data: Dictionary[String, Variant] = {}
@export var auto_reset_on_debug_restarting := false
-@export_tool_button("reset 存档") var reset_archive = _reset_archive
var oneshot_animation := ""
var ground_archive: GroundArchive
@@ -65,95 +65,6 @@ func _ready() -> void:
ready.connect(_on_ready)
-func _reset_archive() -> void:
- var archive = (
- ResourceLoader.load("user://data/archives/save000.tres", "AssembledArchive")
- as AssembledArchive
- )
- archive.player_global_position_x = debug_global_data.get_or_add("player_x", 30.0)
- # 重置全局变量
- var prop_arr = archive.prop_inventory.default_enabled_items
- if get_node("../MainPlayer").character.begins_with("吕萍"):
- prop_arr = archive.prop_inventory.xdie_enabled_items
- elif get_node("../MainPlayer").character.begins_with("小小蝶"):
- prop_arr = archive.prop_inventory.xxdie_enabled_items
- elif get_node("../MainPlayer").character.begins_with("小小小蝶"):
- prop_arr = archive.prop_inventory.xxxdie_enabled_items
- for prop in debug_global_data["enabled_items"]:
- if not prop_arr.has(prop):
- prop_arr.append(prop)
- # 从 code 中找到 set_global_entry/get_global_value 方法中第一个 property
- var code = get_script().source_code
- # set_global_entry(property: StringName, value)
- # get_global_value(property: StringName, default = null)
- var setter_regx = RegEx.create_from_string(r'set_global_entry\(.?"(.+)"') as RegEx
- var getter_regx = RegEx.create_from_string(r'get_global_value\(.?"(.+)"') as RegEx
- var properties = {}
- for setter_match in setter_regx.search_all(code):
- properties[(setter_match as RegExMatch).get_string(1)] = true
- for getter_match in getter_regx.search_all(code):
- properties[(getter_match as RegExMatch).get_string(1)] = true
- for p in properties.keys():
- if debug_global_data.get(p) == null:
- debug_global_data[p] = 0
- # archive.set_global_entry(p, new_data[p])
- archive.global_data_dict[p] = debug_global_data[p]
- # 重置 ground_archive
- if not archive.ground_archives.has(ground.scene_name):
- archive.ground_archives[ground.scene_name] = GroundArchive.new()
- archive.ground_archives[ground.scene_name].scene_name = ground.scene_name
- # setup
- _setup_ground_data(debug_ground_data, ground)
- archive.ground_archives[ground.scene_name].data = debug_ground_data
- # 重置 event 状态
- # EventManager.set_stage(&"c02_burning_end", 2)
- # EventManager.set_stage_if_greater("handnote_stage", 5)
- var event_setter_regx = RegEx.create_from_string(r'EventManager.set_stage\(.?"(.+)"') as RegEx
- var event_getter_regx = RegEx.create_from_string(r'EventManager.get_stage\(.?"(.+)"') as RegEx
- var event_set_greater_regx = (
- RegEx.create_from_string(r'set_stage_if_greater\(.?"(.+)"') as RegEx
- )
- var events = {}
- for event_match in event_setter_regx.search_all(code):
- events[(event_match as RegExMatch).get_string(1)] = true
- for event_match in event_set_greater_regx.search_all(code):
- events[(event_match as RegExMatch).get_string(1)] = true
- for event_match in event_getter_regx.search_all(code):
- events[(event_match as RegExMatch).get_string(1)] = true
- # 遍历 ".." 下所有节点,找到属于 Event2D 的节点
- _find_event2d(events, ground)
- for e in events.keys():
- if debug_global_data.get(e) == null:
- debug_global_data[e] = 0
- archive.event_stage[e] = debug_global_data[e]
- print("reset archive data success")
- ResourceSaver.save(archive)
- notify_property_list_changed()
-
-
-func _setup_ground_data(g_data: Dictionary[String, Variant], node: Node):
- if not node:
- return
- for child in node.get_children():
- if child is Ambush2D and not g_data.has(child.name):
- g_data[child.name] = {"played": false}
- elif child is Interactable2D and not g_data.has(child.name):
- g_data[child.name] = {"interacted_times": 0}
- elif child is Pickable2D and not g_data.has(child.name):
- g_data[child.name] = {"picked": false}
- elif child is AnimationRoot and not g_data.has(child.name):
- g_data[child.name] = child.data
- _setup_ground_data(g_data, child)
-
-
-func _find_event2d(events: Dictionary, node: Node) -> void:
- if not node:
- return
- for child in node.get_children():
- if child is Event2D:
- events[child.event] = true
- _find_event2d(events, child)
-
func _on_ground_ready() -> void:
pass
@@ -219,3 +130,98 @@ func _get_property_list() -> Array[Dictionary]:
"hint_string": ",".join(get_animation_list()),
}
]
+
+
+###### TOOL BUTTON
+
+func _reset_archive() -> void:
+ var archive = (
+ ResourceLoader.load("user://data/archives/save000.tres", "AssembledArchive")
+ as AssembledArchive
+ )
+ archive.player_global_position_x = debug_global_data.get_or_add("player_x", 30.0)
+ # 重置全局变量
+ var prop_arr = archive.prop_inventory.default_enabled_items
+ if get_node("../MainPlayer").character.begins_with("吕萍"):
+ prop_arr = archive.prop_inventory.xdie_enabled_items
+ elif get_node("../MainPlayer").character.begins_with("小小蝶"):
+ prop_arr = archive.prop_inventory.xxdie_enabled_items
+ elif get_node("../MainPlayer").character.begins_with("小小小蝶"):
+ prop_arr = archive.prop_inventory.xxxdie_enabled_items
+ for prop in debug_global_data["enabled_items"]:
+ if not prop_arr.has(prop):
+ prop_arr.append(prop)
+ # 从 code 中找到 set_global_entry/get_global_value 方法中第一个 property
+ var code = get_script().source_code
+ # set_global_entry(property: StringName, value)
+ # get_global_value(property: StringName, default = null)
+ var setter_regx = RegEx.create_from_string(r'set_global_entry\(.?"(.+)"') as RegEx
+ var getter_regx = RegEx.create_from_string(r'get_global_value\(.?"(.+)"') as RegEx
+ var properties = {}
+ for setter_match in setter_regx.search_all(code):
+ properties[(setter_match as RegExMatch).get_string(1)] = true
+ for getter_match in getter_regx.search_all(code):
+ properties[(getter_match as RegExMatch).get_string(1)] = true
+ for p in properties.keys():
+ if debug_global_data.get(p) == null:
+ debug_global_data[p] = false
+ # archive.set_global_entry(p, new_data[p])
+ archive.global_data_dict[p] = debug_global_data[p]
+ # 重置 ground_archive
+ if not archive.ground_archives.has(ground.scene_name):
+ archive.ground_archives[ground.scene_name] = GroundArchive.new()
+ archive.ground_archives[ground.scene_name].scene_name = ground.scene_name
+ # setup
+ _setup_ground_data(debug_ground_data, ground)
+ archive.ground_archives[ground.scene_name].data = debug_ground_data
+ # 重置 event 状态
+ # EventManager.set_stage(&"c02_burning_end_stage", 2)
+ # EventManager.set_stage_if_greater("handnote_stage", 5)
+ var event_setter_regx = RegEx.create_from_string(r'EventManager.set_stage\(.?"(.+)"') as RegEx
+ var event_getter_regx = RegEx.create_from_string(r'EventManager.get_stage\(.?"(.+)"') as RegEx
+ var event_set_greater_regx = (
+ RegEx.create_from_string(r'set_stage_if_greater\(.?"(.+)"') as RegEx
+ )
+ var events = {}
+ for event_match in event_setter_regx.search_all(code):
+ events[(event_match as RegExMatch).get_string(1)] = true
+ for event_match in event_set_greater_regx.search_all(code):
+ events[(event_match as RegExMatch).get_string(1)] = true
+ for event_match in event_getter_regx.search_all(code):
+ events[(event_match as RegExMatch).get_string(1)] = true
+ # 遍历 ".." 下所有节点,找到属于 Event2D 的节点
+ _find_event2d(events, ground)
+ for e in events.keys():
+ if debug_global_data.get(e) == null:
+ debug_global_data[e] = 0
+ archive.event_stage[e] = debug_global_data[e]
+ print("reset archive data success")
+ ResourceSaver.save(archive)
+ notify_property_list_changed()
+
+
+func _setup_ground_data(g_data: Dictionary[String, Variant], node: Node):
+ if not node:
+ return
+ for child in node.get_children():
+ if child is Ambush2D and not g_data.has(child.name):
+ g_data[child.name] = {"played": false}
+ elif child is Interactable2D and not g_data.has(child.name):
+ g_data[child.name] = {"interacted_times": 0}
+ elif child is Pickable2D and not g_data.has(child.name):
+ g_data[child.name] = {"picked": false}
+ elif child is AnimationRoot and not g_data.has(child.name):
+ g_data[child.name] = child.data
+ _setup_ground_data(g_data, child)
+
+
+func _find_event2d(events: Dictionary, node: Node) -> void:
+ if not node:
+ return
+ for child in node.get_children():
+ if child is Event2D:
+ if child.event != &"":
+ events[child.event] = true
+ if child.pre_event != &"":
+ events[child.pre_event] = true
+ _find_event2d(events, child)
diff --git a/scene/ground/scene/c02/s02_过道.gd b/scene/ground/scene/c02/s02_过道.gd
index f3534ef0..d744af40 100644
--- a/scene/ground/scene/c02/s02_过道.gd
+++ b/scene/ground/scene/c02/s02_过道.gd
@@ -6,6 +6,11 @@ var paper_man: Ambush2D
var music_box: Closeup2D
var flyer
+# 用于 reset 存档
+# ArchiveManager.get_global_value(&"c02_musicbox_pic_taken")
+# ArchiveManager.get_global_value(&"c02_musicbox_danzhu_taken")
+# ArchiveManager.get_global_value(&"c02_musicbox_xiaomao_taken")
+# ArchiveManager.get_global_value(&"c02_musicbox_xiaochan_taken")
# 覆盖该方法
func _default_data() -> Dictionary:
@@ -28,7 +33,8 @@ func _on_ground_ready() -> void:
else:
_oneshot_wind.call_deferred()
paper_man = $"../DeployLayer/Ambush纸人"
- if 5 <= ArchiveManager.get_global_value(&"c02_musicbox_stage", 0):
+ # 0:关闭 1:打开 2:放入小蝉人偶 3:全部放置正确_可摇手柄 4:已播放完成
+ if 4 <= EventManager.get_stage(&"c02_musicbox_stage"):
_display_paper_man(false)
else:
paper_man.get_node("wall/CollisionShape2D").disabled = true
@@ -102,7 +108,7 @@ func _on_blink_finished(blink_sprite):
func _on_music_box_exited(_arg):
- if 5 <= ArchiveManager.get_global_value(&"c02_musicbox_stage"):
+ if 4 <= EventManager.get_stage(&"c02_musicbox_stage"):
_display_paper_man(false)
# _display_paper_man(true)
diff --git a/scene/ground/scene/c02/s02_过道.tscn b/scene/ground/scene/c02/s02_过道.tscn
index e37d5d0b..f40d7241 100644
--- a/scene/ground/scene/c02/s02_过道.tscn
+++ b/scene/ground/scene/c02/s02_过道.tscn
@@ -63,7 +63,52 @@ data = {
"oneshot_animation_played": false
}
debug_global_data = Dictionary[String, Variant]({
-"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"]
+"c02_musicbox_danzhu_taken": false,
+"c02_musicbox_pic_taken": false,
+"c02_musicbox_stage": 0,
+"c02_musicbox_xiaochan_taken": false,
+"c02_musicbox_xiaomao_taken": false,
+"c02_s02_mouse_push_shoe": false,
+"enabled_items": ["prop_火柴", "prop_木头人偶", "prop_银元"],
+"player_x": 530.0
+})
+debug_ground_data = Dictionary[String, Variant]({
+"Ambush太暗了": {
+"played": false
+},
+"Ambush小蝉闪现": {
+"played": false
+},
+"Ambush推小鞋子": {
+"played": false
+},
+"Ambush杂物堆": {
+"played": false
+},
+"Ambush纸人": {
+"played": false
+},
+"AnimationPlayer": {
+"display_paper_man": false,
+"first_enter": false,
+"flyer_shaven": false,
+"oneshot_animation_played": false
+},
+"Closeup八音盒": {
+"interacted_times": 0
+},
+"Closeup刮海报": {
+"interacted_times": 0
+},
+"InteractableLeftPortal": {
+"interacted_times": 0
+},
+"Interactable小鞋子": {
+"interacted_times": 0
+},
+"煤油灯": {
+"interacted_times": 0
+}
})
oneshot_animation = ""
diff --git a/scene/ground/scene/c02/s03_院子.gd b/scene/ground/scene/c02/s03_院子.gd
index e9f35a31..43904ebc 100644
--- a/scene/ground/scene/c02/s03_院子.gd
+++ b/scene/ground/scene/c02/s03_院子.gd
@@ -48,7 +48,7 @@ func _on_ground_ready() -> void:
if not ArchiveManager.get_global_value(&"c02_burning"):
# 点燃前
counter.enabled = true
- elif EventManager.get_stage(&"c02_burning_end") == 2:
+ elif EventManager.get_stage(&"c02_burning_end_stage") == 2:
# 离开后
counter.visible = false
@@ -56,7 +56,7 @@ func _on_ground_ready() -> void:
# 点燃后~离开前
if (
ArchiveManager.get_global_value(&"c02_burning")
- and not EventManager.get_stage(&"c02_burning_end") == 2
+ and not EventManager.get_stage(&"c02_burning_end_stage") == 2
):
new_bg.modulate.a = 1.0
# 火灾开始后,无需 enable
@@ -68,7 +68,7 @@ func _on_ground_ready() -> void:
madman_npc.visible = false
# c02_madman_hitwall 之后, c02_ball_game_stage==3(游戏结束) 之前;同时 eavesdrop_finished
if (
- ArchiveManager.get_global_value(&"c02_ball_game_stage", 0) < 3
+ EventManager.get_stage(&"c02_ball_game_stage") < 3
# and ArchiveManager.get_global_value(&"c02_eavesdrop_finished")
):
if not ArchiveManager.get_global_value("c02_watched_the_well"):
@@ -111,7 +111,7 @@ func _on_ground_ready() -> void:
bully_layer = $"../DeployLayer/霸凌"
burning_layer = $"../DeployLayer/火灾"
- if ArchiveManager.get_global_value(&"c02_ball_game_stage", 0) >= 3:
+ if EventManager.get_stage(&"c02_ball_game_stage") >= 3:
_setup_bully_or_burning(true)
@@ -194,7 +194,7 @@ func _setup_bully_or_burning(reenter_scene := false):
# 弹珠游戏结束后就开始霸凌,此时禁止偷听。第一章结束后(火灾结束),第二章再偷听
$"../DeployLayer/Ambush偷听对话".enabled = false
eavesdrop_window.visible = false
- if EventManager.get_stage(&"c02_burning_end") == 2:
+ if EventManager.get_stage(&"c02_burning_end_stage") == 2:
# 火灾演出完全结束
burning_layer.visible = false
bully_layer.visible = false
@@ -328,6 +328,6 @@ func run_away():
tween.tween_property(node, "global_position:x", 20.0, 18.0)
await tween.finished
# 1: 牵手跑结束; 2: 谢幕演出结束
- EventManager.set_stage(&"c02_burning_end", 1)
+ EventManager.set_stage(&"c02_burning_end_stage", 1)
camera.force_offset.x = 0.0
SceneManager.get_ground_loader().transition_to_scene("c02_s06", "right")
diff --git a/scene/ground/scene/c02/s03_院子.tscn b/scene/ground/scene/c02/s03_院子.tscn
index ef5c9a23..81393353 100644
--- a/scene/ground/scene/c02/s03_院子.tscn
+++ b/scene/ground/scene/c02/s03_院子.tscn
@@ -288,11 +288,11 @@ data = {
debug_global_data = Dictionary[String, Variant]({
"c02_ball_game_stage": 1,
"c02_burning": false,
-"c02_burning_end": 0,
+"c02_burning_end_stage": 0,
"c02_counter_pushed_out": false,
"c02_eavesdrop_finished": false,
"c02_madman_hitwall": false,
-"c02_madman_interacted": false,
+"c02_madman_interacted": 0,
"c02_open_gate_first_failed": false,
"c02_ready_to_fire": false,
"c02_the_blind_room_unlocked": false,
@@ -584,7 +584,7 @@ texture = ExtResource("8_plfv5")
[node name="Event2D小蝉哼歌" type="Node2D" parent="Ground/DeployLayer" index="15"]
position = Vector2(800, -173)
script = ExtResource("26_o1qbs")
-event = "c02_madman_interacted"
+event = &"c02_madman_interacted"
metadata/_custom_type_script = "uid://bkkiyk5jkdw4d"
[node name="Sfx2D小蝉哼歌" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Event2D小蝉哼歌"]
diff --git a/scene/ground/scene/c02/s05_一楼内侧楼道.tscn b/scene/ground/scene/c02/s05_一楼内侧楼道.tscn
index d24b556c..ee56c377 100644
--- a/scene/ground/scene/c02/s05_一楼内侧楼道.tscn
+++ b/scene/ground/scene/c02/s05_一楼内侧楼道.tscn
@@ -331,6 +331,7 @@ autoplay = "default"
position = Vector2(627.8, 66.8)
color = Color(0.999971, 0.912551, 0.842208, 1)
energy = 1.2
+blend_mode = 2
texture = ExtResource("22_laquj")
texture_scale = 0.3
@@ -351,7 +352,7 @@ flip_h = true
[node name="Event2D小蝉哼歌" type="Node2D" parent="Ground/DeployLayer" index="18"]
position = Vector2(92, 38)
script = ExtResource("23_4c54f")
-event = "c02_madman_interacted"
+event = &"c02_madman_interacted"
metadata/_custom_type_script = "uid://bkkiyk5jkdw4d"
[node name="Sfx2D小蝉哼歌" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Event2D小蝉哼歌"]
@@ -366,8 +367,6 @@ loop = true
metadata/_custom_type_script = "uid://wapo47a1oddf"
[node name="DizzyShader" parent="Ground/DeployLayer" index="19" instance=ExtResource("29_74b3r")]
-layer = 0
-visible = false
[node name="MainPlayer" parent="Ground" index="5"]
position = Vector2(41, 98)
diff --git a/scene/ground/scene/c02/s06_二楼.gd b/scene/ground/scene/c02/s06_二楼.gd
index de8c6660..1212eb57 100644
--- a/scene/ground/scene/c02/s06_二楼.gd
+++ b/scene/ground/scene/c02/s06_二楼.gd
@@ -25,7 +25,7 @@ func _on_ground_ready() -> void:
if (
ArchiveManager.get_global_value(&"c02_burning")
# 1: 牵手跑结束; 2: 谢幕演出结束
- and EventManager.get_stage(&"c02_burning_end") == 1
+ and EventManager.get_stage(&"c02_burning_end_stage") == 1
):
# 禁止再回到瞎子卧室
ArchiveManager.set_global_entry(&"c02_the_blind_room_unlocked", false)
@@ -57,10 +57,10 @@ func _on_ground_ready() -> void:
$"../DeployLayer/portal_1".status = "opened"
ball_game_boys_ambush = $"../DeployLayer/Ambush三男孩"
- # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束
+ # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3/4:游戏结束
if (
ArchiveManager.get_global_value(&"c02_the_blind_room_unlocked", false)
- and ArchiveManager.get_global_value(&"c02_ball_game_stage", 0) < 3
+ and EventManager.get_stage(&"c02_ball_game_stage") < 3
):
# 进入瞎子卧室后,可开始弹珠游戏
ball_game_boys_ambush.enabled = true
@@ -105,9 +105,9 @@ func _on_mice_hole_interacted():
func boys_ball_game() -> void:
# 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束
- var stage = ArchiveManager.get_global_value(&"c02_ball_game_stage", 0)
+ var stage = EventManager.get_stage(&"c02_ball_game_stage")
if stage == 0:
- ArchiveManager.set_global_entry(&"c02_ball_game_stage", 1)
+ EventManager.set_stage(&"c02_ball_game_stage", 1)
ArchiveManager.set_global_entry(&"c02_pliers_to_ball", true)
SceneManager.lock_player()
DialogueManager.show_dialogue_balloon(dialogue_c02, "c02_s05_三男孩弹珠游戏1")
@@ -175,7 +175,7 @@ func _on_exit_final_show(_arg):
c02_final_layer.queue_free()
SceneManager.release_player()
# 1: 牵手跑结束; 2: 谢幕演出结束
- EventManager.set_stage(&"c02_burning_end", 2)
+ EventManager.set_stage(&"c02_burning_end_stage", 2)
EventManager.set_stage_if_greater("handnote_stage", 5)
# TODO 小蝉上楼后开启第二章
ArchiveManager.archive.set_chapter_if_greater(3)
diff --git a/scene/ground/scene/c02/s06_二楼.tscn b/scene/ground/scene/c02/s06_二楼.tscn
index abeee5a0..6554c1c6 100644
--- a/scene/ground/scene/c02/s06_二楼.tscn
+++ b/scene/ground/scene/c02/s06_二楼.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=49 format=3 uid="uid://cootarwb44vvh"]
+[gd_scene load_steps=51 format=3 uid="uid://cootarwb44vvh"]
[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"]
@@ -34,6 +34,8 @@
[ext_resource type="AudioStream" uid="uid://bxp3f263aaqkp" path="res://asset/audio/sfx/脚步/02_室外_1.wav" id="29_tqnu8"]
[ext_resource type="AudioStream" uid="uid://d3h0xe0qtai18" path="res://asset/audio/sfx/脚步/02_室外_2.wav" id="30_r7b2r"]
[ext_resource type="AudioStream" uid="uid://dwa7xdvg5o0i" path="res://asset/audio/sfx/脚步/02_室外_3.wav" id="31_rpn6g"]
+[ext_resource type="Script" uid="uid://cny3n681h2588" path="res://scene/ground/script/c02/event_2d叼纸小猫.gd" id="35_h3h1a"]
+[ext_resource type="PackedScene" uid="uid://dsa6frlw6e6gg" path="res://scene/entity/pickable.tscn" id="36_3u30v"]
[ext_resource type="Texture2D" uid="uid://ca3km2f6ncrqo" path="res://asset/art/scene/c02/s06_二楼楼道/e_小蝉偷看.png" id="37_osg51"]
[sub_resource type="Animation" id="Animation_k01ve"]
@@ -847,16 +849,17 @@ libraries = {
}
script = ExtResource("2_4dg6u")
debug_global_data = Dictionary[String, Variant]({
-"c02_ball_game_stage": 1,
-"c02_burning": true,
-"c02_burning_end": 1,
+"c02_ball_game_stage": 2,
+"c02_burning": false,
+"c02_burning_end_stage": 1,
"c02_madman_hitwall": false,
"c02_mouse_follow_player": false,
"c02_pliers_to_ball": false,
"c02_s02_mouse_push_shoe": false,
"c02_the_blind_room_unlocked": true,
-"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"],
-"handnote_stage": 0
+"enabled_items": ["prop_火柴", "prop_院长的信", "prop_弹珠"],
+"handnote_stage": 0,
+"player_x": 30.0
})
debug_ground_data = Dictionary[String, Variant]({
"Ambush三男孩": {
@@ -865,6 +868,9 @@ debug_ground_data = Dictionary[String, Variant]({
"Ambush小蝉偷看": {
"played": true
},
+"AnimationPlayer": {
+"oneshot_animation_played": false
+},
"Closeup弹珠游戏": {
"interacted_times": 0
},
@@ -877,6 +883,9 @@ debug_ground_data = Dictionary[String, Variant]({
"Interactable老鼠洞": {
"interacted_times": 0
},
+"Pickable小猫纸条": {
+"picked": false
+},
"煤油灯": {
"interacted_times": 0
},
@@ -933,10 +942,9 @@ status = "locked"
[node name="portal_2" parent="Ground/DeployLayer" index="3" instance=ExtResource("4_haidv")]
position = Vector2(222, 14)
debug_note = "瞎子理发店"
+enabled = false
portal_name = "2"
target_scene = "c03_s01"
-holding = true
-holding_reason_key = "c02_杂物堆堵住"
prop_key = "prop_2014钥匙"
[node name="楼道杂物堆" type="Sprite2D" parent="Ground/DeployLayer" index="4"]
@@ -969,12 +977,6 @@ position = Vector2(616, -14)
ground_light_texture = ExtResource("8_7x2h6")
ground_height_offset = 15.0
-[node name="SfxInvalid" parent="Ground/DeployLayer/煤油灯" index="0"]
-process_mode = 0
-
-[node name="SfxSuccess" parent="Ground/DeployLayer/煤油灯" index="1"]
-process_mode = 0
-
[node name="CollisionShape2D" parent="Ground/DeployLayer/煤油灯/Area2D" index="0"]
shape = SubResource("RectangleShape2D_lh55k")
@@ -996,12 +998,6 @@ disable_prop_after_interacted = true
prop_key = "prop_小鞋子1"
prop_key2 = "prop_小鞋子2"
-[node name="SfxInvalid" parent="Ground/DeployLayer/Interactable老鼠洞" index="0"]
-process_mode = 0
-
-[node name="SfxSuccess" parent="Ground/DeployLayer/Interactable老鼠洞" index="1"]
-process_mode = 0
-
[node name="CollisionShape2D" parent="Ground/DeployLayer/Interactable老鼠洞/Area2D" index="0"]
shape = SubResource("RectangleShape2D_7kxvk")
@@ -1035,6 +1031,7 @@ action_configs = Array[Dictionary]([{
}])
[node name="疯子撞墙Sfx2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/疯子撞墙"]
+process_mode = 1
position = Vector2(5, 28)
stream = SubResource("AudioStreamRandomizer_wywax")
volume_db = 10.0
@@ -1160,6 +1157,7 @@ move_configs = Array[Dictionary]([{
debug_mov_animation = "方瞎子走路-左"
[node name="Sfx2D脚步声" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/c02_final/瞎子"]
+process_mode = 1
position = Vector2(-39, -20)
stream = SubResource("AudioStreamRandomizer_4ndyv")
bus = &"game_sfx"
@@ -1187,6 +1185,23 @@ texture = ExtResource("37_osg51")
collision_width_and_x = Vector2(150, 0)
hook_method = "glimpse_hide_out"
+[node name="Event2D叼纸小猫" type="Node2D" parent="Ground/DeployLayer" index="19"]
+position = Vector2(164, 42)
+script = ExtResource("35_h3h1a")
+event = &"c02_ball_game_stage"
+hide_if_on_stage = Array[int]([0, 1, 2, 4])
+metadata/_custom_type_script = "uid://bkkiyk5jkdw4d"
+
+[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Ground/DeployLayer/Event2D叼纸小猫"]
+position = Vector2(0, 15)
+sprite_frames = ExtResource("10_och2w")
+animation = &"叼纸小猫坐着呼吸"
+autoplay = "叼纸小猫坐着呼吸"
+
+[node name="Pickable小猫纸条" parent="Ground/DeployLayer/Event2D叼纸小猫" instance=ExtResource("36_3u30v")]
+position = Vector2(-3, 2)
+prop_key = "prop_小猫纸条"
+
[node name="MainPlayer" parent="Ground" index="5"]
position = Vector2(63, 95)
catty_light_energy = 0.5
diff --git a/scene/ground/scene/c02/s10_空房间.gd b/scene/ground/scene/c02/s10_空房间.gd
index ec469428..b10d36ed 100644
--- a/scene/ground/scene/c02/s10_空房间.gd
+++ b/scene/ground/scene/c02/s10_空房间.gd
@@ -112,16 +112,17 @@ func _on_xiao_chan_interacted() -> void:
wood_puppet.enabled = true
wood_puppet.modulate.a = 0
# 小蝉丢下木头人偶并消失
- SceneManager.freeze_player(0)
+ SceneManager.lock_player()
xiao_chan_sprite.play()
var tween = create_tween()
tween.tween_interval(1.0)
tween.tween_property(wood_puppet, "modulate:a", 1.0, 1.0)
- await xiao_chan_sprite.animation_finished
- tween = create_tween()
- tween.tween_property(xiao_chan_sprite, "modulate:a", 0.0, 1.0)
- counter.enabled = true
- SceneManager.release_player()
+ await tween.finished
+ SceneManager.unlock_player()
+ xiao_chan_sprite.animation_finished.connect(func():
+ create_tween().tween_property(xiao_chan_sprite, "modulate:a", 0.0, 1.0)
+ counter.enabled = true
+ )
func _on_pick_wood_puppet() -> void:
@@ -135,9 +136,13 @@ func _on_leave_room():
SceneManager.pop_debug_dialog_info("美术", "玩家将箱子推出房间")
-var pushing_counter = false
+var pushing_counter = false:
+ set(value):
+ pushing_counter = value
+ if GlobalConfig.DEBUG:
+ print("pushing_counter:", pushing_counter)
var counter_pushed_out = false
-
+var walking = false
func _on_counter_interacted():
var player = SceneManager.get_player() as MainPlayer
@@ -154,10 +159,12 @@ func _on_counter_interacted():
var x = counter.global_position.x - player_pull_offset_x
# 走到左侧,自动 freeze/release
player.walk_to_x(x).tween_callback(func():
+ walking = false
player.character = "吕萍推柜子"
player.lock_move_right = true
SceneManager.pop_center_notification(tr("ui_press_q_to_exit"))
)
+ walking = true
player.position_updated.connect(on_player_moved_counter)
pushing_counter = !pushing_counter
@@ -170,9 +177,9 @@ func on_player_moved_counter(global_pos: Vector2):
func _unhandled_input(event: InputEvent) -> void:
- if event.is_action_pressed("cancel") and pushing_counter:
- _on_counter_interacted()
+ if event.is_action_pressed("cancel") and not walking and pushing_counter:
get_viewport().set_input_as_handled()
+ _on_counter_interacted()
# 柜子移动后,检查是否展示后面的洞
@@ -210,6 +217,7 @@ func _on_pick_catty_head() -> void:
await SceneManager.get_inspector().quit_and_hidden
SceneManager.pop_os_with_str("c02_获得小猫玩具")
$"Sfx头痛耳鸣".play()
+ $"../DizzyShader".dizzy()
SceneManager.player_action(17, true)
await SceneManager.get_player().animation_finished
SceneManager.unlock_player()
diff --git a/scene/ground/scene/c02/s10_空房间.tscn b/scene/ground/scene/c02/s10_空房间.tscn
index e5ad12ad..24743e27 100644
--- a/scene/ground/scene/c02/s10_空房间.tscn
+++ b/scene/ground/scene/c02/s10_空房间.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=33 format=3 uid="uid://dny21yhtuteap"]
+[gd_scene load_steps=34 format=3 uid="uid://dny21yhtuteap"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_w7j0m"]
[ext_resource type="Script" uid="uid://dkkey7qillk15" path="res://scene/ground/scene/c02/s10_空房间.gd" id="2_egtqi"]
@@ -25,6 +25,7 @@
[ext_resource type="Texture2D" uid="uid://ce3kclg1i81l3" path="res://asset/art/scene/c02/s02_大门过道/e_头套(场景中).png" id="17_6uftv"]
[ext_resource type="PackedScene" uid="uid://bffqprfmpt0bx" path="res://scene/ground/script/c02/空房间小蝉头套.tscn" id="18_5t4pt"]
[ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="18_8cwaw"]
+[ext_resource type="PackedScene" uid="uid://decfqoe5v0y6n" path="res://scene/effect/dizzy_shader.tscn" id="26_3kyh4"]
[sub_resource type="AtlasTexture" id="AtlasTexture_chbaa"]
atlas = ExtResource("15_kqj5r")
@@ -91,7 +92,8 @@ debug_global_data = Dictionary[String, Variant]({
"c02_counter_pushed_out": false,
"c02_counter_x": -1.0,
"c02_the_blind_room_unlocked": false,
-"enabled_items": ["prop_火柴", "prop_无头小猫玩具", "prop_木头人偶"]
+"enabled_items": ["prop_火柴", "prop_无头小猫玩具", "prop_木头人偶"],
+"player_x": 30.0
})
debug_ground_data = Dictionary[String, Variant]({
"Ambush首次进入血脚印": {
@@ -186,6 +188,7 @@ frame_progress = 0.72851
position = Vector2(271, 60.1423)
color = Color(0.999971, 0.912551, 0.842208, 1)
energy = 1.2
+blend_mode = 2
texture = ExtResource("15_e24j0")
texture_scale = 0.3
@@ -213,6 +216,7 @@ position = Vector2(344, -39)
texture = ExtResource("17_6uftv")
packed_scene = ExtResource("18_5t4pt")
sign_mark_offset = Vector2(4.37, 46.38)
+first_interact_os_key = "c02_互动小蝉头套"
[node name="Interactable柜子" parent="Ground/DeployLayer" index="8" instance=ExtResource("5_ylhfc")]
position = Vector2(364, 55)
@@ -308,4 +312,6 @@ visible = false
energy = 0.9
blend_mode = 1
+[node name="DizzyShader" parent="Ground" instance=ExtResource("26_3kyh4")]
+
[editable path="Ground"]
diff --git a/scene/ground/script/c02/event_2d叼纸小猫.gd b/scene/ground/script/c02/event_2d叼纸小猫.gd
new file mode 100644
index 00000000..b059848b
--- /dev/null
+++ b/scene/ground/script/c02/event_2d叼纸小猫.gd
@@ -0,0 +1,30 @@
+@tool
+extends Event2D
+
+# var prev_stage := 0
+# var stage := 0
+
+
+func _ready() -> void:
+ super._ready()
+ if Engine.is_editor_hint():
+ return
+
+
+func _on_global_stage_updated(e: StringName, s: int):
+ super._on_global_stage_updated(e, s)
+
+
+func _on_ground_ready(ground: Ground2D):
+ if $"Pickable小猫纸条".picked:
+ EventManager.set_stage(event, 4)
+ # else:
+ # $"Pickable小猫纸条".triggered.connect(EventManager.set_stage.bind(event, 4))
+
+
+func _on_pre_stage_updated():
+ pass
+
+
+func _on_stage_updated():
+ pass
diff --git a/scene/ground/script/c02/event_2d叼纸小猫.gd.uid b/scene/ground/script/c02/event_2d叼纸小猫.gd.uid
new file mode 100644
index 00000000..fed4ea5f
--- /dev/null
+++ b/scene/ground/script/c02/event_2d叼纸小猫.gd.uid
@@ -0,0 +1 @@
+uid://cny3n681h2588
diff --git a/scene/little_game/八音盒/八音盒.gd b/scene/little_game/八音盒/八音盒.gd
index db86906e..f56d913a 100644
--- a/scene/little_game/八音盒/八音盒.gd
+++ b/scene/little_game/八音盒/八音盒.gd
@@ -41,11 +41,11 @@ var draggables: Array[Draggable2D] = []
@onready var sfx_close_lid = $CloseLid as AudioStreamPlayer
@onready var sfx_open_drawer = $OpenDrawer as AudioStreamPlayer
-# 1关闭 2打开 3放入小蝉人偶 4全部放置正确(可摇手柄) 5已播放完成
-var stage := 1:
+# 0:关闭 1:打开 2:放入小蝉人偶 3:全部放置正确_可摇手柄 4:已播放完成
+var stage := 0:
set(value):
stage = value
- ArchiveManager.set_global_entry(&"c02_musicbox_stage", value)
+ EventManager.set_stage(&"c02_musicbox_stage", value)
# 父,母,蝶,蝉
var playing_step_sec := 0.5
@@ -57,7 +57,7 @@ func _ready() -> void:
if Engine.is_editor_hint():
return
# 读取、配置参数
- stage = ArchiveManager.get_global_value(&"c02_musicbox_stage", 1)
+ stage = EventManager.get_stage(&"c02_musicbox_stage")
playing_step_sec = audio_manual.get_length() / playing_steps
handle_wheel.rotated.connect(_on_wheel_rotated)
@@ -105,8 +105,8 @@ func _toggle_side_handle_outline(display: bool):
func _on_box_picked(_node):
sfx_open_lid.play()
# 1关闭 2打开 3放入小蝉人偶 4全部放置正确(可摇手柄) 5已播放完成
- if stage == 1:
- _chechout_stage(2)
+ if stage == 0:
+ _chechout_stage(1)
else:
box_closed.hide()
box_broken.show()
@@ -174,7 +174,7 @@ func post_plugged():
if all_plugged:
# 全部插入,stage 进入下一阶段
sfx_plugged_finish.play()
- _chechout_stage(stage + 1)
+ _chechout_stage(3)
else:
sfx_plugged.play()
@@ -187,7 +187,7 @@ var continue_playing := false
func _on_wheel_rotated(radiant: float) -> void:
- if stage != 4 or accumulated_steps >= playing_steps:
+ if stage != 3 or accumulated_steps >= playing_steps:
return
accumulated_radiant += radiant
if abs(accumulated_radiant) > deg_to_rad(playing_step_degree):
@@ -201,7 +201,7 @@ func _on_wheel_rotated(radiant: float) -> void:
sfx_music.play()
else:
sfx_music.stream_paused = false
- Util.timer(playing_step_sec, _on_playing_step_finished)
+ Util.timer(playing_step_sec, _on_playing_step_finished)
func _on_playing_step_finished():
@@ -212,7 +212,7 @@ func _on_playing_step_finished():
return
if continue_playing:
continue_playing = false
- Util.timer(playing_step_sec, _on_playing_step_finished)
+ Util.timer(playing_step_sec, _on_playing_step_finished)
else:
playing = false
sfx_music.stream_paused = true
@@ -227,14 +227,13 @@ func _checkout_auto_play():
# var audio_len = audio_auto.get_length()
# 音效 9.5 秒时关闭盒子
var audio_len = 9.5
- Util.timer(audio_len, _on_auto_play_finished)
+ Util.timer(audio_len, _on_auto_play_finished)
func _on_auto_play_finished():
side_handle.pause()
- stage = 5
# 不播放关闭音效,因为自动播放时已经播放过了
- _chechout_stage(5, false)
+ _chechout_stage(4, false)
# 抖动效果,逐渐减弱
var tween = create_tween()
var fps := 10.0
@@ -261,16 +260,16 @@ func _hide_all():
func _chechout_stage(s: int, play_sfx := true) -> void:
+ stage = s
_hide_all()
var display_handle_outline = false
# 1关闭 2打开 3放入小蝉人偶 4全部放置正确(可摇手柄) 5已播放完成
- stage = s
match s:
- 1:
+ 0:
box_closed.visible = true
if play_sfx:
sfx_close_lid.play()
- 2:
+ 1:
if not ArchiveManager.get_global_value(&"c02_musicbox_has_opened"):
ArchiveManager.set_global_entry(&"c02_musicbox_has_opened", false)
SceneManager.pop_center_notification(tr("c02_s02_八音盒缺人偶"))
@@ -282,7 +281,7 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
pic.visible = true
if play_sfx:
sfx_open_lid.play()
- 3:
+ 2:
d4.visible = true
d4.modulate.a = 0
create_tween().tween_property(d4, "modulate:a", 1.0, 1.0)
@@ -291,7 +290,7 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
pic.visible = true
if play_sfx:
sfx_open_lid.play()
- 4:
+ 3:
box_opened.visible = true
d4.visible = true
if pic:
@@ -300,7 +299,7 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
display_handle_outline = true
if play_sfx:
sfx_open_lid.play()
- 5:
+ 4:
box_closed.visible = true
_toggle_side_handle_outline(display_handle_outline)
@@ -314,14 +313,14 @@ func _settle_plug_positions():
func _unhandled_input(event: InputEvent) -> void:
- if event.is_action_pressed("interact") and stage == 2:
+ if event.is_action_pressed("interact") and stage == 1:
get_viewport().set_input_as_handled()
# 尝试使用道具
var hud = SceneManager.get_prop_hud() as PropHud
var key = SceneManager.get_current_prop(false)
if key == "prop_木头人偶":
SceneManager.disable_prop_item(key)
- _chechout_stage(3)
+ _chechout_stage(2)
else:
# hud 无效shaking
hud.on_toggle_invalid_prop()
@@ -347,4 +346,4 @@ func _on_pick_catty():
SceneManager.enable_prop_item("prop_小猫玩具完整")
# 八音盒中看不到 os
# await inspector.quit_and_hidden
- # SceneManager.pop_os_with_str("c02_获得小猫玩具")
\ No newline at end of file
+ # SceneManager.pop_os_with_str("c02_获得小猫玩具")
diff --git a/scene/little_game/八音盒/八音盒.tscn b/scene/little_game/八音盒/八音盒.tscn
index 6d06b071..d3f20c64 100644
--- a/scene/little_game/八音盒/八音盒.tscn
+++ b/scene/little_game/八音盒/八音盒.tscn
@@ -268,6 +268,7 @@ position = Vector2(294, 177)
position = Vector2(340, 178)
[node name="BrokenBox" type="Sprite2D" parent="All"]
+visible = false
position = Vector2(-48, 38)
texture = ExtResource("24_rriyt")
centered = false
diff --git a/scene/little_game/弹珠游戏/弹珠游戏.gd b/scene/little_game/弹珠游戏/弹珠游戏.gd
index c3cee8c2..782fb3e0 100644
--- a/scene/little_game/弹珠游戏/弹珠游戏.gd
+++ b/scene/little_game/弹珠游戏/弹珠游戏.gd
@@ -12,7 +12,6 @@ signal exit(success)
@onready var sfx_shoot = $SfxShoot as Sfx
@onready var sfx_dispatch = $SfxDispatch as Sfx
-
var dialogue_c02 = preload("res://asset/dialogue/c02.dialogue")
var balls_scene_dict = {
@@ -21,18 +20,22 @@ var balls_scene_dict = {
2: preload("uid://dr0rwr0xjgnjw"),
}
+var debug_directly_win = false
+
func _ready() -> void:
layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME
hand_pivot.modulate.a = 0
- # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束
- if ArchiveManager.get_global_value(&"c02_ball_game_stage", 0) == 2:
- # checkout_round(2)
- checkout_round(0)
- else:
- intro()
label.modulate.a = 0
- # game_win()
+ if GlobalConfig.DEBUG and debug_directly_win:
+ game_win()
+ else:
+ # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束(小猫纸片) 4:游戏结束(小猫离开)
+ if EventManager.get_stage(&"c02_ball_game_stage") == 2:
+ # checkout_round(2)
+ checkout_round(0)
+ else:
+ intro()
func intro():
@@ -49,9 +52,9 @@ func intro():
func intro_finished():
SceneManager.disable_prop_item("prop_弹珠")
- # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束
+ # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束(小猫纸片) 4:游戏结束(小猫离开)
# 放入弹珠,开始游戏
- ArchiveManager.set_global_entry(&"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")
@@ -242,9 +245,9 @@ func _on_hit_boundary():
func game_win() -> void:
print("game_win 弹珠游戏胜利")
- # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束
- ArchiveManager.set_global_entry(&"c02_ball_game_stage", 3)
- %"Sfx结尾小孩跑".play()
+ # 0:默认 1:寻找弹珠(老虎钳可以换弹珠) 2:给出弹珠 3:游戏结束(小猫纸片) 4:游戏结束(小猫离开)
+ EventManager.set_stage(&"c02_ball_game_stage", 3)
+ $"Sfx结尾小孩跑_耳鸣".global_play()
Util.shake_layer(self, 2.0)
# 弹珠雨
$BallsFalling.emitting = true
diff --git a/scene/little_game/弹珠游戏/弹珠游戏.tscn b/scene/little_game/弹珠游戏/弹珠游戏.tscn
index ea04da38..5f4729a2 100644
--- a/scene/little_game/弹珠游戏/弹珠游戏.tscn
+++ b/scene/little_game/弹珠游戏/弹珠游戏.tscn
@@ -1,8 +1,9 @@
-[gd_scene load_steps=25 format=3 uid="uid://cjx7o685ox8c1"]
+[gd_scene load_steps=27 format=3 uid="uid://cjx7o685ox8c1"]
[ext_resource type="Script" uid="uid://c5s4giu182isu" path="res://scene/little_game/弹珠游戏/弹珠游戏.gd" id="1_p2trd"]
[ext_resource type="AudioStream" uid="uid://cra6rqbs6r1qd" path="res://asset/audio/sfx/旧版/child/小孩从近到远跑步.wav" id="2_aqxy0"]
[ext_resource type="Texture2D" uid="uid://bvf8b057baglw" path="res://asset/art/little_game/弹珠/bg_弹珠游戏.png" id="2_bm1k0"]
+[ext_resource type="AudioStream" uid="uid://b8sbtn3l37uh" path="res://asset/audio/sfx/旧版/c02/红屏.mp3" id="2_w5xa1"]
[ext_resource type="Texture2D" uid="uid://bs4tp4amd1kkm" path="res://asset/art/little_game/弹珠/抱手.png" id="3_3kvx4"]
[ext_resource type="AudioStream" uid="uid://bb6njoaxi2hbx" path="res://asset/audio/sfx/game/弹珠游戏/hit.ogg" id="3_co06r"]
[ext_resource type="FontFile" uid="uid://bnxdsxp7dst7f" path="res://asset/font/锐字太空混元像素简繁-闪 超黑_mianfeiziti.com.ttf" id="3_ctokx"]
@@ -18,6 +19,13 @@
[ext_resource type="PackedScene" uid="uid://dr0rwr0xjgnjw" path="res://scene/little_game/弹珠游戏/balls_2.tscn" id="7_oii6q"]
[ext_resource type="PackedScene" uid="uid://cbpy56epwth0j" path="res://scene/little_game/弹珠游戏/balls_falling.tscn" id="8_fk3jp"]
+[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_33cpb"]
+stream_count = 2
+stream_0/stream = ExtResource("2_w5xa1")
+stream_0/volume = 0.0
+stream_1/stream = ExtResource("2_aqxy0")
+stream_1/volume = 5.0
+
[sub_resource type="Animation" id="Animation_fk3jp"]
length = 0.001
tracks/0/type = "value"
@@ -256,9 +264,8 @@ radius = 300.0
[node name="弹珠游戏" type="CanvasLayer"]
script = ExtResource("1_p2trd")
-[node name="Sfx结尾小孩跑" type="AudioStreamPlayer" parent="."]
-unique_name_in_owner = true
-stream = ExtResource("2_aqxy0")
+[node name="Sfx结尾小孩跑_耳鸣" type="AudioStreamPlayer" parent="."]
+stream = SubResource("AudioStreamSynchronized_33cpb")
bus = &"game_sfx"
script = ExtResource("4_co06r")
metadata/_custom_type_script = "uid://rq6w1vuhuq1m"
diff --git a/scene/ux/memory/memory.tscn b/scene/ux/memory/memory.tscn
index 9de7800c..c42e562d 100644
--- a/scene/ux/memory/memory.tscn
+++ b/scene/ux/memory/memory.tscn
@@ -79,42 +79,42 @@ columns = 2
[node name="MemoryItem" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem2" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
[node name="MemoryItem3" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem4" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
[node name="MemoryItem5" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem6" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
[node name="MemoryItem7" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem8" parent="Mem/GridContainer" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
[node name="GridContainer2" type="GridContainer" parent="Mem"]
z_index = 10
@@ -130,39 +130,39 @@ columns = 2
[node name="MemoryItem" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem2" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
[node name="MemoryItem3" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem4" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
[node name="MemoryItem5" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem6" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
[node name="MemoryItem7" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("5_7f8pt")
-title = "g_偷听对话"
+title = "mem_偷听对话"
[node name="MemoryItem8" parent="Mem/GridContainer2" instance=ExtResource("4_6dhhp")]
layout_mode = 2
packed_scene = ExtResource("6_dp1y4")
-title = "g_疯子看井"
+title = "mem_疯子看井"
diff --git a/scene/ux/note/ux_note.tscn b/scene/ux/note/ux_note.tscn
index ea4cb6a8..4aeeadfa 100644
--- a/scene/ux/note/ux_note.tscn
+++ b/scene/ux/note/ux_note.tscn
@@ -151,7 +151,6 @@ expand_mode = 1
[node name="Event2D" type="Node2D" parent="Bag/Book"]
script = SubResource("GDScript_7vpan")
-event = "handnote_stage"
metadata/_custom_type_script = "uid://bkkiyk5jkdw4d"
[node name="Tabs" parent="Bag" node_paths=PackedStringArray("root") instance=ExtResource("4_7vpan")]
diff --git a/script_templates/event_2d.gd b/script_templates/event_2d.gd
index 75b51174..048346e5 100644
--- a/script_templates/event_2d.gd
+++ b/script_templates/event_2d.gd
@@ -1,3 +1,4 @@
+@tool
extends Event2D
# var prev_stage := 0
@@ -6,7 +7,8 @@ extends Event2D
func _ready() -> void:
super._ready()
-
+ if Engine.is_editor_hint():
+ return
func _on_global_stage_updated(e: StringName, s: int):
super._on_global_stage_updated(e, s)