void OnEnable()
        {
            _audioSource = GetComponent <AudioSource>();

            _healthHandler = GetComponent <HealthHandler>();
            _healthHandler.TriggerZeroHealthEvent += HandleBlowUp;
        }
예제 #2
0
 void Start()
 {
     _playerHealth =
         FindObjectOfType <PlayerHandler>().gameObject.GetComponent <HealthHandler>();
     if (_playerHealth != null)
     {
         _maxHealth = _playerHealth.HealthPoints;
     }
 }