调整高光效果
This commit is contained in:
parent
c14c807f6f
commit
30b581fbd5
@ -58,6 +58,8 @@ points = PackedVector2Array(346, 200, 500, 200)
|
||||
[node name="counter" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_6747o")]
|
||||
position = Vector2(466, 43)
|
||||
texture = ExtResource("6_wsqdn")
|
||||
mute_when_interacted = true
|
||||
mute_when_invalid = true
|
||||
one_shot = false
|
||||
|
||||
[node name="Closeup柜子后的洞" parent="Ground/DeployLayer" index="4" instance=ExtResource("7_wsqdn")]
|
||||
|
@ -32,6 +32,7 @@ func _on_ground_ready() -> void:
|
||||
if grinder_stage == 1:
|
||||
_transport_to_the_fatty_story()
|
||||
|
||||
|
||||
func _on_grinder_exited(_arg) -> void:
|
||||
var stage = EventManager.get_stage("c03_meat_grinder")
|
||||
if stage == 1:
|
||||
@ -44,16 +45,16 @@ func _transport_to_the_fatty_story() -> void:
|
||||
await Util.wait(1.0)
|
||||
SceneManager.dizzy_effect(3.0)
|
||||
SceneManager.player_action(17, true)
|
||||
Util.timer(1.0, _setup_monster)
|
||||
Util.timer(1.0, _setup_monster_chopping)
|
||||
await SceneManager.get_player().animation_finished
|
||||
await Util.wait(2.0)
|
||||
SceneManager.unlock_player()
|
||||
SceneManager.get_ground_loader().transition_to_scene("c03_s10", "left")
|
||||
|
||||
|
||||
func _setup_monster() -> void:
|
||||
func _setup_monster_chopping() -> void:
|
||||
monster.show()
|
||||
monster.play()
|
||||
monster.play("砍桌子")
|
||||
|
||||
|
||||
func _on_monster_chopping_animation_looped() -> void:
|
||||
|
@ -124,11 +124,13 @@ original_texture = ExtResource("9_jfgnj")
|
||||
metadata/_custom_type_script = "uid://dt8cfnm2og4h"
|
||||
|
||||
[node name="棺材怪切肉" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="6"]
|
||||
visible = false
|
||||
position = Vector2(311, -4.5)
|
||||
sprite_frames = ExtResource("8_isumy")
|
||||
animation = &"地下呼吸帧_准备走路"
|
||||
animation = &"砍桌子"
|
||||
flip_h = true
|
||||
script = ExtResource("23_u2kpr")
|
||||
autostart = false
|
||||
action_configs = Array[Dictionary]([{
|
||||
"animation_intro": "地下呼吸帧_准备走路",
|
||||
&"animation_next": "棺材怪走路",
|
||||
@ -189,6 +191,7 @@ energy = 0.6
|
||||
texture = ExtResource("21_qeidq")
|
||||
|
||||
[node name="长桌" type="Sprite2D" parent="Ground/DeployLayer" index="8"]
|
||||
z_index = 10
|
||||
position = Vector2(348, 56.5)
|
||||
texture = ExtResource("7_es8d4")
|
||||
|
||||
|
@ -583,6 +583,10 @@ shape = SubResource("CircleShape2D_nugkd")
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DraggableRigid1/Area2D"]
|
||||
polygon = PackedVector2Array(23, -19, -1.8, -19, -14.5, -14, -20.7, -14, -29.7, -7, -30, 6.5, -15.1, 19, 11.5, 19, 30, 6.4, 30, -11.7, 23, -17.9)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid1"]
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("8_lv3nw")
|
||||
|
||||
[node name="DraggableRigid2" parent="." node_paths=PackedStringArray("replaced_area_monitor", "limit_polygon") instance=ExtResource("7_lv3nw")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(413, 67)
|
||||
@ -599,6 +603,10 @@ shape = SubResource("CircleShape2D_bmmll")
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DraggableRigid2/Area2D"]
|
||||
polygon = PackedVector2Array(16, -16.5, -9.5, -16.5, -17.5, -12.5, -18, 10, -15, 12.4, -15, 13.7, -10.1, 16.5, 11.6, 16.5, 17.9, 9.5, 18, -14, 16, -15.5)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid2"]
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("9_igyl7")
|
||||
|
||||
[node name="DraggableRigid3" parent="." node_paths=PackedStringArray("replaced_area_monitor", "limit_polygon") instance=ExtResource("7_lv3nw")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(518, 68)
|
||||
@ -615,6 +623,10 @@ polygon = PackedVector2Array(15, -18.5, -6.2, -18.5, -9.5, -16.5, -11.9, -16.5,
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DraggableRigid3"]
|
||||
shape = SubResource("CircleShape2D_12r3p")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid3"]
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("10_nugkd")
|
||||
|
||||
[node name="DraggableRigid4" parent="." node_paths=PackedStringArray("replaced_area_monitor", "limit_polygon") instance=ExtResource("7_lv3nw")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(312, 126)
|
||||
@ -631,6 +643,10 @@ shape = SubResource("CircleShape2D_x7amv")
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DraggableRigid4/Area2D"]
|
||||
polygon = PackedVector2Array(-7.3, -24.4, -14, -24.5, -20.6, -18.7, -22, -20.5, -25.3, -20.5, -29.3, -11.5, -31, -11.5, -31, -9.2, -29, -1.5, -30.2, 1.5, -31, 1.5, -31, 5.9, -30, 7.9, -31, 8.3, -31, 17.6, -27.8, 18.9, -29, 22.1, -29, 24.5, -21.2, 24.5, -15, 22.2, -12, 23.7, -12, 24.5, 7.7, 24.5, 11, 20.2, 22.3, 16.5, 27.8, 16.5, 31, 13.3, 31, 10.4, 28.3, 8.8, 30.3, 8.5, 31, 8.5, 31, -2.6, 30.1, -6.5, 31, -6.5, 31, -19, 26.7, -17.5, 21.7, -17.5, 13, -24.5, -6.5, -24.5)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid4"]
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("11_bmmll")
|
||||
|
||||
[node name="DraggableRigid5" parent="." node_paths=PackedStringArray("replaced_area_monitor", "limit_polygon") instance=ExtResource("7_lv3nw")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(413, 124)
|
||||
@ -647,6 +663,10 @@ shape = SubResource("CircleShape2D_flc3m")
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DraggableRigid5/Area2D"]
|
||||
polygon = PackedVector2Array(-2, -28, -20, -28, -20, -23.5, -16.7, -17.7, -30.2, -16, -32, -16, -32, -12, -26, -3.5, -32, 0.6, -32, 11.1, -26.4, 7, -23, 15.4, -23, 17.4, -20.3, 18.4, -15, 11.7, -15, 11, -13.5, 11, -11, 19.2, -11, 28, 5.5, 28, 9, 23.7, 9, 21.5, 12, 20.8, 13.2, 22, 17.6, 22, 19, 15.2, 19, 13.8, 31.1, 13, 32, 13, 32, 7.2, 29.4, 3.1, 32, 1.4, 32, -11.1, 23.7, -13.9, 22, -22.4, 22, -24.3, 19.7, -25.4, 15.4, -21.9, 16, -26.9, 16, -28, 6.2, -28, 3, -24.8, -1, -23.4, -2, -27)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid5"]
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("12_12r3p")
|
||||
|
||||
[node name="DraggableRigid6" parent="." node_paths=PackedStringArray("replaced_area_monitor", "limit_polygon") instance=ExtResource("7_lv3nw")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(515, 124)
|
||||
@ -664,6 +684,10 @@ shape = SubResource("CircleShape2D_8lx66")
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DraggableRigid6/Area2D"]
|
||||
polygon = PackedVector2Array(-9, -26, -16.7, -20, -19.1, -20, -24, -12.6, -24, -7.5, -28, -6.1, -28, 26, 0.4, 26, 2, 23.6, 2, 23, 3.3, 24, 16.4, 24, 27.4, 19, 28, 19, 28, -5.8, 24.8, -9, 14.6, -9, 16, -13.7, 16, -18.8, 9, -25.8)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid6"]
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("13_x7amv")
|
||||
|
||||
[node name="DraggableRigid7" parent="." node_paths=PackedStringArray("replaced_area_monitor", "limit_polygon") instance=ExtResource("7_lv3nw")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(66, 63)
|
||||
@ -682,6 +706,11 @@ shape = SubResource("CapsuleShape2D_ctou3")
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DraggableRigid7/Area2D"]
|
||||
polygon = PackedVector2Array(33, -23.2, 21, -29.2, 21, -26.2, 3.4, -16, -1.4, -16, -16.7, -9.5, -34.8, -14, -40, -14, -40, -1.7, -38.9, -0.9, -40, 1.4, -40, 7.8, -29.3, 18.5, -30, 22.8, -30, 26.3, -21.9, 30, -13.6, 30, -9.7, 24.1, -8, 26.6, -8, 28.2, -5.8, 29.3, -1.3, 26, 2, 26, -2, 16.6, 0.799999, 14.7, 11.5, 21, 13.8, 21, 17, 17.8, 17, 14.2, 12, 9.2, 14, 6.7, 14, 4, 10.8, 1.6, 21, -4.9, 21, -5.6, 35.3, -10, 37.4, -10, 38.4, -12.7, 30.5, -18.6, 33, -19.8)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid7"]
|
||||
energy = 1.8
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("36_stbjq")
|
||||
|
||||
[node name="DraggableRigid8" parent="." node_paths=PackedStringArray("replaced_area_monitor", "limit_polygon") instance=ExtResource("7_lv3nw")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(474, 216)
|
||||
@ -700,6 +729,11 @@ shape = SubResource("CircleShape2D_ujbuy")
|
||||
position = Vector2(-37, -10)
|
||||
polygon = PackedVector2Array(51.1, 0, 24.5, 0, 6.6, 8, 4.1, 8, 0, 12.9, 0, 25, 3.8, 26, 59.7, 26, 66.9, 18, 67, 12.8, 63, 8.2, 63, 6.9)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="DraggableRigid8"]
|
||||
energy = 2.5
|
||||
range_layer_max = 10
|
||||
texture = ExtResource("32_gf0xj")
|
||||
|
||||
[node name="LimitPolygon2D" type="Polygon2D" parent="."]
|
||||
visible = false
|
||||
polygon = PackedVector2Array(51, 33, 52, 121, 79, 134, 122, 130, 168, 130, 201, 135, 219, 141, 256, 143, 357, 164, 429, 235, 553, 235, 552, 33)
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=24 format=3 uid="uid://d320nw5yrmvjo"]
|
||||
[gd_scene load_steps=26 format=3 uid="uid://d320nw5yrmvjo"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://de2smnt2my047" path="res://scene/ground/script/c03/s03_closeup癞子纸人.gd" id="1_6n6qt"]
|
||||
[ext_resource type="AudioStream" uid="uid://b5bbu858rembf" path="res://asset/audio/sfx/交互/第二章/sfx_s03_剪刀声音.ogg" id="2_2kayp"]
|
||||
@ -267,6 +267,13 @@ _data = {
|
||||
&"light_and_canvas_flipping": SubResource("Animation_otai4")
|
||||
}
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_aen5b"]
|
||||
offsets = PackedFloat32Array(1)
|
||||
colors = PackedColorArray(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_2kayp"]
|
||||
gradient = SubResource("Gradient_aen5b")
|
||||
|
||||
[node name="Closeup癞子纸人" type="CanvasLayer"]
|
||||
script = ExtResource("1_6n6qt")
|
||||
|
||||
@ -387,6 +394,12 @@ metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="头/Draggable纸钱2"]
|
||||
polygon = PackedVector2Array(13, -30, -9.5, -30, -19.5, -25, -22.1, -25, -30, -12.2, -30, 14.1, -25, 21.6, -25, 24.3, -12, 30, 13.7, 30, 21.6, 25, 24.2, 25, 30, 14.5, 30, -11, 26, -17.6, 26, -20, 13, -29)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="头/Draggable纸钱2"]
|
||||
energy = 0.5
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_2kayp")
|
||||
|
||||
[node name="Draggable纸钱1" parent="头" instance=ExtResource("4_uenj0")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(319, 139)
|
||||
@ -406,6 +419,12 @@ metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="头/Draggable纸钱1"]
|
||||
polygon = PackedVector2Array(13, -30, -9.5, -30, -19.5, -25, -22.1, -25, -30, -12.2, -30, 14.1, -25, 21.6, -25, 24.3, -12, 30, 13.7, 30, 21.6, 25, 24.2, 25, 30, 14.5, 30, -11, 26, -17.6, 26, -20, 13, -29)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="头/Draggable纸钱1"]
|
||||
energy = 0.5
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_2kayp")
|
||||
|
||||
[node name="遮罩" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
anchors_preset = 15
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bnoqhovb0wjem"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bnoqhovb0wjem"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://xyswrst2qvnv" path="res://scene/ground/script/c03/s03_closeup镜子特写.gd" id="1_l7eke"]
|
||||
[ext_resource type="Texture2D" uid="uid://cv43fc0yphoyh" path="res://asset/art/scene/c03/s03_瞎子理发店/ux_镜子特写_脸.png" id="2_h11vl"]
|
||||
@ -8,6 +8,15 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dri7gy7janvim" path="res://asset/art/scene/c03/s03_瞎子理发店/ux_镜子特写_红绳麻将.png" id="5_l7eke"]
|
||||
[ext_resource type="Texture2D" uid="uid://gan7qq0i7uiw" path="res://asset/art/scene/c03/s03_瞎子理发店/ux_镜子遮罩.png" id="5_pmhbo"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_60jo7"]
|
||||
offsets = PackedFloat32Array(0, 0.571181, 1)
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_x88e4"]
|
||||
gradient = SubResource("Gradient_60jo7")
|
||||
width = 50
|
||||
height = 130
|
||||
|
||||
[node name="Closeup镜子特写" type="CanvasLayer"]
|
||||
script = ExtResource("1_l7eke")
|
||||
|
||||
@ -41,6 +50,12 @@ texture = ExtResource("5_l7eke")
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Draggable2D麻绳"]
|
||||
polygon = PackedVector2Array(5, -83.5, -4, -83.5, -4, 36.5, -9.8, 36.5, -13.8, 40.5, -15, 40.5, -15, 79.6, -14.5, 79.9, -13.7, 79, -13.1, 83.5, -2.8, 83.5, -4, 81, -4, 80.3, 14.2, 78.5, 15, 78.5, 15, 37.4, 7, 36.6, 7, -79.7, 5, -80.8)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Draggable2D麻绳"]
|
||||
position = Vector2(-1, 23)
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_x88e4")
|
||||
|
||||
[node name="遮罩" type="TextureRect" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=26 format=3 uid="uid://dohvkxfdmcrw4"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://dohvkxfdmcrw4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d31fc1bolhwlf" path="res://scene/ground/script/c02/刮海报.gd" id="1_pdoaa"]
|
||||
[ext_resource type="Script" uid="uid://bagqdqsd0b4fy" path="res://scene/ground/script/c03/鬼母子游戏.gd" id="2_86fqw"]
|
||||
@ -26,6 +26,15 @@
|
||||
radius = 21.7
|
||||
height = 118.4
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_go12c"]
|
||||
offsets = PackedFloat32Array(1)
|
||||
colors = PackedColorArray(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_go12c"]
|
||||
gradient = SubResource("Gradient_go12c")
|
||||
width = 50
|
||||
height = 130
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_s7g11"]
|
||||
radius = 21.7
|
||||
height = 117.8
|
||||
@ -84,6 +93,12 @@ texture = ExtResource("9_mg2qe")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="鬼母子游戏/kid1"]
|
||||
shape = SubResource("CapsuleShape2D_6jvn1")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="鬼母子游戏/kid1"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_go12c")
|
||||
|
||||
[node name="kid2" parent="鬼母子游戏" instance=ExtResource("3_86fqw")]
|
||||
position = Vector2(212, 190)
|
||||
act_as_button = true
|
||||
@ -93,6 +108,12 @@ texture = ExtResource("10_pilu4")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="鬼母子游戏/kid2"]
|
||||
shape = SubResource("CapsuleShape2D_s7g11")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="鬼母子游戏/kid2"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_go12c")
|
||||
|
||||
[node name="kid3" parent="鬼母子游戏" instance=ExtResource("3_86fqw")]
|
||||
position = Vector2(368, 193)
|
||||
act_as_button = true
|
||||
@ -102,6 +123,12 @@ texture = ExtResource("11_6jvn1")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="鬼母子游戏/kid3"]
|
||||
shape = SubResource("CapsuleShape2D_3uuyc")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="鬼母子游戏/kid3"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_go12c")
|
||||
|
||||
[node name="kid4" parent="鬼母子游戏" instance=ExtResource("3_86fqw")]
|
||||
position = Vector2(437, 206)
|
||||
act_as_button = true
|
||||
@ -118,6 +145,12 @@ updater_mode = "unfreezer"
|
||||
updater_ease_duration = 0.0
|
||||
metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="鬼母子游戏/kid4"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_go12c")
|
||||
|
||||
[node name="倒塌" type="AnimatedSprite2D" parent="鬼母子游戏"]
|
||||
visible = false
|
||||
sprite_frames = ExtResource("14_s7g11")
|
||||
@ -175,6 +208,12 @@ metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Draggable纸钱"]
|
||||
polygon = PackedVector2Array(13, -30, -9.5, -30, -19.5, -25, -22.1, -25, -30, -12.2, -30, 14.1, -25, 21.6, -25, 24.3, -12, 30, 13.7, 30, 21.6, 25, 24.2, 25, 30, 14.5, 30, -11, 26, -17.6, 26, -20, 13, -29)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Draggable纸钱"]
|
||||
energy = 0.4
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = ExtResource("6_b7rxv")
|
||||
|
||||
[node name="遮罩" type="TextureRect" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
@ -16,7 +16,7 @@ var mahjongs = {
|
||||
}
|
||||
|
||||
var answer_of_in_hand_mahjongs = {
|
||||
preload("uid://b2pypf81rgqkw"): "三筒",
|
||||
preload("uid://bo4hrg3sqpoou"): "伍万",
|
||||
preload("uid://dis6qtf1hvop2"): "九筒",
|
||||
preload("uid://b2ectbek7vksi"): "三条"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=21 format=3 uid="uid://5uqi3c3f4va1"]
|
||||
[gd_scene load_steps=25 format=3 uid="uid://5uqi3c3f4va1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://vkpp7mrdnh0s" path="res://scene/ground/script/c03/s06_closeup柜子后的洞.gd" id="1_84xhv"]
|
||||
[ext_resource type="Texture2D" uid="uid://by4ybfs7oi63f" path="res://asset/art/scene/c03/s06_胖子卧室/衣柜后的墙洞/报纸正常背景.png" id="2_84xhv"]
|
||||
@ -54,9 +54,27 @@ _data = {
|
||||
&"bleeding_red": SubResource("Animation_aen5b")
|
||||
}
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_60jo7"]
|
||||
offsets = PackedFloat32Array(0, 0.571181, 1)
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_aen5b"]
|
||||
gradient = SubResource("Gradient_60jo7")
|
||||
width = 128
|
||||
height = 128
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_651rf"]
|
||||
size = Vector2(37.75, 30.87)
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_aen5b"]
|
||||
offsets = PackedFloat32Array(1)
|
||||
colors = PackedColorArray(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_651rf"]
|
||||
gradient = SubResource("Gradient_aen5b")
|
||||
width = 39
|
||||
height = 35
|
||||
|
||||
[node name="Closeup柜子后的洞" type="CanvasLayer"]
|
||||
script = ExtResource("1_84xhv")
|
||||
|
||||
@ -137,6 +155,14 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_84xhv")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="报纸展开"]
|
||||
position = Vector2(1, -17)
|
||||
rotation = 0.392067
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_aen5b")
|
||||
|
||||
[node name="HoverLight钥匙" parent="." instance=ExtResource("3_ko8md")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(318, 200)
|
||||
@ -183,6 +209,12 @@ trigger_event = &"c03_s06_hole_wizardpaper"
|
||||
trigger_mode = "picked"
|
||||
metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="符纸"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_651rf")
|
||||
|
||||
[node name="DirectionalLight2D" type="DirectionalLight2D" parent="."]
|
||||
color = Color(1, 0, 0, 1)
|
||||
energy = 0.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://bfc448d4gyusv"]
|
||||
[gd_scene load_steps=20 format=3 uid="uid://bfc448d4gyusv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://or5hk81ourk0" path="res://scene/ground/script/c03/s08_closeup囚室门锁.gd" id="1_tb78h"]
|
||||
[ext_resource type="Texture2D" uid="uid://dx1hep4omg0q8" path="res://asset/art/scene/c03/s08_囚室/囚室的锁/场景.png" id="2_mc0c4"]
|
||||
@ -54,6 +54,15 @@ _data = {
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4w5uo"]
|
||||
size = Vector2(14, 12)
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_60jo7"]
|
||||
offsets = PackedFloat32Array(1)
|
||||
colors = PackedColorArray(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_gwh0f"]
|
||||
gradient = SubResource("Gradient_60jo7")
|
||||
width = 16
|
||||
height = 16
|
||||
|
||||
[node name="Closeup囚室门锁" type="CanvasLayer"]
|
||||
script = ExtResource("1_tb78h")
|
||||
metadata/_edit_horizontal_guides_ = [139.0, 197.0]
|
||||
@ -114,6 +123,12 @@ limit_rect = Rect2(198.5, 139, 0, 58)
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Draggable锁豆1"]
|
||||
shape = SubResource("RectangleShape2D_4w5uo")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Draggable锁豆1"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_gwh0f")
|
||||
|
||||
[node name="Draggable锁豆2" parent="." instance=ExtResource("7_4w5uo")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(263.5, 139)
|
||||
@ -123,6 +138,12 @@ limit_rect = Rect2(263.5, 139, 0, 58)
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Draggable锁豆2"]
|
||||
shape = SubResource("RectangleShape2D_4w5uo")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Draggable锁豆2"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_gwh0f")
|
||||
|
||||
[node name="Draggable锁豆3" parent="." instance=ExtResource("7_4w5uo")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(318.5, 139)
|
||||
@ -132,6 +153,12 @@ limit_rect = Rect2(318.5, 139, 0, 58)
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Draggable锁豆3"]
|
||||
shape = SubResource("RectangleShape2D_4w5uo")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Draggable锁豆3"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_gwh0f")
|
||||
|
||||
[node name="Draggable锁豆4" parent="." instance=ExtResource("7_4w5uo")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(383.5, 139)
|
||||
@ -141,6 +168,12 @@ limit_rect = Rect2(383.5, 139, 0, 58)
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Draggable锁豆4"]
|
||||
shape = SubResource("RectangleShape2D_4w5uo")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="Draggable锁豆4"]
|
||||
energy = 0.7
|
||||
range_layer_max = 10
|
||||
range_item_cull_mask = 128
|
||||
texture = SubResource("GradientTexture2D_gwh0f")
|
||||
|
||||
[node name="遮罩" type="TextureRect" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
@ -11,7 +11,6 @@ signal dropped(node: Draggable2D)
|
||||
@export var act_as_button := false
|
||||
# z +1 when picked (-1 when dropped)
|
||||
# @export var z_up_on_picked := true
|
||||
@export var item_name = ""
|
||||
@export var sprite_offset := Vector2(0, 0):
|
||||
set(val):
|
||||
sprite_offset = val
|
||||
|
@ -47,8 +47,6 @@ static var current_focusing_node: DraggableRigid = null
|
||||
static var pending_enter_callables: Array[Callable] = []
|
||||
|
||||
# 缓存常量
|
||||
const OUTLINE_THICKNESS := 1.0
|
||||
const OUTLINE_TWEEN_DURATION := 0.2
|
||||
const SHAKE_FPS := 15.0
|
||||
const SHAKE_DURATION := 0.8
|
||||
const SHAKE_DELTA := 12.0
|
||||
@ -56,7 +54,8 @@ const HUD_FADE_DURATION := 0.3
|
||||
|
||||
# 缓存变量
|
||||
var _mouse_event_source: Node
|
||||
var _outline_tween: Tween
|
||||
var _lights: Array[PointLight2D] = []
|
||||
var _highlight_tween: Tween
|
||||
var _shake_tween: Tween
|
||||
|
||||
func _ready() -> void:
|
||||
@ -64,8 +63,11 @@ func _ready() -> void:
|
||||
sprite.offset = sprite_offset
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
# 初始化隐藏白边
|
||||
sprite.material.set_shader_parameter("thickness", 0.0)
|
||||
|
||||
# add lights
|
||||
_travarse_add_light(self)
|
||||
# 初始化熄灭
|
||||
_toggle_rigid_highlight(false)
|
||||
|
||||
# 缓存事件源
|
||||
if replaced_area_monitor:
|
||||
@ -76,6 +78,13 @@ func _ready() -> void:
|
||||
_mouse_event_source.mouse_exited.connect(_on_mouse_exited)
|
||||
|
||||
|
||||
func _travarse_add_light(node: Node) -> void:
|
||||
if node is PointLight2D:
|
||||
_lights.append(node)
|
||||
for c in node.get_children():
|
||||
_travarse_add_light(c)
|
||||
|
||||
|
||||
func is_focused() -> bool:
|
||||
return current_focusing_node == self
|
||||
|
||||
@ -94,7 +103,7 @@ func _on_mouse_entered() -> bool:
|
||||
return false
|
||||
|
||||
current_focusing_node = self
|
||||
_toggle_outline(true)
|
||||
_toggle_rigid_highlight(true)
|
||||
return true
|
||||
|
||||
|
||||
@ -103,13 +112,13 @@ func _on_mouse_exited() -> void:
|
||||
pending_enter_callables.erase(_on_mouse_entered)
|
||||
# freezing 不影响 mouse exited
|
||||
if is_focused() and not holding:
|
||||
_toggle_rigid_highlight(false)
|
||||
current_focusing_node = null
|
||||
# 优化:使用 while 替代 for 循环,找到第一个成功的就停止
|
||||
while pending_enter_callables.size() > 0:
|
||||
var c = pending_enter_callables.pop_front()
|
||||
if c.call():
|
||||
break
|
||||
_toggle_outline(false)
|
||||
|
||||
|
||||
func _notification(what: int) -> void:
|
||||
@ -147,14 +156,11 @@ func _physics_process(_delta: float) -> void:
|
||||
func _try_pick() -> void:
|
||||
if not is_focused():
|
||||
return
|
||||
_toggle_outline(false)
|
||||
holding = true
|
||||
picked.emit(self)
|
||||
|
||||
|
||||
func _drop() -> void:
|
||||
if touching:
|
||||
_toggle_outline(true)
|
||||
if holding:
|
||||
holding = false
|
||||
if not touching:
|
||||
@ -163,18 +169,19 @@ func _drop() -> void:
|
||||
if c.call():
|
||||
break
|
||||
dropped.emit(self)
|
||||
if not touching:
|
||||
_toggle_rigid_highlight(false)
|
||||
|
||||
|
||||
func _toggle_outline(display: bool) -> void:
|
||||
func _toggle_rigid_highlight(display: bool) -> void:
|
||||
# 避免重复创建 tween
|
||||
if _outline_tween and _outline_tween.is_running():
|
||||
_outline_tween.kill()
|
||||
if _highlight_tween and _highlight_tween.is_running():
|
||||
_highlight_tween.kill()
|
||||
|
||||
_outline_tween = create_tween()
|
||||
var target_thickness := OUTLINE_THICKNESS if display else 0.0
|
||||
_outline_tween.tween_property(
|
||||
sprite.material, "shader_parameter/thickness", target_thickness, OUTLINE_TWEEN_DURATION
|
||||
)
|
||||
if _lights.is_empty():
|
||||
printerr("Draggable2D: No lights found to toggle highlight.")
|
||||
return
|
||||
for l in _lights:
|
||||
l.enabled = display
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
@ -187,7 +194,7 @@ func force_hold() -> void:
|
||||
return
|
||||
if not is_focused() and current_focusing_node:
|
||||
current_focusing_node._drop()
|
||||
_toggle_outline(false)
|
||||
_toggle_rigid_highlight(true)
|
||||
current_focusing_node = self
|
||||
holding = true
|
||||
picked.emit(self)
|
||||
|
@ -1,24 +1,6 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://c3gesto3ijcyq"]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://c3gesto3ijcyq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2ndiap8bpurv" path="res://scene/little_game/general/draggable_rigid.gd" id="1_i27hj"]
|
||||
[ext_resource type="Shader" uid="uid://cgy5ujo5afab2" path="res://asset/shader/outline.gdshader" id="2_vakwj"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_h88gi"]
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_pe1ot"]
|
||||
gradient = SubResource("Gradient_h88gi")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pe1ot"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("2_vakwj")
|
||||
shader_parameter/color = SubResource("GradientTexture1D_pe1ot")
|
||||
shader_parameter/alpha_ratio = 1.0
|
||||
shader_parameter/gradientResolution = 10
|
||||
shader_parameter/thickness = 1.0
|
||||
shader_parameter/tolerance = 0.0
|
||||
shader_parameter/diagonals = true
|
||||
shader_parameter/rounded = true
|
||||
|
||||
[node name="DraggableRigid2D" type="RigidBody2D"]
|
||||
collision_layer = 4
|
||||
@ -28,5 +10,5 @@ script = ExtResource("1_i27hj")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
light_mask = 65
|
||||
y_sort_enabled = true
|
||||
material = SubResource("ShaderMaterial_pe1ot")
|
||||
|
@ -42,8 +42,8 @@ func refresh():
|
||||
new_text += c + "\n"
|
||||
msg = new_text
|
||||
set(property_name, msg)
|
||||
if Engine.is_editor_hint():
|
||||
print("lable updated: %s" % [get(property_name)])
|
||||
# if Engine.is_editor_hint():
|
||||
# print("lable updated: %s" % [get(property_name)])
|
||||
|
||||
|
||||
func _get_tr_content():
|
||||
|
Loading…
Reference in New Issue
Block a user