public override void Tick() { // if target has been killed if (!_target.IsInstanciate) { TargetDeath(); return; } // Can entity attack target? if (_entityDetection.IsEntityInAttackRange(_target)) { _entityMovement.StopMoving(); _entityAttack.DoAttack(_target); } else // Otherwise, entity go closer. { _entityMovement.MoveToEntity(_target); } }