127 void unlock(
bool immediately);
132 void reveal(
bool immediately);
138 void increment(
int numSteps,
bool immediately);
144 void setSteps(
int numSteps,
bool immediately);
156 bool cloudIncrement(
int numSteps);
157 bool cloudSetSteps(
int numSteps);
160 bool mHasBeenRevealed =
false;
161 bool mRevealIsDirty =
false;
162 bool mHasBeenUnlocked =
false;
163 bool mUnlockIsDirty =
false;
164 int mMinStepsSet = 0;
165 bool mMinStepsDirty =
false;
166 int mStepsIncremented = 0;
167 int mStepsIncrementedDirtiness = 0;
170 #endif // ACHIEVEMENT_H
AchievementType getAchievementType() const
Returns the type of the Achievement.
QJsonObject toJsonObject() const
Returns the Achievement serialized as a JSON object.
Representation of a Google Play Games Services achievement.
Definition: Achievement.h:36
void increment(int numSteps, bool immediately)
Increments the incremental achievement.
Standard achievement that has binary state (i.e. "locked" vs. "unlocked").
Definition: Achievement.h:62
bool hasBeenRevealed() const
Returns whether or not the Achievement has been revealed through reveal().
Definition: Achievement.h:100
bool hasBeenUnlocked() const
Returns whether or not the Achievement has been unlocked through unlock().
Definition: Achievement.h:104
const QString & getName() const
Returns the name of the Achievement.
Definition: Achievement.h:89
void reveal(bool immediately)
Reveals the achievement.
void setSteps(int numSteps, bool immediately)
Sets the incremental achievement to minimally have numSteps.
No actions (i.e. increment()) have been performed on the achievement allowing its type to be distingu...
Definition: Achievement.h:58
Achievement whose progress advances incrementally and becomes "unlocked" after a certain number of pr...
Definition: Achievement.h:67
bool saveToCloud()
Saves any buffered achievement actions (i.e. state changed for which immediately was false) to the cl...
int getMinStepsSet() const
Returns the number of progress steps minimally set for the incremental Achievement through setSteps()...
Definition: Achievement.h:110
void merge(const Achievement &achievement)
Merges this with another set of achievement data.
AchievementType
Category of achievement.
Definition: Achievement.h:53
int getStepsIncremented() const
Returns the number of progress steps incremented for the incremental Achievement through increment()...
Definition: Achievement.h:116
void unlock(bool immediately)
Unlocks the achievement.
Achievement(const QString &name)
Constructs an achievement with the specified resource name.