Пример #1
0
    IEnumerator PickSniperRoutine()
    {
        yield return(new WaitForSeconds(delay));

        activateActivableEvent.Invoke();
        EnemyManager nearestEnemy = _board.FindNearestEnemy();

        if (nearestEnemy != null)
        {
            EnemyMover nearestMoverDest = nearestEnemy.GetComponent <EnemyMover>();
            _player_mover.destination = nearestMoverDest.CurrentNode.transform.position;
            _player_mover.FaceDestination();
            sniperAudio.Play();
            nearestEnemy.Die();
        }
    }