Пример #1
0
    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);
        }
    }
Пример #2
0
    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));
        }
    }