public void ReportAchievements() { var social = Ssg.Social.Social.GetInstance(); if (!social.IsAuthenticated) { return; } int totalSavedSuis = GGHeroGame.GetTotal(); if (totalSavedSuis >= 100) { social.ReportAchievement(SocialIds.AchievementSave100InTotal); } if (totalSavedSuis >= 200) { social.ReportAchievement(SocialIds.AchievementSave200InTotal); } if (totalSavedSuis >= 500) { social.ReportAchievement(SocialIds.AchievementSave500InTotal); } if (totalSavedSuis >= 1000) { social.ReportAchievement(SocialIds.AchievementSave1000InTotal); } if (totalSavedSuis >= 5000) { social.ReportAchievement(SocialIds.AchievementSave5000InTotal); } }
private void ReleaseSuiciders() { Dude.SetBobyPartsKinematic(true); DudeAnimator.SetupPivots(); int total = GGHeroGame.GetTotal(); int totalBefore = total + GameSettings.SuiRescuedCount; GameSettings.SuiRescuedCount += GetHoldingSuis(); int totalAfter = total + GameSettings.SuiRescuedCount; m_gameplay.ReportAchievementIfNeeded(totalBefore, totalAfter); Vector2 rescuePosition = transform.position.x < 0.0f ? m_rescuePointLeft.position : m_rescuePointRight.position; while (m_suiciders.Count > 0) { Suicider sui = m_suiciders.Pop(); ShowSurvivalName(sui); sui.Dude.PlugOut(); sui.SetController(new SuiControllerRescuing(sui, rescuePosition)); } }
public void Show() { m_rescuedValue.text = GameSettings.SuiRescuedCount.ToString(); GGHeroGame.SaveScore(m_gameplay, GameSettings.SuiRescuedCount); m_recordValue.text = GGHeroGame.GetRecord().ToString(); NGUITools.SetActive(m_continueButton.gameObject, RewardedAds.GetInstance().IsReady()); }
public void ExitToMenuButtonPressed() { GGHeroGame.SaveScore(Gameplay, GameSettings.SuiRescuedCount); Gameplay.RestartGame(true); }