コード例 #1
0
ファイル: GuiInitializer.cs プロジェクト: timdams/strokes
        /// <summary>
        /// Handles the AchievementsUnlocked event of the AchievementContext control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">
        ///     The <see cref="Strokes.Core.AchievementsUnlockedEventArgs"/> instance containing the event data.
        /// </param>
        private static void AchievementContext_AchievementsUnlocked(object sender, AchievementsUnlockedEventArgs args)
        {
            if (args.Achievements.Any())
            {
                Debug.WriteLine(string.Format("Achievements unlocked: {0}",
                    string.Join(", ", args.Achievements.Select(a => "[" + a.Name + "]"))));

                AchievementNotificationBox.ShowAchievements(args.Achievements);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: timdams/strokes
 private static void AchievementContext_AchievementsUnlocked(object sender, AchievementsUnlockedEventArgs args)
 {
     System.Console.WriteLine("Unlocked: " + string.Join(", ", args.Achievements.Select(a => a.Name)));
 }