Lessons: Player health, damage, stats, resources
This commit is contained in:
parent
147199a012
commit
7842e15c6c
13 changed files with 153 additions and 18 deletions
|
@ -2,8 +2,12 @@ extends KinematicBody2D
|
|||
|
||||
export (int) var MAX_SPEED = 15
|
||||
|
||||
onready var stats = $EnemyStats
|
||||
|
||||
var motion = Vector2.ZERO
|
||||
|
||||
func _on_Hurtbox_hit(damage):
|
||||
stats.health -= damage
|
||||
|
||||
func _on_Hurtbox_hit(_damage):
|
||||
func _on_EnemyStats_enemy_died():
|
||||
queue_free()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue