1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(武器系统): 为实体添加随机武器生成功能

在实体初始化时,除了固定添加紫色水晶武器外,现在会从武器库中随机选择一种武器进行实例化
This commit is contained in:
2026-01-18 17:13:33 +08:00
parent 22c72394d4
commit 3e0e8d3ff7
+1
View File
@@ -126,6 +126,7 @@ func _ready():
for i in weaponStore.get_children():
i.free()
weaponStore.add_child(ComponentManager.getWeapon("PurpleCrystal").instantiate())
weaponStore.add_child(MathTool.randomChoiceFrom(ComponentManager.weapons).instantiate())
for i in weaponStore.get_children():
i.hide()
weapons.append(i)