Merge remote-tracking branch 'origin/demo'
This commit is contained in:
commit
2e2d65bb74
@ -187,6 +187,8 @@ func next_stage(event_name: StringName, stage_max := 99999) -> int:
|
||||
return new_stage
|
||||
return stage_max
|
||||
|
||||
# 写字声
|
||||
var note_sfx = preload("uid://cxeb1gsys78cb")
|
||||
|
||||
# --- 游戏特定逻辑 ---
|
||||
func _on_stage_updated_for_handnote(event_name: StringName, stage: int) -> void:
|
||||
@ -202,6 +204,7 @@ func _on_stage_updated_for_handnote(event_name: StringName, stage: int) -> void:
|
||||
# 笔记条目更新
|
||||
# 0 初始化隐藏,1 开始显示,2 划掉,3 结束隐藏
|
||||
if stage == 1:
|
||||
AudioManager.play_sfx(note_sfx)
|
||||
SceneManager.lock_player(3.0, 16, true)
|
||||
SceneManager.pop_notification("ui_notify_note_update")
|
||||
|
||||
|
@ -554,11 +554,13 @@ func enable_important_item(prop_key: String, display_inspector: bool) -> void:
|
||||
return
|
||||
|
||||
inventory.enable_important_item(prop_key)
|
||||
SceneManager.pop_notification("ui_notify_important_item_update")
|
||||
|
||||
if display_inspector:
|
||||
sfx_inspect.play()
|
||||
inspect_item(prop_key, false, true)
|
||||
else:
|
||||
# 如果不 inspect,则直接显示通知;否则在 inpect 结束后显示通知
|
||||
SceneManager.pop_notification("ui_notify_important_item_update")
|
||||
|
||||
|
||||
func enable_prop_item(prop_key: String, inspect := true, inspect_content := false) -> void:
|
||||
@ -615,6 +617,8 @@ func inspect_item(prop_key: String, display_obtained := true, as_important_item
|
||||
inspector.hiding_tween_started.connect(_post_display_detail.bind(texture, full_content), CONNECT_ONE_SHOT)
|
||||
elif display_mode == "skip":
|
||||
inspector.pop_prop_inspection(prop_key, texture, true, describe_content)
|
||||
# 检阅详情后增加记笔记动作
|
||||
inspector.quit_and_hidden.connect(_play_action_note, CONNECT_ONE_SHOT)
|
||||
else:
|
||||
inspector.pop_prop_inspection(prop_key, texture, display_obtained, describe_content)
|
||||
|
||||
@ -624,6 +628,17 @@ func _post_display_detail(texture, content) -> void:
|
||||
var wide = len(content) > 150
|
||||
var inspector = SceneManager.get_inspector() as PropInspector
|
||||
inspector.pop_standard_inspection(texture, null, content, false, wide)
|
||||
# 检阅详情后增加记笔记动作
|
||||
inspector.quit_and_hidden.connect(_play_action_note, CONNECT_ONE_SHOT)
|
||||
|
||||
# 写字声
|
||||
var note_sfx = preload("uid://cxeb1gsys78cb")
|
||||
|
||||
func _play_action_note() -> void:
|
||||
# 显示通知的同时,玩家动作
|
||||
SceneManager.pop_notification("ui_notify_important_item_update")
|
||||
SceneManager.lock_player(3.0, 16, true)
|
||||
AudioManager.play_sfx(note_sfx)
|
||||
|
||||
|
||||
func disable_prop_item(prop_key: String) -> void:
|
||||
|
Loading…
Reference in New Issue
Block a user