feat: 创建 upgrade 数据resource,编写upgrade_panel.gd动态生成升级卡片

This commit is contained in:
luke358
2026-05-21 16:04:27 +08:00
parent ce3813c5dc
commit 1796d9e47d
14 changed files with 170 additions and 17 deletions
+11
View File
@@ -0,0 +1,11 @@
extends ItemBase
class_name ItemUpgrade
@export var value: float
@export var descriptin: String
@export var stat_id: String
func apply_upgrade() -> void:
var current_value := Global.player.stats.get(stat_id) as float
var new_value := float(value) + float(current_value)
Global.player.stats.set(stat_id, new_value)