Enemy Dust Effect + Flying enemy aggro
This commit is contained in:
parent
3d940d26c0
commit
930ff3e2bb
5 changed files with 65 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
extends KinematicBody2D
|
||||
|
||||
const EnemyDeathEffect = preload("res://Scenes/Effects/EnemyDeathEffect.tscn")
|
||||
|
||||
export (int) var MAX_SPEED = 15
|
||||
|
||||
onready var stats = $EnemyStats
|
||||
|
@ -10,4 +12,5 @@ func _on_Hurtbox_hit(damage):
|
|||
stats.health -= damage
|
||||
|
||||
func _on_EnemyStats_enemy_died():
|
||||
Utils.instance_scene_on_main(EnemyDeathEffect, global_position)
|
||||
queue_free()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue