Ejemplo n.º 1
0
    void Update()
    {
        if (GA.SettingsGA.Start_TimePlayed)
        {
            _timePlayed += Time.deltaTime;

            if (_timePlayed >= GA.SettingsGA.TimePlayed)
            {
                EnableAds();
            }
        }

                #if UNITY_ANDROID && CB_ON
        if (GA.SettingsGA.CB_enabled)
        {
            // Handle the Android back button
            if (Input.GetKeyUp(KeyCode.Escape))
            {
                // Check if Chartboost wants to respond to it
                if (CBBinding.onBackPressed())
                {
                    // If so, return and ignore it
                    return;
                }
                else
                {
                    // Otherwise, handle it ourselves -- let's close the app
                    Application.Quit();
                }
            }
        }
                #endif
    }
Ejemplo n.º 2
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         #if UNITY_ANDROID
         if (CBBinding.onBackPressed())
         {
             return;
         }
         else
         {
             Application.Quit();
         }
         #else
         Application.Quit();
         #endif
     }
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
         if (Time.frameCount % 30 == 0)
         {
             System.GC.Collect();
         }
     }
     if (Score.TotalScore >= 1000)
     {
         #if UNITY_ANDROID
         SocialManager.UnlockAchievement("CgkIz-zNrP8bEAIQBQ");
                     #elif UNITY_IPHONE
         SocialManager.UnlockAchievement("CgkI_uuXy7ESEAIQBg");
         #endif
     }
     else if (Score.TotalScore >= 100)
     {
         #if UNITY_ANDROID
         SocialManager.UnlockAchievement("CgkIz-zNrP8bEAIQBA");
         #elif UNITY_IPHONE
         SocialManager.UnlockAchievement("CgkI_uuXy7ESEAIQBQ");
         #endif
     }
     else if (Score.TotalScore >= 50)
     {
         #if UNITY_ANDROID
         SocialManager.UnlockAchievement("CgkIz-zNrP8bEAIQAw");
                     #elif UNITY_IPHONE
         SocialManager.UnlockAchievement("CgkI_uuXy7ESEAIQBA");
         #endif
     }
     else if (Score.TotalScore >= 1)
     {
         #if UNITY_ANDROID
         SocialManager.UnlockAchievement("CgkIz-zNrP8bEAIQAg");
                     #elif UNITY_IPHONE
         SocialManager.UnlockAchievement("CgkI_uuXy7ESEAIQAw");
         #endif
     }
 }
Ejemplo n.º 3
0
 void Update()
 {
     if (Input.GetKeyUp(KeyCode.Escape))
     {
         if (_isInited && CBBinding.onBackPressed())
         {
             return;
         }
     }
 }
 public void Update()
 {
     if (Input.GetKeyUp(KeyCode.Escape))
     {
         if (CBBinding.onBackPressed())
         {
             return;
         }
         else
         {
             Application.Quit();
         }
     }
 }
    public void Update()
    {
#if UNITY_ANDROID
        // Handle the Android back button (only if impressions are set to not use activities)
        if (Input.GetKeyUp(KeyCode.Escape))
        {
            // Check if Chartboost wants to respond to it
            if (CBBinding.onBackPressed())
            {
                // If so, return and ignore it
                return;
            }
            else
            {
                // Otherwise, handle it ourselves -- let's close the app
                Application.Quit();
            }
        }
#endif
    }