Merge remote-tracking branch 'origin/demo'
This commit is contained in:
commit
bfd510039d
@ -8,6 +8,7 @@ signal exit(arg)
|
|||||||
|
|
||||||
@export var packed_scene: PackedScene
|
@export var packed_scene: PackedScene
|
||||||
@export var quit_closeup_on_cancel := true
|
@export var quit_closeup_on_cancel := true
|
||||||
|
@export var on_display_hide_hud := false
|
||||||
@export var on_display_change_volumn := true
|
@export var on_display_change_volumn := true
|
||||||
@export var on_display_changed_volumn_db := -7.0
|
@export var on_display_changed_volumn_db := -7.0
|
||||||
@export_tool_button("新建特写场景") var create_closeup_scene = _create_scene_with_script
|
@export_tool_button("新建特写场景") var create_closeup_scene = _create_scene_with_script
|
||||||
@ -23,6 +24,7 @@ func _ready() -> void:
|
|||||||
return
|
return
|
||||||
interacted.connect(display)
|
interacted.connect(display)
|
||||||
|
|
||||||
|
|
||||||
func hold_cancel_before_exit() -> void:
|
func hold_cancel_before_exit() -> void:
|
||||||
_holding_cancel_before_exit = true
|
_holding_cancel_before_exit = true
|
||||||
|
|
||||||
@ -32,6 +34,8 @@ func display() -> void:
|
|||||||
if current_child:
|
if current_child:
|
||||||
return
|
return
|
||||||
if packed_scene:
|
if packed_scene:
|
||||||
|
if on_display_hide_hud and SceneManager.get_ground().display_hud:
|
||||||
|
SceneManager.get_prop_hud().hide_hud()
|
||||||
if on_display_change_volumn:
|
if on_display_change_volumn:
|
||||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "change_volumn_db" , on_display_changed_volumn_db)
|
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "change_volumn_db" , on_display_changed_volumn_db)
|
||||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "change_volumn_db" , on_display_changed_volumn_db)
|
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "change_volumn_db" , on_display_changed_volumn_db)
|
||||||
@ -48,6 +52,8 @@ func display() -> void:
|
|||||||
|
|
||||||
func _exit(arg = null):
|
func _exit(arg = null):
|
||||||
if current_child:
|
if current_child:
|
||||||
|
if on_display_hide_hud and SceneManager.get_ground().display_hud:
|
||||||
|
SceneManager.get_prop_hud().display_hud()
|
||||||
if on_display_change_volumn:
|
if on_display_change_volumn:
|
||||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "reset_volumn_to_default")
|
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX, "reset_volumn_to_default")
|
||||||
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "reset_volumn_to_default")
|
get_tree().call_group(GlobalConfig.GROUP_GROUND_SFX2D, "reset_volumn_to_default")
|
||||||
@ -62,12 +68,13 @@ func _exit(arg = null):
|
|||||||
# exit 信号后,恢复处理 cancel 事件
|
# exit 信号后,恢复处理 cancel 事件
|
||||||
_holding_cancel_before_exit = false
|
_holding_cancel_before_exit = false
|
||||||
|
|
||||||
|
|
||||||
func _unhandled_input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
if not current_child:
|
if not current_child:
|
||||||
return
|
return
|
||||||
if event.is_action_pressed("cancel"):
|
if event.is_action_pressed("cancel"):
|
||||||
get_viewport().set_input_as_handled()
|
|
||||||
if quit_closeup_on_cancel and not _holding_cancel_before_exit:
|
if quit_closeup_on_cancel and not _holding_cancel_before_exit:
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
_exit()
|
_exit()
|
||||||
# 在有特写界面时,阻塞 interact 输入
|
# 在有特写界面时,阻塞 interact 输入
|
||||||
elif event.is_action_pressed("interact"):
|
elif event.is_action_pressed("interact"):
|
||||||
|
@ -131,6 +131,7 @@ content_key = "c02_海报1"
|
|||||||
position = Vector2(253, -31)
|
position = Vector2(253, -31)
|
||||||
texture = ExtResource("10_jg8g0")
|
texture = ExtResource("10_jg8g0")
|
||||||
packed_scene = ExtResource("11_jg8g0")
|
packed_scene = ExtResource("11_jg8g0")
|
||||||
|
on_display_hide_hud = true
|
||||||
first_interact_os_key = "c02_海报_剪辫子侦探"
|
first_interact_os_key = "c02_海报_剪辫子侦探"
|
||||||
|
|
||||||
[node name="青岛啤酒" parent="Ground/DeployLayer" index="7" instance=ExtResource("12_0fckv")]
|
[node name="青岛啤酒" parent="Ground/DeployLayer" index="7" instance=ExtResource("12_0fckv")]
|
||||||
@ -260,10 +261,7 @@ player_movement_rect = Rect2(19, -158, 667, 316)
|
|||||||
facing_direction = Vector2(1, 0)
|
facing_direction = Vector2(1, 0)
|
||||||
|
|
||||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||||
limit_left = 0
|
|
||||||
limit_top = -158
|
|
||||||
limit_right = 700
|
limit_right = 700
|
||||||
limit_bottom = 158
|
|
||||||
|
|
||||||
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
|
[node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"]
|
||||||
points = PackedVector2Array(19, 150, 686, 150)
|
points = PackedVector2Array(19, 150, 686, 150)
|
||||||
|
@ -800,6 +800,7 @@ collision_width_and_x = Vector2(40, 0)
|
|||||||
[node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="25" instance=ExtResource("23_81juy")]
|
[node name="Closeup敲门游戏" parent="Ground/DeployLayer" index="25" instance=ExtResource("23_81juy")]
|
||||||
position = Vector2(466, 3)
|
position = Vector2(466, 3)
|
||||||
packed_scene = ExtResource("24_0o4rt")
|
packed_scene = ExtResource("24_0o4rt")
|
||||||
|
on_display_hide_hud = true
|
||||||
collision_width_and_x = Vector2(40, 0)
|
collision_width_and_x = Vector2(40, 0)
|
||||||
|
|
||||||
[node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="26" instance=ExtResource("25_iyaiw")]
|
[node name="Ambush惊悚闪电" parent="Ground/DeployLayer" index="26" instance=ExtResource("25_iyaiw")]
|
||||||
@ -822,6 +823,7 @@ frame_progress = 0.643855
|
|||||||
z_index = 6
|
z_index = 6
|
||||||
position = Vector2(2063, 50)
|
position = Vector2(2063, 50)
|
||||||
packed_scene = ExtResource("26_yy4fp")
|
packed_scene = ExtResource("26_yy4fp")
|
||||||
|
on_display_hide_hud = true
|
||||||
action_key = 3
|
action_key = 3
|
||||||
|
|
||||||
[node name="Npc井边疯子" parent="Ground/DeployLayer" index="30" instance=ExtResource("35_plfv5")]
|
[node name="Npc井边疯子" parent="Ground/DeployLayer" index="30" instance=ExtResource("35_plfv5")]
|
||||||
|
@ -92,6 +92,7 @@ texture = ExtResource("9_k74x7")
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2(189, 15)
|
position = Vector2(189, 15)
|
||||||
packed_scene = ExtResource("7_fvlg0")
|
packed_scene = ExtResource("7_fvlg0")
|
||||||
|
on_display_hide_hud = true
|
||||||
first_interact_os_key = "c02_保卫科祭台os"
|
first_interact_os_key = "c02_保卫科祭台os"
|
||||||
|
|
||||||
[node name="Closeup老鼠精" parent="Ground/DeployLayer" index="7" instance=ExtResource("6_66gue")]
|
[node name="Closeup老鼠精" parent="Ground/DeployLayer" index="7" instance=ExtResource("6_66gue")]
|
||||||
@ -99,11 +100,13 @@ light_mask = 5
|
|||||||
position = Vector2(207.5, -40.5)
|
position = Vector2(207.5, -40.5)
|
||||||
texture = ExtResource("11_ffvrp")
|
texture = ExtResource("11_ffvrp")
|
||||||
packed_scene = ExtResource("8_cm3g6")
|
packed_scene = ExtResource("8_cm3g6")
|
||||||
|
on_display_hide_hud = true
|
||||||
|
|
||||||
[node name="Closeup花名册" parent="Ground/DeployLayer" index="8" instance=ExtResource("6_66gue")]
|
[node name="Closeup花名册" parent="Ground/DeployLayer" index="8" instance=ExtResource("6_66gue")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2(351, 31)
|
position = Vector2(351, 31)
|
||||||
packed_scene = ExtResource("6_fvlg0")
|
packed_scene = ExtResource("6_fvlg0")
|
||||||
|
on_display_hide_hud = true
|
||||||
first_interact_os_key = "c02_保卫科花名册os"
|
first_interact_os_key = "c02_保卫科花名册os"
|
||||||
|
|
||||||
[node name="煤油灯" type="Sprite2D" parent="Ground/DeployLayer" index="9"]
|
[node name="煤油灯" type="Sprite2D" parent="Ground/DeployLayer" index="9"]
|
||||||
|
@ -185,6 +185,7 @@ hook_method = "wood_puppet"
|
|||||||
position = Vector2(-108, -168)
|
position = Vector2(-108, -168)
|
||||||
packed_scene = ExtResource("10_7mq0m")
|
packed_scene = ExtResource("10_7mq0m")
|
||||||
quit_closeup_on_cancel = false
|
quit_closeup_on_cancel = false
|
||||||
|
on_display_hide_hud = true
|
||||||
on_display_changed_volumn_db = 0.0
|
on_display_changed_volumn_db = 0.0
|
||||||
action_key = 3
|
action_key = 3
|
||||||
first_interact_os_key = "c02_一楼戏台"
|
first_interact_os_key = "c02_一楼戏台"
|
||||||
@ -225,6 +226,7 @@ texture = ExtResource("8_mrltr")
|
|||||||
[node name="Closeup戏台" parent="Ground/DeployLayer" index="8" instance=ExtResource("10_2yvhw")]
|
[node name="Closeup戏台" parent="Ground/DeployLayer" index="8" instance=ExtResource("10_2yvhw")]
|
||||||
position = Vector2(305, -249)
|
position = Vector2(305, -249)
|
||||||
packed_scene = ExtResource("11_2yvhw")
|
packed_scene = ExtResource("11_2yvhw")
|
||||||
|
on_display_hide_hud = true
|
||||||
first_interact_os_key = "c02_一楼戏台"
|
first_interact_os_key = "c02_一楼戏台"
|
||||||
|
|
||||||
[node name="Note一楼内侧通道" parent="Ground/DeployLayer" index="9" instance=ExtResource("10_8t4w6")]
|
[node name="Note一楼内侧通道" parent="Ground/DeployLayer" index="9" instance=ExtResource("10_8t4w6")]
|
||||||
|
@ -1237,12 +1237,14 @@ quit_closeup_on_cancel = false
|
|||||||
[node name="Closeup水盆" parent="Ground/DeployLayer" index="19" instance=ExtResource("11_owxx3")]
|
[node name="Closeup水盆" parent="Ground/DeployLayer" index="19" instance=ExtResource("11_owxx3")]
|
||||||
position = Vector2(289, 16)
|
position = Vector2(289, 16)
|
||||||
packed_scene = ExtResource("16_p6da7")
|
packed_scene = ExtResource("16_p6da7")
|
||||||
|
on_display_hide_hud = true
|
||||||
first_interact_os_key = "c02_二楼水盆"
|
first_interact_os_key = "c02_二楼水盆"
|
||||||
|
|
||||||
[node name="Closeup谢幕演出" parent="Ground/DeployLayer" index="20" instance=ExtResource("11_owxx3")]
|
[node name="Closeup谢幕演出" parent="Ground/DeployLayer" index="20" instance=ExtResource("11_owxx3")]
|
||||||
position = Vector2(518, -272)
|
position = Vector2(518, -272)
|
||||||
packed_scene = ExtResource("25_m28ab")
|
packed_scene = ExtResource("25_m28ab")
|
||||||
quit_closeup_on_cancel = false
|
quit_closeup_on_cancel = false
|
||||||
|
on_display_hide_hud = true
|
||||||
action_key = 3
|
action_key = 3
|
||||||
|
|
||||||
[node name="c02_final" type="Node2D" parent="Ground/DeployLayer" index="21"]
|
[node name="c02_final" type="Node2D" parent="Ground/DeployLayer" index="21"]
|
||||||
@ -1410,10 +1412,7 @@ player_movement_rect = Rect2(26, -158, 874, 316)
|
|||||||
facing_direction = Vector2(1, 0)
|
facing_direction = Vector2(1, 0)
|
||||||
|
|
||||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||||
limit_left = 0
|
|
||||||
limit_top = -158
|
|
||||||
limit_right = 927
|
limit_right = 927
|
||||||
limit_bottom = 158
|
|
||||||
|
|
||||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||||
position = Vector2(0, -5)
|
position = Vector2(0, -5)
|
||||||
|
@ -77,6 +77,7 @@ position = Vector2(-5, 78)
|
|||||||
position = Vector2(292, -11)
|
position = Vector2(292, -11)
|
||||||
texture = ExtResource("10_6ivku")
|
texture = ExtResource("10_6ivku")
|
||||||
packed_scene = ExtResource("11_vxng8")
|
packed_scene = ExtResource("11_vxng8")
|
||||||
|
on_display_hide_hud = true
|
||||||
first_interact_os_key = "c02_海报_戏法班"
|
first_interact_os_key = "c02_海报_戏法班"
|
||||||
|
|
||||||
[node name="Note老鼠洞" parent="Ground/DeployLayer" index="7" instance=ExtResource("13_s75vl")]
|
[node name="Note老鼠洞" parent="Ground/DeployLayer" index="7" instance=ExtResource("13_s75vl")]
|
||||||
@ -115,10 +116,7 @@ position = Vector2(41, 98)
|
|||||||
player_movement_rect = Rect2(37, -158, 573, 316)
|
player_movement_rect = Rect2(37, -158, 573, 316)
|
||||||
|
|
||||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||||
limit_left = 0
|
|
||||||
limit_top = -158
|
|
||||||
limit_right = 645
|
limit_right = 645
|
||||||
limit_bottom = 158
|
|
||||||
|
|
||||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||||
position = Vector2(11, -1)
|
position = Vector2(11, -1)
|
||||||
|
@ -204,11 +204,13 @@ texture_scale = 0.15
|
|||||||
[node name="Closeup画" parent="Ground/DeployLayer" index="3" instance=ExtResource("10_a48k2")]
|
[node name="Closeup画" parent="Ground/DeployLayer" index="3" instance=ExtResource("10_a48k2")]
|
||||||
position = Vector2(214, -19)
|
position = Vector2(214, -19)
|
||||||
packed_scene = ExtResource("11_mc126")
|
packed_scene = ExtResource("11_mc126")
|
||||||
|
on_display_hide_hud = true
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|
||||||
[node name="Closeup讨厌他们" parent="Ground/DeployLayer" index="4" instance=ExtResource("10_a48k2")]
|
[node name="Closeup讨厌他们" parent="Ground/DeployLayer" index="4" instance=ExtResource("10_a48k2")]
|
||||||
position = Vector2(214, -19)
|
position = Vector2(214, -19)
|
||||||
packed_scene = ExtResource("16_nub1x")
|
packed_scene = ExtResource("16_nub1x")
|
||||||
|
on_display_hide_hud = true
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|
||||||
[node name="灯座Sprite2D" type="Sprite2D" parent="Ground/DeployLayer" index="5"]
|
[node name="灯座Sprite2D" type="Sprite2D" parent="Ground/DeployLayer" index="5"]
|
||||||
@ -368,10 +370,7 @@ texture = SubResource("GradientTexture2D_bp5fr")
|
|||||||
current = true
|
current = true
|
||||||
|
|
||||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||||
limit_left = 0
|
|
||||||
limit_top = -158
|
|
||||||
limit_right = 725
|
limit_right = 725
|
||||||
limit_bottom = 158
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="0"]
|
||||||
position = Vector2(291, 94)
|
position = Vector2(291, 94)
|
||||||
|
@ -183,6 +183,7 @@ texture = ExtResource("8_3ftnp")
|
|||||||
position = Vector2(349, 15)
|
position = Vector2(349, 15)
|
||||||
texture = ExtResource("18_3kyh4")
|
texture = ExtResource("18_3kyh4")
|
||||||
packed_scene = ExtResource("18_5t4pt")
|
packed_scene = ExtResource("18_5t4pt")
|
||||||
|
on_display_hide_hud = true
|
||||||
sign_mark_offset = Vector2(0, -7.93)
|
sign_mark_offset = Vector2(0, -7.93)
|
||||||
first_interact_os_key = "c02_互动小蝉头套"
|
first_interact_os_key = "c02_互动小蝉头套"
|
||||||
|
|
||||||
@ -271,12 +272,6 @@ position = Vector2(315, 98)
|
|||||||
player_movement_rect = Rect2(50, -158, 460, 316)
|
player_movement_rect = Rect2(50, -158, 460, 316)
|
||||||
facing_direction = Vector2(1, 0)
|
facing_direction = Vector2(1, 0)
|
||||||
|
|
||||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
|
||||||
limit_left = 0
|
|
||||||
limit_top = -158
|
|
||||||
limit_right = 564
|
|
||||||
limit_bottom = 158
|
|
||||||
|
|
||||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||||
visible = false
|
visible = false
|
||||||
position = Vector2(193, 0)
|
position = Vector2(193, 0)
|
||||||
|
@ -149,6 +149,7 @@ metadata/_custom_type_script = "uid://bkkiyk5jkdw4d"
|
|||||||
position = Vector2(573, -6)
|
position = Vector2(573, -6)
|
||||||
texture = ExtResource("11_amci2")
|
texture = ExtResource("11_amci2")
|
||||||
packed_scene = ExtResource("7_d27sg")
|
packed_scene = ExtResource("7_d27sg")
|
||||||
|
on_display_hide_hud = true
|
||||||
|
|
||||||
[node name="EventBinder" type="Node" parent="Ground/DeployLayer/Event2D放肉后/CloseupDemo公告"]
|
[node name="EventBinder" type="Node" parent="Ground/DeployLayer/Event2D放肉后/CloseupDemo公告"]
|
||||||
script = ExtResource("6_yaa68")
|
script = ExtResource("6_yaa68")
|
||||||
|
@ -262,6 +262,13 @@ func _chechout_stage(s: int, play_sfx := true) -> void:
|
|||||||
stage = s
|
stage = s
|
||||||
_hide_all()
|
_hide_all()
|
||||||
var display_handle_outline = false
|
var display_handle_outline = false
|
||||||
|
if s >= 3:
|
||||||
|
# 隐藏道具栏
|
||||||
|
SceneManager.get_prop_hud().hide_hud()
|
||||||
|
# 禁止退出特写
|
||||||
|
var closeup = get_parent() as Closeup2D
|
||||||
|
if closeup:
|
||||||
|
closeup.hold_cancel_before_exit()
|
||||||
# 1关闭 2打开 3放入小蝉人偶 4全部放置正确(可摇手柄) 5已播放完成
|
# 1关闭 2打开 3放入小蝉人偶 4全部放置正确(可摇手柄) 5已播放完成
|
||||||
match s:
|
match s:
|
||||||
0:
|
0:
|
||||||
@ -326,6 +333,10 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||||||
hud.on_toggle_invalid_prop()
|
hud.on_toggle_invalid_prop()
|
||||||
elif event.is_action_pressed("cancel"):
|
elif event.is_action_pressed("cancel"):
|
||||||
get_viewport().set_input_as_handled()
|
get_viewport().set_input_as_handled()
|
||||||
|
if stage == 3:
|
||||||
|
# 摇把手阶段不可退出
|
||||||
|
return
|
||||||
|
SceneManager.get_prop_hud().display_hud()
|
||||||
exit.emit(false)
|
exit.emit(false)
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,6 +73,9 @@ var shooting = false
|
|||||||
|
|
||||||
|
|
||||||
func checkout_round(r: int):
|
func checkout_round(r: int):
|
||||||
|
if r == 0:
|
||||||
|
# 游戏开始,隐藏 hud
|
||||||
|
SceneManager.get_prop_hud().hide_hud()
|
||||||
round_id = r
|
round_id = r
|
||||||
# 关闭所有碰撞
|
# 关闭所有碰撞
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
@ -260,6 +263,7 @@ func game_win() -> void:
|
|||||||
var scene = DialogueManager.show_dialogue_balloon_scene(dialog_balloon_scene, dialogue_c02, "c02_弹珠游戏4")
|
var scene = DialogueManager.show_dialogue_balloon_scene(dialog_balloon_scene, dialogue_c02, "c02_弹珠游戏4")
|
||||||
await scene.ball_dialogue_ended
|
await scene.ball_dialogue_ended
|
||||||
await Util.wait(3.0)
|
await Util.wait(3.0)
|
||||||
|
SceneManager.get_prop_hud().display_hud()
|
||||||
exit.emit(true)
|
exit.emit(true)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user