Пример #1
0
        private void Awake()
        {
            _audioSource    = GetComponent <AudioSource>();
            _unitPath       = GetComponent <EnemyUnitPath>();
            _combat         = GetComponentInChildren <UnitCombat>();
            _animator       = GetComponentInChildren <Animator>();
            _light2D        = GetComponentInChildren <Light2D>();
            _musicBGManager = FindObjectOfType <MusicBGManager>();

            _combat.DeathEvent += Dead;
        }
Пример #2
0
 private void Awake()
 {
     _musicBGManager = FindObjectOfType <MusicBGManager>();
     _light2D        = GetComponentInChildren <Light2D>();
     _fieldOfView    = GetComponentInChildren <UnitFieldOfView>();
 }