Class BaseAchievementConfig
java.lang.Object
com.csse3200.game.entities.configs.BaseAchievementConfig
Base configuration class for achievements. Defines the structure for achievement definitions that
are loaded from JSON config files.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
DeserializedAchievementConfig is a wrapper class for the BaseAchievementConfig class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the description of the achievement.getName()
Gets the display name of the achievement.int
getQuota()
Gets the quota required to unlock this achievement.int
Gets the skill points awarded when this achievement is unlocked.Gets the statistic that this achievement tracks.getTier()
Gets the tier of this achievement.void
setDescription
(String description) Sets the description of the achievement.void
Sets the display name of the achievement.void
setQuota
(int quota) Sets the quota required to unlock this achievement.void
setSkillPoints
(int skillPoints) Sets the skill points awarded when this achievement is unlocked.void
setStatistic
(String statistic) Sets the statistic that this achievement tracks.void
Sets the tier of this achievement.toString()
-
Constructor Details
-
BaseAchievementConfig
public BaseAchievementConfig()Default constructor for JSON deserialization.
-
-
Method Details
-
getName
Gets the display name of the achievement.- Returns:
- the achievement name
-
setName
Sets the display name of the achievement.- Parameters:
name
- the achievement name
-
getDescription
Gets the description of the achievement.- Returns:
- the achievement description
-
setDescription
Sets the description of the achievement.- Parameters:
description
- the achievement description
-
getStatistic
Gets the statistic that this achievement tracks.- Returns:
- the statistic name
-
setStatistic
Sets the statistic that this achievement tracks.- Parameters:
statistic
- the statistic name
-
getQuota
public int getQuota()Gets the quota required to unlock this achievement.- Returns:
- the quota value
-
setQuota
public void setQuota(int quota) Sets the quota required to unlock this achievement.- Parameters:
quota
- the quota value
-
getSkillPoints
public int getSkillPoints()Gets the skill points awarded when this achievement is unlocked.- Returns:
- the skill points
-
setSkillPoints
public void setSkillPoints(int skillPoints) Sets the skill points awarded when this achievement is unlocked.- Parameters:
skillPoints
- the skill points
-
getTier
Gets the tier of this achievement.- Returns:
- the tier (T1, T2, T3)
-
setTier
Sets the tier of this achievement.- Parameters:
tier
- the tier (T1, T2, T3)
-
toString
-