private void Awake() { _audioSource = GetComponent <AudioSource>(); _unitPath = GetComponent <EnemyUnitPath>(); _combat = GetComponentInChildren <UnitCombat>(); _animator = GetComponentInChildren <Animator>(); _light2D = GetComponentInChildren <Light2D>(); _musicBGManager = FindObjectOfType <MusicBGManager>(); _combat.DeathEvent += Dead; }
private void Awake() { _gameManager = FindObjectOfType <GameManager>(); _move = GetComponent <PlayerMovement>(); _combat = GetComponentInChildren <UnitCombat>(); _grab = GetComponent <UnitGrab>(); _noise = GetComponentInChildren <UnitNoise>(); _animator = GetComponentInChildren <Animator>(); _teleport = GetComponent <UnitTeleport>(); _cellPhone = FindObjectOfType <CellPhone>(); _cellPhone.RingEvent += MakeNoise; _combat.DeathEvent += Dead; }
private void Awake() { _light2D = GetComponentInChildren <Light2D>(); _fieldOfView = GetComponentInChildren <UnitFieldOfView>(); _combat = GetComponent <UnitCombat>(); }