Beispiel #1
0
        public AchievementCollection EndGetAchievements(IAsyncResult result)
        {
            GetAchievementsDelegate gad = (GetAchievementsDelegate)result.AsyncState;

            gamerAchievements = gad.EndInvoke(result);

            return(gamerAchievements);
        }
Beispiel #2
0
        private void GetAchievementCompletedCallback(IAsyncResult result)
        {
            // get the delegate that was used to call that method
            GetAchievementsDelegate gad = (GetAchievementsDelegate)result.AsyncState;

            // get the return value from that method call
            gamerAchievements = gad.EndInvoke(result);
        }
Beispiel #3
0
        public AchievementCollection GetAchievements()
        {
            if (gamerAchievements == null)
            {
                gamerAchievements = new AchievementCollection();
            }

            return(gamerAchievements);
        }
Beispiel #4
0
 public AchievementCollection GetAchievements()
 {
     if (IsSignedInToLive)
     {
         if (gamerAchievements == null)
         {
             gamerAchievements = new AchievementCollection();
         }
     }
     return(gamerAchievements);
 }
        public AchievementCollection GetAchievements()
        {
            if (IsSignedInToLive)
            {
                if (gamerAchievements == null)
                {
                    gamerAchievements = new AchievementCollection();
                }

                GKAchievementDescription.LoadAchievementDescriptions(delegate(GKAchievementDescription[] achievements, NSError error)
                {
                    if (achievements != null)
                    {
                        foreach (GKAchievementDescription a in achievements)
                        {
                            gamerAchievements.Add(new Achievement()
                            {
                                Name                = a.Title,
                                Key                 = a.Identifier,
                                Description         = a.AchievedDescription,
                                HowToEarn           = a.UnachievedDescription,
                                DisplayBeforeEarned = !a.Hidden
                            });
                        }
                    }
                });

                GKAchievement.LoadAchievements(delegate(GKAchievement[] achievements, NSError error)
                {
                    if (achievements != null)
                    {
                        foreach (GKAchievement a in achievements)
                        {
                            foreach (Achievement ac in gamerAchievements)
                            {
                                if (ac.Key == a.Identifier)
                                {
                                    ac.IsEarned       = a.Completed;
                                    ac.EarnedDateTime = a.LastReportedDate.NSDateToDateTime();
                                }
                            }
                        }
                    }
                });
            }
            return(gamerAchievements);
        }
Beispiel #6
0
 public AchievementCollection EndGetAchievements(IAsyncResult result)
 {
     this.gamerAchievements = ((SignedInGamer.GetAchievementsDelegate)result.AsyncState).EndInvoke(result);
     return(this.gamerAchievements);
 }
Beispiel #7
0
 private void GetAchievementCompletedCallback(IAsyncResult result)
 {
     this.gamerAchievements = ((SignedInGamer.GetAchievementsDelegate)result.AsyncState).EndInvoke(result);
 }