2025-05-13 11:45:33 +00:00
|
|
|
extends CanvasLayer
|
|
|
|
|
|
|
|
|
|
|
|
@onready var button = $TextureButton as TextureButton
|
|
|
|
|
2025-08-12 11:18:43 +00:00
|
|
|
var texture_dict_c02 = {
|
2025-05-13 11:45:33 +00:00
|
|
|
"0": preload("res://asset/art/scene/c02/s04_保卫科/花名册/花名册封皮.png"),
|
|
|
|
"1": preload("res://asset/art/scene/c02/s04_保卫科/花名册/翻开页.png"),
|
|
|
|
}
|
2025-08-12 11:18:43 +00:00
|
|
|
var texture_dict_c03 = {
|
|
|
|
"0": preload("res://asset/art/scene/c02/s04_保卫科/花名册/花名册封皮.png"),
|
|
|
|
"1": preload("res://asset/art/scene/c02/s04_保卫科/花名册/翻开页_第二章.png"),
|
|
|
|
}
|
|
|
|
|
2025-05-13 11:45:33 +00:00
|
|
|
|
2025-06-11 05:43:36 +00:00
|
|
|
var click_count = 0
|
2025-05-13 11:45:33 +00:00
|
|
|
|
|
|
|
func _ready() -> void:
|
2025-07-05 18:13:12 +00:00
|
|
|
$"Sfx翻页".play()
|
2025-05-13 11:45:33 +00:00
|
|
|
layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME
|
|
|
|
button.pressed.connect(_on_button_pressed)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_button_pressed() -> void:
|
2025-07-05 18:13:12 +00:00
|
|
|
$"Sfx翻页".play()
|
2025-06-11 05:43:36 +00:00
|
|
|
click_count += 1
|
|
|
|
if click_count == 1:
|
2025-08-12 11:18:43 +00:00
|
|
|
if EventManager.get_chapter_stage() <= 2:
|
|
|
|
button.texture_normal = texture_dict_c02["1"]
|
|
|
|
$ContentInspector.visible = true
|
|
|
|
else:
|
|
|
|
button.texture_normal = texture_dict_c03["1"]
|
|
|
|
$ContentInspectorC03.visible = true
|
2025-08-12 14:17:03 +00:00
|
|
|
if not ArchiveManager.get_global_value("c03_prop_paper_tounge"):
|
|
|
|
var btn = $"Draggable舌头"
|
|
|
|
btn.show()
|
|
|
|
btn.picked.connect(_on_tounge_picked, CONNECT_ONE_SHOT)
|
2025-06-11 05:43:36 +00:00
|
|
|
button.set_anchors_preset(Control.PRESET_CENTER)
|
2025-07-05 18:24:20 +00:00
|
|
|
button.disabled = true
|
2025-08-12 14:17:03 +00:00
|
|
|
button.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
|
|
|
|
|
|
|
|
|
|
|
func _on_tounge_picked(_node) -> void:
|
|
|
|
$"Draggable舌头".hide()
|
|
|
|
ArchiveManager.set_global_entry("c03_prop_paper_tounge", true)
|
|
|
|
SceneManager.enable_prop_item("prop_纸舌头")
|