LevelReward ​
Inherits: Resource
Container for rewards granted at a specific level
Properties ​
String | description | "" |
Array[Reward] | rewards | [] |
Methods ​
void | add_reward( reward: Reward ) |
bool | remove_reward( reward: Reward ) |
void | clear_rewards() |
int | get_reward_count() |
Reward | get_reward_at_index( index: int ) |
bool | apply_to_player( player: Player ) |
String | get_summary() |
Array[Dictionary] | validate() |
bool | is_valid() |
Property descriptions ​
String description = "" ​
A short description of what this level gives (for the editor)
Array[Reward] rewards = [] ​
The rewards given at this level
Method descriptions ​
void add_reward( reward: Reward ) ​
Adds a reward to the level.
bool remove_reward( reward: Reward ) ​
Removes a reward. False when it was not there.
void clear_rewards() ​
Removes every reward.
int get_reward_count() ​
How many rewards the level gives.
Reward get_reward_at_index( index: int ) ​
The reward at a place of the list, or null.
bool apply_to_player( player: Player ) ​
Applies every reward; true when all of them were applied (an empty level reward has nothing to apply and counts as applied)
String get_summary() ​
A short text about the rewards of the level.
Array[Dictionary] validate() ​
Checks the settings. Gives the problems found (empty when it is fine).
bool is_valid() ​
Is it free of errors?