Beispiel #1
0
    public void drawSocialTest()
    {
        if (!achievement_testing)
        {
            return;
        }

        GUILayout.BeginArea(new Rect(Screen.width - 210, 10, 200, Screen.height));
        GUILayout.BeginVertical("box");
        GUILayout.Label("Achievement system TESTING");
        GUILayout.Space(10);

        if (GUILayout.Button("Log in"))
        {
            if (ConnectivityManager.SocialAuthenticate())
            {
                logged_state = true;
            }
        }
        GUILayout.Space(5);

        if (GUILayout.Button("First achievement"))
        {
            if (ConnectivityManager.ReportAchievement(Achievements_Android.ACHIEVEMENT_ONE, 100))
            {
                first_achievement_state = true;
            }
        }
        GUILayout.Space(5);

        if (GUILayout.Button(incremental_counter + " times for Inc.achievement!"))
        {
            if (ConnectivityManager.ReportIncrementalAchievement(Achievements_Android.ACHIEVEMENT_TWO_INCREMENTAL, 5))
            {
                --incremental_counter;
            }
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Third achievement"))
        {
            if (ConnectivityManager.ReportAchievement(Achievements_Android.ACHIEVEMENT_THREE, 100))
            {
                //first_achievement_state = true;
            }
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Fourth achievement"))
        {
            if (ConnectivityManager.ReportAchievement(Achievements_Android.ACHIEVEMENT_FOUR, 100))
            {
                //first_achievement_state = true;
            }
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Fifth achievement"))
        {
            if (ConnectivityManager.ReportAchievement(Achievements_Android.ACHIEVEMENT_FIVE, 100))
            {
                //first_achievement_state = true;
            }
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Post 1000 points to LB"))
        {
            ConnectivityManager.ReportScore(1000, Achievements_Android.SCORE_BLACKBOARD);
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Show Achievements"))
        {
            ConnectivityManager.ShowAchievements();
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Show Scores"))
        {
            ConnectivityManager.ShowLeaderBoard();
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Get coins from DB"))
        {
            ConnectivityManager.SocialAuthenticate();
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Add 30 coins"))
        {
            ConnectivityManager.SocialAuthenticate();
        }
        GUILayout.Space(5);


        if (GUILayout.Button("Add 50 coins"))
        {
            ConnectivityManager.SocialAuthenticate();
        }
        GUILayout.Space(5);

        if (GUILayout.Button("Logout"))
        {
            ConnectivityManager.SocialAuthenticate();
        }

        GUILayout.EndVertical();
        GUILayout.EndArea();
    }