public void ProcessHit(GameObject obj = default) { _playerLives -= 1; _playerExplotion?.Play(); _audioManager?.PlaySFX("PlayerExplosion"); OnPlayerLivesUpdate?.Invoke(_playerLives); if (_playerLives == 0) { StartCoroutine(LoseGame()); return; } StartCoroutine(ResetPlayer()); }
private void Start() { _gameManager = ServiceLocator.Resolve <GameManager>(); _audioManager = ServiceLocator.Resolve <AudioManager>(); OnPlayerLivesUpdate?.Invoke(_playerLives); }