public void stopUnit()
{
timerDeath timer = target.GetComponent<timerDeath>();
if (timer != null)
{
timer.UnitLostTarget(gameObject);
}
hasTarget = false;
var animator = GetComponent<Animator>();
if (animator != null)
{
animator.SetBool("walk", false);
}
status = Status.idle;
// If there is any callback, call it
if (callback != null)
callback();
}