xiandie/scene/ground/scene/c02/s04_保卫科.gd
2025-06-30 18:33:40 +08:00

32 lines
707 B
GDScript

@tool
extends AnimationRoot
# 覆盖该方法
func _default_data() -> Dictionary:
return {}
func _ready() -> void:
super._ready()
if Engine.is_editor_hint():
return
var closeup_tin_coin
var little_hand
func _on_ground_ready() -> void:
closeup_tin_coin = $"../DeployLayer/Closeup折锡纸" as Closeup2D
if not ArchiveManager.get_global_value(&"c02_tin_coin_taken"):
closeup_tin_coin.exit.connect(_on_closeup_tin_coin_exited)
func _on_closeup_tin_coin_exited(arg = null):
if arg == true:
ArchiveManager.set_global_entry(&"c02_tin_coin_taken", true)
SceneManager.enable_prop_item_silently("prop_锡箔元宝")
await Util.wait(0.5)
SceneManager.enable_prop_item("prop_锡箔元宝")