优化院子纸钱z透视层级

This commit is contained in:
cakipaul 2025-07-17 20:30:35 +08:00
parent 350184821d
commit 86b6bc733b
4 changed files with 81 additions and 59 deletions

View File

@ -0,0 +1,15 @@
extends Node2D
@onready var particals = %"纸钱" as GPUParticles2D
func _ready() -> void:
_on_visibility_changed()
visibility_changed.connect(_on_visibility_changed)
func _on_visibility_changed() -> void:
var display = is_visible_in_tree()
particals.emitting = display
if display:
particals.request_particles_process(10.0)

View File

@ -0,0 +1 @@
uid://5y8v4ir43q3j

View File

@ -1,5 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://dnbutraty2285"] [gd_scene load_steps=8 format=3 uid="uid://dnbutraty2285"]
[ext_resource type="Script" uid="uid://5y8v4ir43q3j" path="res://scene/entity/partical/particals_ash_vertical.gd" id="1_1ybs0"]
[ext_resource type="Texture2D" uid="uid://6vh5m2p3v0t3" path="res://asset/art/scene/c01/s07_书店外/e_纸钱.png" id="1_hsa64"] [ext_resource type="Texture2D" uid="uid://6vh5m2p3v0t3" path="res://asset/art/scene/c01/s07_书店外/e_纸钱.png" id="1_hsa64"]
[sub_resource type="Gradient" id="Gradient_rwi0m"] [sub_resource type="Gradient" id="Gradient_rwi0m"]
@ -32,14 +33,17 @@ scale_curve = SubResource("CurveTexture_jq14j")
color_ramp = SubResource("GradientTexture1D_5cty7") color_ramp = SubResource("GradientTexture1D_5cty7")
[node name="ParticalsAsh" type="Node2D"] [node name="ParticalsAsh" type="Node2D"]
script = ExtResource("1_1ybs0")
[node name="纸钱" type="GPUParticles2D" parent="."] [node name="纸钱" type="GPUParticles2D" parent="."]
unique_name_in_owner = true
modulate = Color(1, 1, 1, 0.54902) modulate = Color(1, 1, 1, 0.54902)
position = Vector2(3, 0) position = Vector2(3, 0)
amount = 150 amount = 150
texture = ExtResource("1_hsa64") texture = ExtResource("1_hsa64")
lifetime = 30.0 lifetime = 30.0
preprocess = 20.0 preprocess = 10.0
fixed_fps = 10
visibility_rect = Rect2(-750, 0, 1500, 600) visibility_rect = Rect2(-750, 0, 1500, 600)
process_material = SubResource("ParticleProcessMaterial_wa8gc") process_material = SubResource("ParticleProcessMaterial_wa8gc")
metadata/_edit_vertical_guides_ = [-721.0] metadata/_edit_vertical_guides_ = [-721.0]

View File

