Improved attack animation

This commit is contained in:
2024-02-13 11:56:04 +01:00
parent 38133969fc
commit 7347c85ca7
5 changed files with 31 additions and 3 deletions

View File

@ -1,2 +1,11 @@
class_name EnemyController
extends Controller
var enemy: Enemy
func _ready():
enemy = owner
func _process(_delta):
var direction := (Global.player.global_position - enemy.global_position).normalized()
enemy.set_direction(direction)