Constructor
new AchievementBuilder(dataopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
data | AchievementData | <optional> | Data to build the achievement |
Members
data :AchievementData
- Data of the achievement.
Type:
Methods
setDescription(description) → {AchievementBuilder}
Sets the description of the achievement.
Parameters:
| Name | Type | Description |
|---|---|---|
description | String | Description of the achievement |
Returns:
- Type:
- AchievementBuilder
setName(name) → {AchievementBuilder}
Sets the name of the achievement.
Parameters:
| Name | Type | Description |
|---|---|---|
name | String | Name of the achievement |
Returns:
- Type:
- AchievementBuilder
setProgress(progress) → {AchievementBuilder}
Sets the progress of the achievement.
Parameters:
| Name | Type | Description |
|---|---|---|
progress | Array.<Number> | Progress of the achievement |
Returns:
- Type:
- AchievementBuilder
setReward(reward) → {AchievementBuilder}
Sets the reward of the achievement.
Parameters:
| Name | Type | Description |
|---|---|---|
reward | Number | Reward of the achievement |
Returns:
- Type:
- AchievementBuilder
setThumbnail(thumbnail) → {AchievementBuilder}
Sets the thumbnail of the achievement.
Parameters:
| Name | Type | Description |
|---|---|---|
thumbnail | String | Thumbnail of the achievement |
Returns:
- Type:
- AchievementBuilder
setType(type) → {AchievementBuilder}
Sets the type of the achievement.
Parameters:
| Name | Type | Description |
|---|---|---|
type | AchievementType | Type of the achievement |
Returns:
- Type:
- AchievementBuilder
toJSON() → {AchievementData}
Returns the JSON representation of the achievement.
Returns:
- Type:
- AchievementData