Ejemplo n.º 1
0
 void OnCollisionStay2D(Collision2D col)
 {
     if (outOfBoundsWithoutOrbit)
     {
         if (col.gameObject == GameScreenManager.leftWall || col.gameObject == GameScreenManager.rightWall || col.gameObject == GameScreenManager.bottomWall)
         {
             if (!coRoutineInProgress)
             {
                 StartCoroutine(OutOfBoundsEndGameCheck());
                 coRoutineInProgress = true;
             }
         }
         if (col.gameObject == GameScreenManager.earth)
         {
             PlayerExplosion();
             SoundFXPlayer.PlayCrashSFX();
             GameScreenManager.playerHasCrashed = true;
             isOutOfBounds = true;
                             #if UNITY_ANDROID
             PlayGamesPlatform.Instance.ReportProgress("CgkIja6x2owHEAIQDA", 100.0f, (bool success) => {
             });
                             #elif UNITY_IOS
             GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true);
             Social.ReportProgress("xyz.mattpowell.helios.earthcrash", 100.0f, (bool success) => {
             });
                             #endif
         }
     }
 }
Ejemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.name == "Player")
     {
         SoundFXPlayer.PlayCrashSFX();
         PlayerController.PlayerExplosion();
         GameScreenManager.playerHasCrashed = true;
     }
 }