public AchievementCollection EndGetAchievements(IAsyncResult result) { GetAchievementsDelegate gad = (GetAchievementsDelegate)result.AsyncState; gamerAchievements = gad.EndInvoke(result); return(gamerAchievements); }
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); }
public AchievementCollection GetAchievements() { if (gamerAchievements == null) { gamerAchievements = new AchievementCollection(); } return(gamerAchievements); }
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); }
public AchievementCollection EndGetAchievements(IAsyncResult result) { this.gamerAchievements = ((SignedInGamer.GetAchievementsDelegate)result.AsyncState).EndInvoke(result); return(this.gamerAchievements); }
private void GetAchievementCompletedCallback(IAsyncResult result) { this.gamerAchievements = ((SignedInGamer.GetAchievementsDelegate)result.AsyncState).EndInvoke(result); }