mirror of
https://gitee.com/freeyz/godot-mota.git
synced 2024-12-22 20:39:19 +08:00
修复商店没有增加使用次数的bug
This commit is contained in:
parent
fb7ec1bc40
commit
480d9cf4fa
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user