Ejemplo n.º 1
0
        public AchievementCollection EndGetAchievements(IAsyncResult result)
        {
            GetAchievementsDelegate gad = (GetAchievementsDelegate)result.AsyncState;

            gamerAchievements = gad.EndInvoke(result);

            return(gamerAchievements);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public AchievementCollection GetAchievements()
        {
            if (gamerAchievements == null)
            {
                gamerAchievements = new AchievementCollection();
            }

            return(gamerAchievements);
        }
Ejemplo n.º 4
0
 public AchievementCollection GetAchievements()
 {
     if (IsSignedInToLive)
     {
         if (gamerAchievements == null)
         {
             gamerAchievements = new AchievementCollection();
         }
     }
     return(gamerAchievements);
 }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 public AchievementCollection EndGetAchievements(IAsyncResult result)
 {
     this.gamerAchievements = ((SignedInGamer.GetAchievementsDelegate)result.AsyncState).EndInvoke(result);
     return(this.gamerAchievements);
 }
Ejemplo n.º 7
0
 private void GetAchievementCompletedCallback(IAsyncResult result)
 {
     this.gamerAchievements = ((SignedInGamer.GetAchievementsDelegate)result.AsyncState).EndInvoke(result);
 }