@ -471,42 +471,7 @@ energy = 0.7
texture = SubResource("GradientTexture2D_kyfht") texture = SubResource("GradientTexture2D_kyfht")
texture_scale = 2.2 texture_scale = 2.2
[node name="新背景_奠" type="Node2D" parent="Ground/DeployLayer" index="12"] [node name="闷雷_纸人闪现" type="Node2D" parent="Ground/DeployLayer" index="12"]
visible = false
[node name="地上纸钱" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
z_index = -4
position = Vector2(0, -120)
texture = ExtResource("14_qqdxs")
centered = false
[node name="奠1" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(199.5, -3)
texture = ExtResource("6_ygnci")
[node name="奠2" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(655, -1)
texture = ExtResource("7_c3f8o")
[node name="奠3" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(799.5, -3)
texture = ExtResource("8_crgo6")
[node name="奠4" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(1936.5, -3)
texture = ExtResource("9_vddfx")
[node name="ParticalsAsh" parent="Ground/DeployLayer/新背景_奠" instance=ExtResource("10_c3f8o")]
position = Vector2(343, -175)
[node name="ParticalsAsh2" parent="Ground/DeployLayer/新背景_奠" instance=ExtResource("10_c3f8o")]
position = Vector2(898, -162)
[node name="ParticalsAsh_z_15" parent="Ground/DeployLayer/新背景_奠" instance=ExtResource("10_c3f8o")]
z_index = 15
position = Vector2(1964, -209)
[node name="闷雷_纸人闪现" type="Node2D" parent="Ground/DeployLayer" index="13"]
visible = false visible = false
[node name="Ambush闷雷纸人" parent="Ground/DeployLayer/闷雷_纸人闪现" instance=ExtResource("25_iyaiw")] [node name="Ambush闷雷纸人" parent="Ground/DeployLayer/闷雷_纸人闪现" instance=ExtResource("25_iyaiw")]
@ -533,11 +498,11 @@ range_layer_max = 2
range_item_cull_mask = 4 range_item_cull_mask = 4
texture = SubResource("GradientTexture2D_3nako") texture = SubResource("GradientTexture2D_3nako")
[node name="Ambush要下雨了" parent="Ground/DeployLayer" index="14" instance=ExtResource("25_iyaiw")] [node name="Ambush要下雨了" parent="Ground/DeployLayer" index="13" instance=ExtResource("25_iyaiw")]
position = Vector2(1611, 46) position = Vector2(1611, 46)
hook_os_key = "c02_院子_要下雨" hook_os_key = "c02_院子_要下雨"
[node name="Pickable小鞋子" parent="Ground/DeployLayer" index="15" instance=ExtResource("7_em2ma")] [node name="Pickable小鞋子" parent="Ground/DeployLayer" index="14" instance=ExtResource("7_em2ma")]
position = Vector2(809, 75) position = Vector2(809, 75)
sign_mark_offset = Vector2(0, -16.88) sign_mark_offset = Vector2(0, -16.88)
enabled = false enabled = false
@ -548,7 +513,7 @@ position = Vector2(0, -7)
scale = Vector2(0.15, 0.15) scale = Vector2(0.15, 0.15)
texture = ExtResource("8_plfv5") texture = ExtResource("8_plfv5")
[node name="Event2D小蝉哼歌" type="Node2D" parent="Ground/DeployLayer" index="16"] [node name="Event2D小蝉哼歌" type="Node2D" parent="Ground/DeployLayer" index="15"]
position = Vector2(800, -173) position = Vector2(800, -173)
script = ExtResource("26_o1qbs") script = ExtResource("26_o1qbs")
event_name = &"c02_madman_interacted_stage" event_name = &"c02_madman_interacted_stage"
@ -563,7 +528,7 @@ bus = &"game_sfx"
script = ExtResource("54_o1qbs") script = ExtResource("54_o1qbs")
metadata/_custom_type_script = "uid://wapo47a1oddf" metadata/_custom_type_script = "uid://wapo47a1oddf"
[node name="Interactable铁门" parent="Ground/DeployLayer" index="17" instance=ExtResource("8_xt8j0")] [node name="Interactable铁门" parent="Ground/DeployLayer" index="16" instance=ExtResource("8_xt8j0")]
light_mask = 5 light_mask = 5
position = Vector2(1222, 28) position = Vector2(1222, 28)
texture = ExtResource("7_gd6xp") texture = ExtResource("7_gd6xp")
@ -583,7 +548,7 @@ collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground/DeployLayer/Interactable铁门/Wall"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Ground/DeployLayer/Interactable铁门/Wall"]
shape = SubResource("RectangleShape2D_mdix7") shape = SubResource("RectangleShape2D_mdix7")
[node name="Note算命摊位" parent="Ground/DeployLayer" index="18" instance=ExtResource("6_t48d1")] [node name="Note算命摊位" parent="Ground/DeployLayer" index="17" instance=ExtResource("6_t48d1")]
position = Vector2(725, 45) position = Vector2(725, 45)
note_key = "c02_院子_算命摊位" note_key = "c02_院子_算命摊位"
@ -591,7 +556,7 @@ note_key = "c02_院子_算命摊位"
position = Vector2(0, 18) position = Vector2(0, 18)
texture = ExtResource("6_1tart") texture = ExtResource("6_1tart")
[node name="煤油灯" type="Sprite2D" parent="Ground/DeployLayer" index="19"] [node name="煤油灯" type="Sprite2D" parent="Ground/DeployLayer" index="18"]
position = Vector2(293, 13) position = Vector2(293, 13)
texture = ExtResource("32_df1yo") texture = ExtResource("32_df1yo")
@ -609,7 +574,7 @@ energy = 2.0
blend_mode = 2 blend_mode = 2
texture = ExtResource("11_g0qhj") texture = ExtResource("11_g0qhj")
[node name="煤油灯2" type="Sprite2D" parent="Ground/DeployLayer" index="20"] [node name="煤油灯2" type="Sprite2D" parent="Ground/DeployLayer" index="19"]
position = Vector2(605, 13) position = Vector2(605, 13)
texture = ExtResource("32_df1yo") texture = ExtResource("32_df1yo")
@ -627,7 +592,7 @@ energy = 2.0
blend_mode = 2 blend_mode = 2
texture = ExtResource("34_jhod7") texture = ExtResource("34_jhod7")
[node name="煤油灯3" type="Sprite2D" parent="Ground/DeployLayer" index="21"] [node name="煤油灯3" type="Sprite2D" parent="Ground/DeployLayer" index="20"]
position = Vector2(854, 13) position = Vector2(854, 13)
texture = ExtResource("32_df1yo") texture = ExtResource("32_df1yo")
@ -645,47 +610,47 @@ energy = 2.0
blend_mode = 2 blend_mode = 2
texture = ExtResource("35_o1qbs") texture = ExtResource("35_o1qbs")
[node name="井" type="Sprite2D" parent="Ground/DeployLayer" index="22"] [node name="井" type="Sprite2D" parent="Ground/DeployLayer" index="21"]
self_modulate = Color(0.739288, 0.739288, 0.739288, 1) self_modulate = Color(0.739288, 0.739288, 0.739288, 1)
light_mask = 5 light_mask = 5
z_index = 10 z_index = 10
position = Vector2(2062, 60) position = Vector2(2062, 60)
texture = ExtResource("21_4n8vm") texture = ExtResource("21_4n8vm")
[node name="药车" type="Sprite2D" parent="Ground/DeployLayer" index="23"] [node name="药车" type="Sprite2D" parent="Ground/DeployLayer" index="22"]
light_mask = 5 light_mask = 5
z_index = 10 z_index = 11
position = Vector2(1025, 27) position = Vector2(1025, 27)
texture = ExtResource("22_3y5s5") texture = ExtResource("22_3y5s5")
[node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="24" instance=ExtResource("23_81juy")] [node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="23" instance=ExtResource("23_81juy")]
position = Vector2(466, 3) position = Vector2(466, 3)
packed_scene = ExtResource("24_0o4rt") packed_scene = ExtResource("24_0o4rt")
collision_width_and_x = Vector2(40, 0) collision_width_and_x = Vector2(40, 0)
[node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="25" instance=ExtResource("25_iyaiw")] [node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="24" instance=ExtResource("25_iyaiw")]
position = Vector2(1319, 40) position = Vector2(1319, 40)
hook_method = "shocking_lighting" hook_method = "shocking_lighting"
[node name="Ambush偷听对话" parent="Ground/DeployLayer" index="26" instance=ExtResource("25_iyaiw")] [node name="Ambush偷听对话" parent="Ground/DeployLayer" index="25" instance=ExtResource("25_iyaiw")]
position = Vector2(1836, 7) position = Vector2(1836, 7)
trigger_mode = "interact" trigger_mode = "interact"
one_shot = false one_shot = false
hook_method = "eavesdrop" hook_method = "eavesdrop"
[node name="李氏赖子房间人影" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="27"] [node name="李氏赖子房间人影" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="26"]
position = Vector2(1835, -16) position = Vector2(1835, -16)
sprite_frames = SubResource("SpriteFrames_0o4rt") sprite_frames = SubResource("SpriteFrames_0o4rt")
autoplay = "default" autoplay = "default"
frame_progress = 0.643855 frame_progress = 0.643855
[node name="Closeup井" parent="Ground/DeployLayer" index="28" instance=ExtResource("23_81juy")] [node name="Closeup井" parent="Ground/DeployLayer" index="27" instance=ExtResource("23_81juy")]
z_index = 6 z_index = 6
position = Vector2(2063, 50) position = Vector2(2063, 50)
packed_scene = ExtResource("26_yy4fp") packed_scene = ExtResource("26_yy4fp")
action_key = 3 action_key = 3
[node name="Npc井边疯子" parent="Ground/DeployLayer" index="29" instance=ExtResource("35_plfv5")] [node name="Npc井边疯子" parent="Ground/DeployLayer" index="28" instance=ExtResource("35_plfv5")]
z_index = 10 z_index = 10
position = Vector2(2037, 67) position = Vector2(2037, 67)
sprite_frames = ExtResource("4_gd6xp") sprite_frames = ExtResource("4_gd6xp")
@ -699,7 +664,7 @@ sign_x_offset = -2.0
collision_width_and_x = Vector2(37.08, 0) collision_width_and_x = Vector2(37.08, 0)
dialogue_title = "c02_井边疯子对话" dialogue_title = "c02_井边疯子对话"
[node name="霸凌" type="Node2D" parent="Ground/DeployLayer" index="30"] [node name="霸凌" type="Node2D" parent="Ground/DeployLayer" index="29"]
visible = false visible = false
position = Vector2(2154, 60) position = Vector2(2154, 60)
@ -762,7 +727,7 @@ collision_mask = 0
shape = SubResource("RectangleShape2D_d7h4s") shape = SubResource("RectangleShape2D_d7h4s")
disabled = true disabled = true
[node name="火灾" type="Node2D" parent="Ground/DeployLayer" index="31"] [node name="火灾" type="Node2D" parent="Ground/DeployLayer" index="30"]
visible = false visible = false
[node name="右窗" type="AnimatedSprite2D" parent="Ground/DeployLayer/火灾"] [node name="右窗" type="AnimatedSprite2D" parent="Ground/DeployLayer/火灾"]
@ -1004,7 +969,7 @@ script = ExtResource("54_o1qbs")
loop = true loop = true
metadata/_custom_type_script = "uid://wapo47a1oddf" metadata/_custom_type_script = "uid://wapo47a1oddf"
[node name="Interactable柜子" parent="Ground/DeployLayer" index="32" instance=ExtResource("8_xt8j0")] [node name="Interactable柜子" parent="Ground/DeployLayer" index="31" instance=ExtResource("8_xt8j0")]
visible = false visible = false
position = Vector2(1772, 48) position = Vector2(1772, 48)
texture = ExtResource("32_cpifc") texture = ExtResource("32_cpifc")
@ -1020,11 +985,48 @@ animation = &"箱子着火"
autoplay = "箱子着火" autoplay = "箱子着火"
frame_progress = 0.453645 frame_progress = 0.453645
[node name="Note柜子可放置区域" parent="Ground/DeployLayer" index="33" instance=ExtResource("6_t48d1")] [node name="Note柜子可放置区域" parent="Ground/DeployLayer" index="32" instance=ExtResource("6_t48d1")]
position = Vector2(1771, 39) position = Vector2(1771, 39)
title_filter = "c02" title_filter = "c02"
note_key = "c02_柜子可放置区域" note_key = "c02_柜子可放置区域"
[node name="新背景_奠" type="Node2D" parent="Ground/DeployLayer" index="33"]
visible = false
[node name="地上纸钱" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
z_index = -4
position = Vector2(0, -120)
texture = ExtResource("14_qqdxs")
centered = false
[node name="奠1" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(199.5, -3)
texture = ExtResource("6_ygnci")
[node name="奠2" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(655, -1)
texture = ExtResource("7_c3f8o")
[node name="奠3" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(799.5, -3)
texture = ExtResource("8_crgo6")
[node name="奠4" type="Sprite2D" parent="Ground/DeployLayer/新背景_奠"]
position = Vector2(1936.5, -3)
texture = ExtResource("9_vddfx")
[node name="ParticalsAsh" parent="Ground/DeployLayer/新背景_奠" instance=ExtResource("10_c3f8o")]
z_index = 10
position = Vector2(343, -175)
[node name="ParticalsAsh2" parent="Ground/DeployLayer/新背景_奠" instance=ExtResource("10_c3f8o")]
z_index = 10
position = Vector2(898, -162)
[node name="ParticalsAsh_z_10" parent="Ground/DeployLayer/新背景_奠" instance=ExtResource("10_c3f8o")]
z_index = 10
position = Vector2(1964, -209)
[node name="PointLight2D" type="PointLight2D" parent="Ground/AmbientLayer" index="0"] [node name="PointLight2D" type="PointLight2D" parent="Ground/AmbientLayer" index="0"]
light_mask = 4 light_mask = 4
position = Vector2(2189, -142) position = Vector2(2189, -142)