inspector lock 改为 hold; 柜台放报纸去处前后左/右侧向帧;prop hud右键点击selected ignore

This commit is contained in:
cakipaul 2025-07-11 22:25:51 +08:00
parent 5020265046
commit 3ffe9fdd98
4 changed files with 24 additions and 45 deletions

View File

@ -1,4 +1,4 @@
[gd_resource type="SpriteFrames" load_steps=853 format=3 uid="uid://b7fhheih1hbvf"] [gd_resource type="SpriteFrames" load_steps=845 format=3 uid="uid://b7fhheih1hbvf"]
[ext_resource type="Texture2D" uid="uid://dvq64espa37lx" path="res://asset/art/animation/c00_吕萍_idle_left/zhhx1.png" id="1_ekv0l"] [ext_resource type="Texture2D" uid="uid://dvq64espa37lx" path="res://asset/art/animation/c00_吕萍_idle_left/zhhx1.png" id="1_ekv0l"]
[ext_resource type="Texture2D" uid="uid://dcp4gk5lib4bl" path="res://asset/art/animation/c00_吕萍_idle_left/zhhx2.png" id="2_fq076"] [ext_resource type="Texture2D" uid="uid://dcp4gk5lib4bl" path="res://asset/art/animation/c00_吕萍_idle_left/zhhx2.png" id="2_fq076"]
@ -371,16 +371,12 @@
[ext_resource type="Texture2D" uid="uid://ybj4hg6cvh4a" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/20.png" id="183_kirv5"] [ext_resource type="Texture2D" uid="uid://ybj4hg6cvh4a" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/20.png" id="183_kirv5"]
[ext_resource type="Texture2D" uid="uid://15ij6tgncpfn" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/21.png" id="184_30nqm"] [ext_resource type="Texture2D" uid="uid://15ij6tgncpfn" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/21.png" id="184_30nqm"]
[ext_resource type="Texture2D" uid="uid://cc0eb4ycclo1f" path="res://asset/art/animation/c02_吕萍_看小猫玩具_right/看玩具动作右5.png" id="184_jrug8"] [ext_resource type="Texture2D" uid="uid://cc0eb4ycclo1f" path="res://asset/art/animation/c02_吕萍_看小猫玩具_right/看玩具动作右5.png" id="184_jrug8"]
[ext_resource type="Texture2D" uid="uid://cp71rayg8ynfr" path="res://asset/art/gif/c01_书店/小蝶拿报纸/0.png" id="184_tsskx"]
[ext_resource type="Texture2D" uid="uid://cjgj5oq5e2qt6" path="res://asset/art/gif/c01_书店/小蝶拿报纸/1.png" id="185_adpbv"]
[ext_resource type="Texture2D" uid="uid://bdbx3uylvnn78" path="res://asset/art/animation/c02_吕萍_看小猫玩具_right/看玩具动作右6.png" id="185_in30h"] [ext_resource type="Texture2D" uid="uid://bdbx3uylvnn78" path="res://asset/art/animation/c02_吕萍_看小猫玩具_right/看玩具动作右6.png" id="185_in30h"]
[ext_resource type="Texture2D" uid="uid://dtt8xb0gkufps" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/22.png" id="185_ncltk"] [ext_resource type="Texture2D" uid="uid://dtt8xb0gkufps" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/22.png" id="185_ncltk"]
[ext_resource type="Texture2D" uid="uid://emtd3r72ewhv" path="res://asset/art/animation/c02_吕萍_看小猫玩具_right/看玩具动作右7.png" id="186_ecyns"] [ext_resource type="Texture2D" uid="uid://emtd3r72ewhv" path="res://asset/art/animation/c02_吕萍_看小猫玩具_right/看玩具动作右7.png" id="186_ecyns"]
[ext_resource type="Texture2D" uid="uid://lc6luwpq22il" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/23.png" id="186_if2a6"] [ext_resource type="Texture2D" uid="uid://lc6luwpq22il" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/23.png" id="186_if2a6"]
[ext_resource type="Texture2D" uid="uid://jk7vua3s68q0" path="res://asset/art/gif/c01_书店/小蝶拿报纸/2.png" id="186_xaqjo"]
[ext_resource type="Texture2D" uid="uid://x0xakx6gceq3" path="res://asset/art/animation/c00_过道小猫/过道小猫1.png" id="186_yiibj"] [ext_resource type="Texture2D" uid="uid://x0xakx6gceq3" path="res://asset/art/animation/c00_过道小猫/过道小猫1.png" id="186_yiibj"]
[ext_resource type="Texture2D" uid="uid://lsx7qqkkka0b" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/24.png" id="187_7hrrj"] [ext_resource type="Texture2D" uid="uid://lsx7qqkkka0b" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/24.png" id="187_7hrrj"]
[ext_resource type="Texture2D" uid="uid://cwakyp1uwatvc" path="res://asset/art/gif/c01_书店/小蝶拿报纸/3.png" id="187_exmgj"]
[ext_resource type="Texture2D" uid="uid://1untb3vqajxc" path="res://asset/art/animation/c00_过道小猫/过道小猫2.png" id="187_qhkmm"] [ext_resource type="Texture2D" uid="uid://1untb3vqajxc" path="res://asset/art/animation/c00_过道小猫/过道小猫2.png" id="187_qhkmm"]
[ext_resource type="Texture2D" uid="uid://b6y8ggopkh8me" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/25.png" id="188_f1lc0"] [ext_resource type="Texture2D" uid="uid://b6y8ggopkh8me" path="res://asset/art/gif/c01_书店外街道/小蝶看向橱窗/25.png" id="188_f1lc0"]
[ext_resource type="Texture2D" uid="uid://dqdnrlwq5wreh" path="res://asset/art/gif/c01_书店/小蝶拿报纸/4.png" id="188_glo3y"] [ext_resource type="Texture2D" uid="uid://dqdnrlwq5wreh" path="res://asset/art/gif/c01_书店/小蝶拿报纸/4.png" id="188_glo3y"]
@ -430,13 +426,9 @@
[ext_resource type="Texture2D" uid="uid://cxein2tgxbmpd" path="res://asset/art/gif/c01_书店/小蝶拿报纸/22.png" id="206_dlydb"] [ext_resource type="Texture2D" uid="uid://cxein2tgxbmpd" path="res://asset/art/gif/c01_书店/小蝶拿报纸/22.png" id="206_dlydb"]
[ext_resource type="Texture2D" uid="uid://coiloe2kfxt3f" path="res://asset/art/gif/c01_公寓过道/小蝶探头/11.png" id="206_jtaix"] [ext_resource type="Texture2D" uid="uid://coiloe2kfxt3f" path="res://asset/art/gif/c01_公寓过道/小蝶探头/11.png" id="206_jtaix"]
[ext_resource type="Texture2D" uid="uid://q5kqwixoexgc" path="res://asset/art/gif/c01_公寓过道/小蝶探头/12.png" id="207_rf1ax"] [ext_resource type="Texture2D" uid="uid://q5kqwixoexgc" path="res://asset/art/gif/c01_公寓过道/小蝶探头/12.png" id="207_rf1ax"]
[ext_resource type="Texture2D" uid="uid://cf16ivik5eico" path="res://asset/art/gif/c01_书店/小蝶拿报纸/23.png" id="207_xewty"]
[ext_resource type="Texture2D" uid="uid://l1mfvgty8v12" path="res://asset/art/gif/c01_公寓过道/小蝶探头/13.png" id="208_ku7j2"] [ext_resource type="Texture2D" uid="uid://l1mfvgty8v12" path="res://asset/art/gif/c01_公寓过道/小蝶探头/13.png" id="208_ku7j2"]
[ext_resource type="Texture2D" uid="uid://du6u3l6v6ip88" path="res://asset/art/gif/c01_书店/小蝶拿报纸/24.png" id="208_yjsfv"]
[ext_resource type="Texture2D" uid="uid://b5u6lc238aqah" path="res://asset/art/gif/c01_公寓过道/小蝶探头/14.png" id="209_37eje"] [ext_resource type="Texture2D" uid="uid://b5u6lc238aqah" path="res://asset/art/gif/c01_公寓过道/小蝶探头/14.png" id="209_37eje"]
[ext_resource type="Texture2D" uid="uid://clo66qwjl0naq" path="res://asset/art/gif/c01_书店/小蝶拿报纸/25.png" id="209_253oi"]
[ext_resource type="Texture2D" uid="uid://m8ecqan6e2qk" path="res://asset/art/gif/c01_公寓过道/小蝶探头/15.png" id="210_ave4u"] [ext_resource type="Texture2D" uid="uid://m8ecqan6e2qk" path="res://asset/art/gif/c01_公寓过道/小蝶探头/15.png" id="210_ave4u"]
[ext_resource type="Texture2D" uid="uid://cuwflapilvolw" path="res://asset/art/gif/c01_书店/小蝶拿报纸/26.png" id="210_mlkjm"]
[ext_resource type="Texture2D" uid="uid://duw51q2gu7cyu" path="res://asset/art/gif/c01_公寓过道/小蝶探头/16.png" id="211_o38qq"] [ext_resource type="Texture2D" uid="uid://duw51q2gu7cyu" path="res://asset/art/gif/c01_公寓过道/小蝶探头/16.png" id="211_o38qq"]
[ext_resource type="Texture2D" uid="uid://bt2wosw7pdhmj" path="res://asset/art/gif/c01_公寓过道/小蝶探头/17.png" id="212_ddhdg"] [ext_resource type="Texture2D" uid="uid://bt2wosw7pdhmj" path="res://asset/art/gif/c01_公寓过道/小蝶探头/17.png" id="212_ddhdg"]
[ext_resource type="Texture2D" uid="uid://cespji827yo4y" path="res://asset/art/animation/c02_吕萍_蹲下来查看/1.png" id="213_mydup"] [ext_resource type="Texture2D" uid="uid://cespji827yo4y" path="res://asset/art/animation/c02_吕萍_蹲下来查看/1.png" id="213_mydup"]
@ -1892,18 +1884,6 @@ animations = [{
}, { }, {
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": ExtResource("184_tsskx")
}, {
"duration": 1.0,
"texture": ExtResource("185_adpbv")
}, {
"duration": 1.0,
"texture": ExtResource("186_xaqjo")
}, {
"duration": 1.0,
"texture": ExtResource("187_exmgj")
}, {
"duration": 1.0,
"texture": ExtResource("188_glo3y") "texture": ExtResource("188_glo3y")
}, { }, {
"duration": 1.0, "duration": 1.0,
@ -1959,18 +1939,6 @@ animations = [{
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": ExtResource("206_dlydb") "texture": ExtResource("206_dlydb")
}, {
"duration": 1.0,
"texture": ExtResource("207_xewty")
}, {
"duration": 2.0,
"texture": ExtResource("208_yjsfv")
}, {
"duration": 2.0,
"texture": ExtResource("209_253oi")
}, {
"duration": 1.0,
"texture": ExtResource("210_mlkjm")
}], }],
"loop": false, "loop": false,
"name": &"c01_小小蝶_书店递报纸", "name": &"c01_小小蝶_书店递报纸",

View File

@ -139,8 +139,8 @@ var interact_mutex = Mutex.new()
func is_key_matched(key) -> bool: func is_key_matched(key) -> bool:
return ( return (
# 第一个 prop_key 若空,则表示不需要匹配 # prop_key 皆空,则表示不需要匹配
not prop_key (not prop_key and not prop_key2 and not prop_key3)
or ( or (
# 只要有一个 prop_key 匹配即可 # 只要有一个 prop_key 匹配即可
(prop_key and key == prop_key) (prop_key and key == prop_key)
@ -150,6 +150,14 @@ func is_key_matched(key) -> bool:
) )
func check_if_disable_prop(key) -> void:
# prop_key 若空, 则表示不需要匹配, 也就不需要 disable 当前道具
if not disable_prop_after_interacted or (not prop_key and not prop_key2 and not prop_key3):
return
if key:
SceneManager.disable_prop_item(key)
func _pre_interacted() -> void: func _pre_interacted() -> void:
SceneManager.lock_player(0, action_key) SceneManager.lock_player(0, action_key)
if icount == 0 and first_interact_os_key: if icount == 0 and first_interact_os_key:
@ -177,8 +185,7 @@ func _on_interacted() -> void:
return return
if not mute_when_interacted: if not mute_when_interacted:
sfx_success.play() sfx_success.play()
if disable_prop_after_interacted and key: check_if_disable_prop(key)
SceneManager.disable_prop_item(key)
interacted_times += 1 interacted_times += 1
if interacted_texture: if interacted_texture:
texture = interacted_texture texture = interacted_texture

View File

@ -216,6 +216,7 @@ offset_right = 65.0
offset_bottom = 65.0 offset_bottom = 65.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
mouse_filter = 2
texture = ExtResource("7_53yeo") texture = ExtResource("7_53yeo")
[node name="RightMargin" type="MarginContainer" parent="VBoxContainer/HBoxContainer"] [node name="RightMargin" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]

View File

@ -62,7 +62,7 @@ func _hide():
func _post_hide(): func _post_hide():
status = STATUS_HIDDEN status = STATUS_HIDDEN
scroll_container.mouse_filter = Control.MOUSE_FILTER_IGNORE scroll_container.mouse_filter = Control.MOUSE_FILTER_IGNORE
locking = false holding = false
origin_texture.texture = null origin_texture.texture = null
full_texture.texture = null full_texture.texture = null
texture_cover = null texture_cover = null
@ -96,7 +96,7 @@ func pop_standard_inspection(
content_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT content_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
if status != STATUS_HIDDEN: if status != STATUS_HIDDEN:
_hide() _hide()
locking = true holding = true
status = STATUS_INSPECTING_COVER status = STATUS_INSPECTING_COVER
visible = true visible = true
full_texture.texture = cover_texture full_texture.texture = cover_texture
@ -115,14 +115,17 @@ func pop_standard_inspection(
_blink_label() _blink_label()
var locking = false: var _lock_mutex := Mutex.new()
var holding = false:
set(val): set(val):
if val != locking: _lock_mutex.lock()
locking = val if val != holding:
holding = val
if val: if val:
SceneManager.lock_player() SceneManager.hold_player()
else: else:
SceneManager.unlock_player() SceneManager.unhold_player()
_lock_mutex.unlock()
var balloon var balloon
@ -140,7 +143,7 @@ func pop_prop_inspection(
# STATUS_INSPECTING_PROP 状态下不 hide跳过重复 lock # STATUS_INSPECTING_PROP 状态下不 hide跳过重复 lock
if status != STATUS_HIDDEN and status != STATUS_INSPECTING_PROP: if status != STATUS_HIDDEN and status != STATUS_INSPECTING_PROP:
_hide() _hide()
locking = true holding = true
status = STATUS_INSPECTING_PROP status = STATUS_INSPECTING_PROP
visible = true visible = true
var tween = create_tween() var tween = create_tween()