1
0
mirror of https://gitee.com/freeyz/godot-mota.git synced 2024-12-22 14:59:21 +08:00

修复商店没有增加使用次数的bug

This commit is contained in:
freewu32 2020-09-05 15:32:34 +08:00
parent fb7ec1bc40
commit 480d9cf4fa

View File

@ -52,14 +52,17 @@ func _on_CloseDialog_pressed():
func _on_AddHp_pressed():
if enough_money_to_pay():
player.hp += added_hp
used_count += 1
func _on_AddAtk_pressed():
if enough_money_to_pay():
player.atk += added_atk
used_count += 1
func _on_AddDef_pressed():
if enough_money_to_pay():
player.def += added_def
used_count += 1
func get_used_money() -> int:
return init_money * (used_count + 1)