void Update()
    {
        if (currentHitPoints <= 0 && !isDefeated)
        {
            if (instantDestroy)
            {
                Destroy(gameObject);
            }
            else
            {
                Defeated();
            }

            defenderSpawner.ClearGridPosition(transform.position);
        }
    }