9 lines
226 B
GDScript3
9 lines
226 B
GDScript3
|
|
extends Item
|
||
|
|
@export var heal_amount = 1
|
||
|
|
@export var max_health_increase = 1
|
||
|
|
|
||
|
|
func collect() -> bool:
|
||
|
|
player.max_hp += max_health_increase
|
||
|
|
player.current_hp = min(player.max_hp, player.current_hp + heal_amount)
|
||
|
|
return true
|