Table of Contents

Class Achievement

Namespace
GrindFest
Assembly
GrindFest.dll
public abstract class Achievement
Inheritance
object
Achievement
Derived

Fields

AchievementPointsReward
Category
CurrentTreshold
GoldReward
Name
PremiumCurrencyReward

Properties

Amount
ExternalAchievementId

The external platform achievement identifier (e.g. Steam achievement API name). Override in concrete achievements that have an external counterpart.

ExternalAchievementRank

Which rank triggers the external platform achievement (Steam, Kongregate, etc). -1 means no external achievement. 1-based rank index. Progress is tracked continuously toward this rank's threshold.

ExternalStatName

The Steam Stat API name for progress tracking (e.g. "stat_kills"). When set, the stat is updated continuously so Steam shows progress in the overlay. Null means no stat tracking (achievement is binary unlock only).

MaxRank

How many ranks this achievement has (e.g. 5 for cumulative, 1 for one-shot).

Rank

Methods

CalculateNextThreshold(int)
GetDescription(int)
GetRankName(int)
Initialize()

Called once when the achievement is created. Set Name, Category here.

RankUp()
ReportExternalProgress()

Call from concrete achievements whenever Amount changes to report progress to Steam/external platforms. Automatically throttled to avoid spamming. Safe to call frequently (e.g. every frame).

Subscribe()

Called after all achievements are initialized. Subscribe to events here.

Tick()

Called every frame by AchievementsManager. Override for polling-based achievements.

Events

OnAmountChanged
OnRankChanged