using System; using Godot; public partial class Enemy : PathFollow2D { [Export] public EnemyType Type; [Export] public Health Health; public event Action Died; public override void _Ready() { Health.Death += _ => Died?.Invoke(this); } public void ResetEnemy() { GlobalPosition = Vector2.Zero; Rotation = 0f; Visible = true; ProcessMode = ProcessModeEnum.Inherit; Health.Reset(); // reset velocity, animation, AI, etc here } }