检查器
检查器面板允许你对场景中的任何实体进行修改,例如更改其大小或层级,以及添加组件。

最后更新于
Tycoon_Unlock_Button :: class : Interactable {
price: s64 @ao_serialize;
is_unlocked: bool;
ao_start :: method() {
set_listener(this);
set_text("解锁");
}
can_use :: method(player: Player) -> bool {
return !is_unlocked;
}
on_interact :: method(player: Player) {
if !Economy.can_withdraw_currency(player, "Coins", price) return;
Economy.withdraw_currency(player, "Coins", price);
is_unlocked = true;
set_text("已解锁");
}
}