Skip to content

Instantly share code, notes, and snippets.

@ManuelRauber
Last active August 29, 2015 14:00
Show Gist options
  • Save ManuelRauber/a435d92ed678d1080bdd to your computer and use it in GitHub Desktop.
Save ManuelRauber/a435d92ed678d1080bdd to your computer and use it in GitHub Desktop.
Achievement WonFiveGamesInARow
namespace ToasterRoaster.Game.Services.Achievements
{
public class WonFiveGamesInARowAchievement : BaseAchievement
{
public override string Title
{
get { return "C-C-C-Combo"; }
}
public override string Description
{
get { return "Won five games in a row"; }
}
protected override void DoStep(GameStep step)
{
if (GameStep.GameWon == step)
{
PercentageCompleted += 20;
return;
}
if ((GameStep.GameLost == step)
|| (GameStep.GameAbandoned == step))
{
PercentageCompleted = 0;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment