Simple Bare-bones Achievements framework.
Usage:
- import it into your project
import zero.utilities.Achievements;
- also use EventBus -
using zero.utilities.EventBus;
- Set data from Map
(either to initialize Achievements or use saved data) using Achievements.set_data(my_map);
- Add listeners for individual achievements using
Achievements.listen('my achievement');
(also works with enums!) - Trigger achievements using
"my achievement".dispatch();
- Make sure to save your achievement data - you can retrive it with
Achievements.get_data();