Exemple #1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.CompareTag(Tags.OBSTACLE_KILL))
     {
         _gameManager.GameOver();
         Debug.Log("YOU DIED!");
     }
     else if (other.gameObject.CompareTag(Tags.OBSTACLE_TRIGGER))
     {
         _scoreManager.IncreaseScore(1);
         _sfxManager.PlayTriggerSound();
     }
 }