private void FixedUpdate()
    {
        switch (state)
        {
        case State.Roaming:
            enemyMovements.MoveTo(roamingPosition);

            distance = Vector3.Distance(transform.position, roamingPosition);
            if (distance < 3f || !isMoving)
            {
                roamingPosition = GetRoamingPosition();
            }

            FindTarget();
            CheckMovements();
            break;

        case State.ChaseTarget:
            anim.SetBool("isAttacking", false);
            enemyAttack.Aim();
            enemyMovements.MoveTo(PlayerController.Instance.GetPosition());

            if (Vector3.Distance(transform.position, PlayerController.Instance.GetPosition()) < enemyAttack.GetAttackRange())
            {
                state = State.AttackTarget;
            }
            else if (Vector3.Distance(transform.position, PlayerController.Instance.GetPosition()) > stopChaseRange)
            {
                state = State.Roaming;
            }

            break;

        case State.AttackTarget:
            enemyAttack.Aim();
            enemyAttack.Attack();
            anim.SetBool("isAttacking", true);
            if (Vector3.Distance(transform.position, PlayerController.Instance.GetPosition()) > enemyAttack.GetAttackRange())
            {
                enemyAttack.ResetAttack();
                state = State.ChaseTarget;
            }
            if (health < maxHealth / 2)
            {
                anim.SetBool("isAngry", true);
            }
            break;

        case State.Dead:
            break;
        }
    }