Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Drone")
     {
         shake.CamShake();
         hitPoints--;
         canvas.GetComponent <HitPointsController>().Remove();
     }
     if (hitPoints == 0)
     {
         //TODO: end game
         PlayerPrefs.SetInt("Points", PointCounter.Get());
         SceneManager.LoadScene(
             PlayerPrefs.GetInt("SelectedCharacter") == 0 ?
             "GameOver40000" : "GameOver"
             );
     }
 }