13 lines
193 B
GDScript
13 lines
193 B
GDScript
class Player:
|
|
export var health = 100
|
|
export var speed = 10
|
|
export var UI: NodePath
|
|
|
|
func take_damage(damage: float):
|
|
health -= damage
|
|
if health <= 0:
|
|
die()
|
|
|
|
func die():
|
|
pass
|