示例#1
0
 public void ShowAcheivementsUI()
 {
             #if AMAZON
     AGSAchievementsClient.ShowAchievementsOverlay();
             #else
     Social.ShowAchievementsUI();
             #endif
 }
示例#2
0
 public void ShowAchievementsPage()
 {
     if (AGSClient.IsServiceReady())
     {
         AGSAchievementsClient.ShowAchievementsOverlay();
     }
     else
     {
         Debug.Log("Show sigin page Service NOOOOOOT Ready");
     }
 }
示例#3
0
        /// <summary>
        /// Shows the native achievement user interface, allowing the player to browse achievements.
        /// </summary>
        public void ShowOverlay()
        {
            if (!AGSPlayerClient.IsSignedIn())
            {
#if CLOUDONCE_DEBUG
                UnityEngine.Debug.LogWarning("ShowOverlay can only be called after authentication.");
#endif
                return;
            }
#if CLOUDONCE_DEBUG
            UnityEngine.Debug.Log("Showing achievements overlay.");
#endif
            AGSAchievementsClient.ShowAchievementsOverlay();
        }
示例#4
0
 /// <summary>
 /// Shows the achievements UI.
 /// </summary>
 public void ShowAchievementsUI()
 {
     AGSAchievementsClient.ShowAchievementsOverlay();
 }
示例#5
0
    /// <summary>
    /// Draws the Achievements menu. Note that this must be called from an OnGUI function.
    /// </summary>
    public override void DrawMenu()
    {
        // This button will open the achievements overlay.
        if (GUILayout.Button(displayAchievementOverlayButtonLabel))
        {
            AGSAchievementsClient.ShowAchievementsOverlay();
        }

        // If achievement information retrieval has not begun,
        // display a button to begin the functionality.
        if (string.IsNullOrEmpty(requestAchievementsStatus))
        {
            // This button will begin retrieval of achievement information.
            if (GUILayout.Button(requestAchievementsButtonLabel))
            {
                RequestAchievements();
            }
        }
        else
        {
            // once a request has been made for the list of achievements,
            // display the status message of that process.
            AmazonGUIHelpers.CenteredLabel(requestAchievementsStatus);
            if (!string.IsNullOrEmpty(requestAchievementsStatusMessage))
            {
                AmazonGUIHelpers.CenteredLabel(requestAchievementsStatusMessage);
            }

            // If the achievements are not ready, display how long it has been since the request was put in
            // to make it clear this is an asynchronous operation.
            if (!achievementsReady)
            {
                AmazonGUIHelpers.CenteredLabel(string.Format(achievementRequestTimeLabel, (System.DateTime.Now - achievementsRequestTime).TotalSeconds));
            }
            // once achievement retrieval is successful, display the list of achievements.
            else
            {
                // If the achievement list was not empty, display it.
                if (null != achievementList && achievementList.Count > 0)
                {
                    foreach (AGSAchievement achievement in achievementList)
                    {
                        DisplayAchievement(achievement);
                    }
                }
                else
                {
                    // You will only see this message if there is no list of achievements.
                    // This happens in two cases:
                    //      You have not added any achievements to your project on the GameCircle website.
                    //      You only have draft achievements, and the user you are testing with cannot see draft achievements.
                    AmazonGUIHelpers.CenteredLabel(noAchievementsAvailableLabel);
                }
                // display an "invalid" achievement to ensure that GameCircle handles invalid data properly.
                if (null != invalidAchievement)
                {
                    DisplayAchievement(invalidAchievement);
                }
            }
        }
    }
示例#6
0
 public void ShowAchievementsOverlay()
 {
             #if AMAZON_CIRCLE_ENABLED
     AGSAchievementsClient.ShowAchievementsOverlay();
             #endif
 }