Example #1
0
        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;
        }
Example #2
0
 private void Awake()
 {
     _player    = GetComponent <Player>();
     _cellPhone = FindObjectOfType <CellPhone>();
     _unitNoise = GetComponentInChildren <UnitNoise>();
 }