Achievement Types

XNAchievement comes with predefined achievement types, but you can easily create your own. The Getting Started page has more information about this. All achievement have well written IntelliSense comments!

Achievement

The most simple achievement type. Use this Achievement type for simple "fire-and-forget" achievements like "complete level 5". It can be unlocked with the .Unlock() method and that's all ;)

Counter Achievement

This achievement is unlocked when the internal counter reaches a specific number. The counter can only be incremented or reset. Use for achievements like "kill five enemys without being hit" or "chop 300 trees". You can increase the counter with .Increase() and reset it by calling .Reset()

When NotifiactionInterval is not set to zero a notification event of the type Progressed will be raised every time the progress crosses this line: Set it to 0.1 for a event every 10% or to 0.5 for one every 50% and so on.
If this isn't enough control for you you might use the Progressing event: This event is raised every time just before Progressed event is fired. Set e.Cancel to to to cancel the pending event. (Like Form.Closing in WinForms)

XInTime Achievement

This achievement works a bit like the counter achievement with a build-in reset: .ActionDone() increases the counter, witch is reset automatically after a period of time (TimeLimit to be precise). Use for achievements like "kill five enemys within 3 seconds" or "die 10 times in 2 minutes".

Last edited Jul 6, 2012 at 3:25 PM by simsmaster, version 2

Comments

No comments yet.