void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player");
        mode = TurretMode.Idle;
        turretInformation = GetComponent<TurretInformation>();

        turretInformation.CharacterStateChanged += EnemyInformation_CharacterStateChanged;

        activeCoroutine = StartCoroutine(IdleRotate());
    }
    void Update()
    {
        if (GameInformation.Instance.GameState != GameState.Playing) return;
        if (turretInformation.CharacterState != CharacterState.Alive) return;

        cooldown += Time.deltaTime;

        switch (mode)
        {
            case TurretMode.Idle:
                {
                    if (CanSeePlayer())
                    {
                        mode = TurretMode.SeekingPlayer;

                        StopCoroutine(activeCoroutine);
                        activeCoroutine = StartCoroutine(SeekPlayer());
                    }
                }
                break;
            case TurretMode.SeekingPlayer:
                {
                    if (!CanSeePlayer())
                    {
                        mode = TurretMode.Idle;

                        StopCoroutine(activeCoroutine);
                        activeCoroutine = StartCoroutine(IdleRotate());
                    }

                    if (CanFireOnPlayer())
                    {
                        Fire();
                    }
                }
                break;
            default:
                break;
        }
    }