void RangeScan()
    {
        float      dist = Vector3.Distance(transform.position, LevelManager.instance.player.transform.position);
        RaycastHit hit;

        Physics.Raycast(transform.position, LevelManager.instance.player.transform.position - transform.position, out hit, attackRange, ignoreMask);

        if (hit.transform != null && hit.transform.gameObject.CompareTag("Player") && !dead)
        {
            currentState = NPCState.ATTACK;
            navAgent.stoppingDistance = attackStopDist;

            if (anim != null)
            {
                navAgent.SetDestination(LevelManager.instance.player.transform.position);
            }

            if (dist <= attackRange)
            {
                transform.LookAt(new Vector3(LevelManager.instance.player.transform.position.x, transform.position.y, LevelManager.instance.player.transform.position.z));

                if (anim == null)
                {
                    combat.Attack();
                }
                else
                {
                    anim.SetTrigger("Shoot");
                }
            }
            else if (dist <= agroRange && dist > attackRange)
            {
                navAgent.SetDestination(LevelManager.instance.player.transform.position);
            }
        }
        else
        {
            currentState = NPCState.PATROL;
        }
    }
 public void Shoot()
 {
     combat.Attack();
 }