Beispiel #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Bagage"))
     {
         InGameUI inGameUI = FindObjectOfType <InGameUI>();
         if (inGameUI != null)
         {
             inGameUI.ShowVictoryScreen();
             ProgressViewer.instance.LevelPassed(SceneManager.GetActiveScene().name);
             ProgressViewer.instance.SaveData();
             AdMob.reference.LevelsPassed++;
             AdMob.reference.showInterstitalAd();
         }
         else
         {
             Debug.Log("InGameUI script missing on the scene");
         }
     }
 }