bitbrain / braingdx

:video_game: Game jam framework based on libgdx.
Apache License 2.0
84 stars 1 forks source link

Introduce Achievement Management 🏆 #173

Open bitbrain opened 5 years ago

bitbrain commented 5 years ago

Introduce a new class called AchievementManager which can be accessed on the GameContext.

The responsibility of this class is to register achievements and measure progress. The manager itself has different "storage" implementations for the state:

Each AchievementConfiguration provides UI handling and persistence of state respectively. This handler can be configured on the BraingdxGame itself via the super constructor:

public MyGame(AchievementConfiguration configuration) {
   super(configuration);
}

This allows people to provide custom configuration for different platforms.