13 lines
193 B
GDScript3
13 lines
193 B
GDScript3
|
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
|