鬼母子游戏道具

This commit is contained in:
cakipaul 2025-07-14 22:23:21 +08:00
parent 3297219149
commit 958789fade
20 changed files with 326 additions and 74 deletions

View File

@ -1,4 +1,4 @@
[gd_resource type="SpriteFrames" load_steps=8 format=3 uid="uid://cmvr3lbwe3h7p"] [gd_resource type="SpriteFrames" load_steps=9 format=3 uid="uid://cmvr3lbwe3h7p"]
[ext_resource type="Texture2D" uid="uid://cdyq7y562gsxp" path="res://asset/art/gif/c03_特写与游戏动画/绞肉机特写动画/0.png" id="1_uknvx"] [ext_resource type="Texture2D" uid="uid://cdyq7y562gsxp" path="res://asset/art/gif/c03_特写与游戏动画/绞肉机特写动画/0.png" id="1_uknvx"]
[ext_resource type="Texture2D" uid="uid://botg6n14al2eu" path="res://asset/art/gif/c03_特写与游戏动画/绞肉机特写动画/1.png" id="2_up5wq"] [ext_resource type="Texture2D" uid="uid://botg6n14al2eu" path="res://asset/art/gif/c03_特写与游戏动画/绞肉机特写动画/1.png" id="2_up5wq"]
@ -7,6 +7,7 @@
[ext_resource type="Texture2D" uid="uid://c5sc5ctss08qc" path="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/0.png" id="5_uidoe"] [ext_resource type="Texture2D" uid="uid://c5sc5ctss08qc" path="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/0.png" id="5_uidoe"]
[ext_resource type="Texture2D" uid="uid://dx2v7bicpg7b4" path="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/1.png" id="6_yp83y"] [ext_resource type="Texture2D" uid="uid://dx2v7bicpg7b4" path="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/1.png" id="6_yp83y"]
[ext_resource type="Texture2D" uid="uid://bkh3cc2fg486c" path="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/2.png" id="7_axfhb"] [ext_resource type="Texture2D" uid="uid://bkh3cc2fg486c" path="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/2.png" id="7_axfhb"]
[ext_resource type="Texture2D" uid="uid://d0ad1s3sfsejp" path="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/3.png" id="8_yp83y"]
[resource] [resource]
animations = [{ animations = [{
@ -36,6 +37,9 @@ animations = [{
}, { }, {
"duration": 12.0, "duration": 12.0,
"texture": ExtResource("7_axfhb") "texture": ExtResource("7_axfhb")
}, {
"duration": 1.0,
"texture": ExtResource("8_yp83y")
}], }],
"loop": false, "loop": false,
"name": &"鬼母子神", "name": &"鬼母子神",

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0ad1s3sfsejp"
path="res://.godot/imported/3.png-ff67321c10a67be17337e96e154daa4a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://asset/art/gif/c03_特写与游戏动画/鬼母子神/3.png"
dest_files=["res://.godot/imported/3.png-ff67321c10a67be17337e96e154daa4a.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

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bqodfve8iavgv"
path="res://.godot/imported/e_剪刀.png-97a0b1fe1ed65ca4f232a22fa1c9f18f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://asset/art/scene/c03/s03_瞎子理发店/鬼母子神/e_剪刀.png"
dest_files=["res://.godot/imported/e_剪刀.png-97a0b1fe1ed65ca4f232a22fa1c9f18f.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

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://csu41qqgeqqhl"
path="res://.godot/imported/e_舌头.png-3779691081de76e88d0601f2c60c81ff.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://asset/art/scene/c03/s03_瞎子理发店/鬼母子神/e_舌头.png"
dest_files=["res://.godot/imported/e_舌头.png-3779691081de76e88d0601f2c60c81ff.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

View File

@ -149,7 +149,6 @@ func _toggle_parent_visibility_with_ease(parent, show: bool):
func _auto_detect_mode(): func _auto_detect_mode():
# TODO 统一interacted played picked
var parent = get_parent() var parent = get_parent()
if not parent: if not parent:
printerr("[EventBinder] _auto_detect_mode parent is null. path: %s" % get_path()) printerr("[EventBinder] _auto_detect_mode parent is null. path: %s" % get_path())

View File

@ -1,6 +1,6 @@
class_name HoverLightClickArea extends Area2D class_name HoverLightClickArea extends Area2D
signal clicked signal interacted
@export var freezing := false: @export var freezing := false:
set(val): set(val):
@ -9,6 +9,7 @@ signal clicked
_on_mouse_exited() _on_mouse_exited()
var touching = false var touching = false
static var _focus_mutex = Mutex.new()
static var current_focusing_item = "": static var current_focusing_item = "":
set(val): set(val):
current_focusing_item = val current_focusing_item = val
@ -23,11 +24,14 @@ var lights: Array[NodePath] = []
func _ready() -> void: func _ready() -> void:
for c in get_children(): for c in get_children():
if c is PointLight2D: if c is PointLight2D:
lights.append(c) lights.append(self.get_path_to(c))
if lights.is_empty(): if lights.is_empty():
printerr("HoverLightButton has no PointLight2D children") printerr("HoverLightButton has no PointLight2D children. auto freezed name=", name)
freezing = true
mouse_entered.connect(_on_mouse_entered) mouse_entered.connect(_on_mouse_entered)
mouse_exited.connect(_on_mouse_exited) mouse_exited.connect(_on_mouse_exited)
# 默认先熄灭
_toggle_light(false)
func is_focused() -> bool: func is_focused() -> bool:
@ -40,18 +44,22 @@ func _on_mouse_entered() -> bool:
return false return false
if is_focused(): if is_focused():
return true return true
_focus_mutex.lock()
# 尝试获得 current_focusing_item # 尝试获得 current_focusing_item
if current_focusing_item != "": if current_focusing_item != "":
if not pending_enter_callables.has(_on_mouse_entered): if not pending_enter_callables.has(_on_mouse_entered):
pending_enter_callables.append(_on_mouse_entered) pending_enter_callables.append(_on_mouse_entered)
_focus_mutex.unlock()
return false return false
current_focusing_item = name current_focusing_item = name
_focus_mutex.unlock()
_toggle_light(true) _toggle_light(true)
return true return true
func _on_mouse_exited() -> void: func _on_mouse_exited() -> void:
touching = false touching = false
_focus_mutex.lock()
pending_enter_callables.erase(_on_mouse_entered) pending_enter_callables.erase(_on_mouse_entered)
# frezzing 不影响 mouse exited # frezzing 不影响 mouse exited
if is_focused(): if is_focused():
@ -59,6 +67,7 @@ func _on_mouse_exited() -> void:
for c in pending_enter_callables: for c in pending_enter_callables:
if c.call(): if c.call():
break break
_focus_mutex.unlock()
_toggle_light(false) _toggle_light(false)
@ -67,3 +76,13 @@ func _toggle_light(on: bool) -> void:
var light = get_node(l) as PointLight2D var light = get_node(l) as PointLight2D
if light: if light:
light.enabled = on light.enabled = on
func _input(event: InputEvent) -> void:
if freezing or Engine.is_editor_hint() or not is_visible_in_tree():
return
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
# get_viewport().set_input_as_handled()
if is_focused():
interacted.emit()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=66 format=3 uid="uid://cootarwb44vvh"] [gd_scene load_steps=65 format=3 uid="uid://cootarwb44vvh"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_qkymk"] [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"] [ext_resource type="Script" uid="uid://cbt0ubygchxvv" path="res://scene/ground/scene/c02/s06_二楼.gd" id="2_4dg6u"]
@ -45,7 +45,6 @@
[ext_resource type="Texture2D" uid="uid://b5kolhax7pf4u" path="res://asset/art/scene/c02/s06_二楼楼道/小猫纸条.png" id="37_rjlld"] [ext_resource type="Texture2D" uid="uid://b5kolhax7pf4u" path="res://asset/art/scene/c02/s06_二楼楼道/小猫纸条.png" id="37_rjlld"]
[ext_resource type="Script" uid="uid://bnm8wuspfx303" path="res://scene/ground/script/c02/event_2d_xchan_run_away.gd" id="39_t5e0j"] [ext_resource type="Script" uid="uid://bnm8wuspfx303" path="res://scene/ground/script/c02/event_2d_xchan_run_away.gd" id="39_t5e0j"]
[ext_resource type="SpriteFrames" uid="uid://di43shn22n5ph" path="res://asset/art/gif/c00_通用动作/c00_通用动作_frames.tres" id="40_7i4w0"] [ext_resource type="SpriteFrames" uid="uid://di43shn22n5ph" path="res://asset/art/gif/c00_通用动作/c00_通用动作_frames.tres" id="40_7i4w0"]
[ext_resource type="Script" path="res://scene/ground/script/c03/s02_event_2d偷听陆仁小蝶对话后.gd" id="46_sqio2"]
[sub_resource type="Animation" id="Animation_k01ve"] [sub_resource type="Animation" id="Animation_k01ve"]
length = 0.001 length = 0.001
@ -1346,13 +1345,6 @@ move_configs = Array[Dictionary]([{
}]) }])
debug_mov_animation = "c00_头套小婵_run" debug_mov_animation = "c00_头套小婵_run"
[node name="Event2D偷听陆仁对话后" type="Node2D" parent="Ground/DeployLayer" index="24"]
script = ExtResource("46_sqio2")
event_name = &"c03_invite_xchan_supper"
event_stages = Array[int]([2])
event_memo = "当事件[c03_invite_xchan_supper=2:已完成邀请]时显示该节点"
metadata/_custom_type_script = "uid://bkkiyk5jkdw4d"
[node name="MainPlayer" parent="Ground" index="5"] [node name="MainPlayer" parent="Ground" index="5"]
position = Vector2(63, 95) position = Vector2(63, 95)
catty_light_energy = 0.5 catty_light_energy = 0.5

View File

@ -14,31 +14,34 @@ func _ready() -> void:
#region node_reference #region node_reference
var closeup洋糕点: Closeup2D
var : Gaslight var : Gaslight
var note小蝉的床: Note2D var note小蝉的床: Note2D
var note通风管道: Note2D var note通风管道: Note2D
var note八卦图: Note2D
var note十字架: Note2D
#endregion #endregion
# 读取设置变量名 # 读取设置变量名
func _setup_node_reference() -> void: func _setup_node_reference() -> void:
closeup洋糕点 = $"../DeployLayer/Closeup洋糕点"
= $"../DeployLayer/煤油灯" = $"../DeployLayer/煤油灯"
note小蝉的床 = $"../DeployLayer/Note小蝉的床" note小蝉的床 = $"../DeployLayer/Note小蝉的床"
note通风管道 = $"../DeployLayer/Note通风管道" note通风管道 = $"../DeployLayer/Note通风管道"
note八卦图 = $"../DeployLayer/Note八卦图"
note十字架 = $"../DeployLayer/Note十字架"
func _on_ground_ready() -> void: func _on_ground_ready() -> void:
if .interacted_times == 0: if .interacted_times == 0:
_set_notes_coverer("c03_s02_note_key_coverer") _set_notes_coverer("c03_s02_note_key_coverer")
.lighted.connect(_set_notes_coverer.bind(""), CONNECT_ONE_SHOT) .lighted.connect(_gaslight_up, CONNECT_ONE_SHOT)
else:
closeup洋糕点.enabled = true
func _gaslight_up() -> void:
closeup洋糕点.enabled = true
_set_notes_coverer("")
func _set_notes_coverer(coverer: String) -> void: func _set_notes_coverer(coverer: String) -> void:
note小蝉的床.note_key_coverer = coverer note小蝉的床.note_key_coverer = coverer
note通风管道.note_key_coverer = coverer note通风管道.note_key_coverer = coverer
note八卦图.note_key_coverer = coverer
note十字架.note_key_coverer = coverer

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=17 format=3 uid="uid://ctwy1ubhm68la"] [gd_scene load_steps=19 format=3 uid="uid://ctwy1ubhm68la"]
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_jad6f"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_jad6f"]
[ext_resource type="Script" path="res://scene/ground/scene/c03/s02_瞎子新卧室.gd" id="2_y504i"] [ext_resource type="Script" uid="uid://tk4wg0i4payx" path="res://scene/ground/scene/c03/s02_瞎子新卧室.gd" id="2_y504i"]
[ext_resource type="Script" uid="uid://cpejxlfni6n52" path="res://manager/audio_manager/vibe_sfx.gd" id="3_kchgf"] [ext_resource type="Script" uid="uid://cpejxlfni6n52" path="res://manager/audio_manager/vibe_sfx.gd" id="3_kchgf"]
[ext_resource type="Texture2D" uid="uid://vc2hn6t5bedg" path="res://asset/art/scene/c03/s02_瞎子新卧室/bg_瞎子新卧室.png" id="4_hehhg"] [ext_resource type="Texture2D" uid="uid://vc2hn6t5bedg" path="res://asset/art/scene/c03/s02_瞎子新卧室/bg_瞎子新卧室.png" id="4_hehhg"]
[ext_resource type="Texture2D" uid="uid://7ay1ttob8qwm" path="res://asset/art/scene/c02/s08_瞎子卧室/e_床板.png" id="5_xifhb"] [ext_resource type="Texture2D" uid="uid://7ay1ttob8qwm" path="res://asset/art/scene/c02/s08_瞎子卧室/e_床板.png" id="5_xifhb"]
@ -9,12 +9,14 @@
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="6_jad6f"] [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="6_jad6f"]
[ext_resource type="Texture2D" uid="uid://bmid3iu2ch35o" path="res://asset/art/scene/c02/s08_瞎子卧室/八卦图.png" id="7_u55tr"] [ext_resource type="Texture2D" uid="uid://bmid3iu2ch35o" path="res://asset/art/scene/c02/s08_瞎子卧室/八卦图.png" id="7_u55tr"]
[ext_resource type="Texture2D" uid="uid://vqyhgyka3sfo" path="res://asset/art/scene/c02/s08_瞎子卧室/瞎子卧室前景.png" id="8_hehhg"] [ext_resource type="Texture2D" uid="uid://vqyhgyka3sfo" path="res://asset/art/scene/c02/s08_瞎子卧室/瞎子卧室前景.png" id="8_hehhg"]
[ext_resource type="Script" path="res://scene/ground/script/c03/s02_event_2d偷听陆仁小蝶对话后.gd" id="8_pixqd"] [ext_resource type="Script" uid="uid://n56a07gyjq1u" path="res://scene/ground/script/c03/s02_event_2d偷听陆仁小蝶对话后.gd" id="8_pixqd"]
[ext_resource type="SpriteFrames" uid="uid://div8kcn7gu78r" path="res://asset/art/gif/c03_小蝶询问瞎子/c03_小蝶询问瞎子_frames.tres" id="10_2hv3f"] [ext_resource type="SpriteFrames" uid="uid://div8kcn7gu78r" path="res://asset/art/gif/c03_小蝶询问瞎子/c03_小蝶询问瞎子_frames.tres" id="10_2hv3f"]
[ext_resource type="PackedScene" uid="uid://b50n0hvs4yh75" path="res://addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.tscn" id="10_jad6f"] [ext_resource type="PackedScene" uid="uid://b50n0hvs4yh75" path="res://addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.tscn" id="10_jad6f"]
[ext_resource type="PackedScene" uid="uid://cxw5rovg5mu1a" path="res://scene/ground/script/c02/s00_煤油灯.tscn" id="10_kchgf"] [ext_resource type="PackedScene" uid="uid://cxw5rovg5mu1a" path="res://scene/ground/script/c02/s00_煤油灯.tscn" id="10_kchgf"]
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="10_v3seo"] [ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="10_v3seo"]
[ext_resource type="Texture2D" uid="uid://bcqcvohj7jy40" path="res://asset/art/scene/c02/杂物/煤油灯 关灯.png" id="11_crt0l"] [ext_resource type="Texture2D" uid="uid://bcqcvohj7jy40" path="res://asset/art/scene/c02/杂物/煤油灯 关灯.png" id="11_crt0l"]
[ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="12_kffel"]
[ext_resource type="PackedScene" uid="uid://jp6ut4wayw7g" path="res://scene/ground/script/c03/s02_closeup洋糕点.tscn" id="13_fl7if"]
[sub_resource type="AnimationLibrary" id="AnimationLibrary_k01ve"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_k01ve"]
@ -63,29 +65,15 @@ target_scene = "c02_s06"
target_portal = "1" target_portal = "1"
status = "opened" status = "opened"
[node name="Note十字架" parent="Ground/DeployLayer" index="3" instance=ExtResource("10_v3seo")] [node name="Sprite2D十字架" type="Sprite2D" parent="Ground/DeployLayer" index="3"]
unique_name_in_owner = true
position = Vector2(329, -3)
sign_mark_offset = Vector2(0, -13.89)
title_filter = "c02"
note_key = "c02_瞎子卧室_十字架"
[node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/Note十字架"]
show_behind_parent = true show_behind_parent = true
position = Vector2(0, -3) position = Vector2(329, -6)
scale = Vector2(0.5, 0.5) scale = Vector2(0.5, 0.5)
texture = ExtResource("6_hehhg") texture = ExtResource("6_hehhg")
[node name="Note八卦图" parent="Ground/DeployLayer" index="4" instance=ExtResource("10_v3seo")] [node name="Sprite2D八卦图" type="Sprite2D" parent="Ground/DeployLayer" index="4"]
unique_name_in_owner = true
position = Vector2(144, -14)
sign_mark_offset = Vector2(0, -10.86)
title_filter = "c02"
note_key = "c02_瞎子卧室_八卦图"
[node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/Note八卦图"]
show_behind_parent = true show_behind_parent = true
position = Vector2(0, -2) position = Vector2(144, -16)
scale = Vector2(0.5, 0.5) scale = Vector2(0.5, 0.5)
texture = ExtResource("7_u55tr") texture = ExtResource("7_u55tr")
@ -107,6 +95,8 @@ unique_name_in_owner = true
position = Vector2(167, 31) position = Vector2(167, 31)
sprite_scale = 0.33 sprite_scale = 0.33
hide_texture = true hide_texture = true
gaslight_energy = 2.0
gaslight_ground_energy = 2.0
sign_mark_offset = Vector2(0, -18.4) sign_mark_offset = Vector2(0, -18.4)
[node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/煤油灯"] [node name="Sprite2D" type="Sprite2D" parent="Ground/DeployLayer/煤油灯"]
@ -114,7 +104,13 @@ show_behind_parent = true
position = Vector2(0, -15) position = Vector2(0, -15)
texture = ExtResource("11_crt0l") texture = ExtResource("11_crt0l")
[node name="Event2D偷听陆仁对话后" type="Node2D" parent="Ground/DeployLayer" index="8"] [node name="Closeup洋糕点" parent="Ground/DeployLayer" index="8" instance=ExtResource("12_kffel")]
unique_name_in_owner = true
position = Vector2(196, 19)
packed_scene = ExtResource("13_fl7if")
enabled = false
[node name="Event2D偷听陆仁对话后" type="Node2D" parent="Ground/DeployLayer" index="9"]
script = ExtResource("8_pixqd") script = ExtResource("8_pixqd")
event_name = &"c03_invite_xchan_supper" event_name = &"c03_invite_xchan_supper"
event_stages = Array[int]([1]) event_stages = Array[int]([1])

View File

@ -80,9 +80,7 @@ position = Vector2(501, 46)
title_filter = "c03" title_filter = "c03"
[node name="MainPlayer" parent="Ground" index="5"] [node name="MainPlayer" parent="Ground" index="5"]
visible = false
position = Vector2(34, 98) position = Vector2(34, 98)
hide_sprite = true
catty_light_energy = 0.5 catty_light_energy = 0.5
player_movement_rect = Rect2(35, -158, 506, 316) player_movement_rect = Rect2(35, -158, 506, 316)
facing_direction = Vector2(1, 0) facing_direction = Vector2(1, 0)

View File

@ -0,0 +1,9 @@
extends CanvasLayer
@warning_ignore("unused_signal")
signal exit(arg)
@onready var bg = $BG as TextureRect
func _ready() -> void:
layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME

View File

@ -0,0 +1 @@
uid://g8moj85vc4ad

View File

@ -0,0 +1,58 @@
[gd_scene load_steps=6 format=3 uid="uid://jp6ut4wayw7g"]
[ext_resource type="Script" uid="uid://g8moj85vc4ad" path="res://scene/ground/script/c03/s02_closeup洋糕点.gd" id="1_i4mac"]
[ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/遮罩/inspect特写通用遮罩.png" id="2_1bew5"]
[ext_resource type="PackedScene" uid="uid://dmysq4sxx8iqh" path="res://scene/entity/ux/content_inspector.tscn" id="3_1ggwo"]
[ext_resource type="Texture2D" uid="uid://f186lvt5y2ql" path="res://asset/art/ui/遮罩/inspect背景遮罩.png" id="5_td6vl"]
[ext_resource type="Script" uid="uid://dpocj5al0rvai" path="res://ui/text_helper.gd" id="6_mdgwr"]
[node name="Closeup洋糕点" type="CanvasLayer"]
script = ExtResource("1_i4mac")
[node name="BG" type="TextureRect" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 0
[node name="遮罩" type="TextureRect" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = ExtResource("2_1bew5")
[node name="ContentInspector" parent="." instance=ExtResource("3_1ggwo")]
mouse_filter = 2
[node name="遮罩" type="TextureRect" parent="ContentInspector"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = ExtResource("5_td6vl")
[node name="Label" type="Label" parent="ContentInspector/遮罩"]
custom_minimum_size = Vector2(180, 0)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -60.0
offset_top = -15.5
offset_right = 60.0
offset_bottom = 15.5
grow_horizontal = 2
grow_vertical = 2
vertical_alignment = 1
autowrap_mode = 3
script = ExtResource("6_mdgwr")

View File

@ -15,7 +15,7 @@ func _on_global_stage_updated(e: StringName, s: int):
super._on_global_stage_updated(e, s) super._on_global_stage_updated(e, s)
func _on_ground_ready(ground: Ground2D): func _on_ground_ready(_ground: Ground2D):
# 邀请小蝉晚饭 # 邀请小蝉晚饭
if stage == 1: if stage == 1:
SceneManager.lock_player() SceneManager.lock_player()

File diff suppressed because one or more lines are too long

View File

@ -21,13 +21,19 @@ var success_states: Array = [2, 1, 3, 0]
func _ready() -> void: func _ready() -> void:
# 道具
$"倒塌/Props/剪刀".interacted.connect(SceneManager.enable_prop_item.bind("prop_剪刀"))
$"倒塌/Props/纸舌头".interacted.connect(SceneManager.enable_prop_item.bind("prop_纸舌头"))
$"../刮刮乐".visible = true $"../刮刮乐".visible = true
var shaven = ArchiveManager.get_global_value("刮海报_理发店") var shaven = ArchiveManager.get_global_value("刮海报_理发店")
states = ArchiveManager.get_global_value("c03_s03_hariti_states", []) states = ArchiveManager.get_global_value("c03_s03_hariti_states", [])
_setup_state() _setup_state()
if _check_success(): if _check_success():
get_node("../刮刮乐").queue_free() get_node("../刮刮乐").queue_free()
freezing = true $"倒塌".visible = true
$"倒塌".frame = 3
$"倒塌/Props".visible = true
elif shaven: elif shaven:
_on_shaven_fulfilled() _on_shaven_fulfilled()
else: else:
@ -35,7 +41,6 @@ func _ready() -> void:
for i in range(1, 5): for i in range(1, 5):
get_node("kid" + str(i)).picked.connect(_on_picked.bind(i)) get_node("kid" + str(i)).picked.connect(_on_picked.bind(i))
func _on_shaven_fulfilled(): func _on_shaven_fulfilled():
get_node("../刮刮乐").queue_free() get_node("../刮刮乐").queue_free()
freezing = false freezing = false
@ -53,17 +58,15 @@ func _on_picked(node, id):
$SfxFlip.play() $SfxFlip.play()
elif not freezing: elif not freezing:
$SfxSuccess.play() $SfxSuccess.play()
freezing = true
_on_game_success() _on_game_success()
func _on_game_success(): func _on_game_success():
SceneManager.enable_prop_item_silently("prop_纸舌头") freezing = true
SceneManager.enable_prop_item("prop_剪刀") $"倒塌".visible = true
await SceneManager.get_inspector().quit_and_hidden $"倒塌".play()
SceneManager.enable_prop_item("prop_纸舌头") await $"倒塌".animation_finished
await SceneManager.get_inspector().quit_and_hidden $"倒塌/Props".visible = true
get_parent().exit.emit(true)
func _setup_state(): func _setup_state():

View File

@ -54,7 +54,7 @@ static var current_focusing_item = "":
set(val): set(val):
current_focusing_item = val current_focusing_item = val
if GlobalConfig.DEBUG: if GlobalConfig.DEBUG:
print("current_focusing_item=", current_focusing_item) print("Draggable2D current_focusing_item=", current_focusing_item)
static var pending_enter_callables := [] as Array[Callable] static var pending_enter_callables := [] as Array[Callable]