|
Colobot
|
Scoreboard used to score complex code battles. More...
#include <src/level/scoreboard.h>
Classes | |
| class | CScoreboardEndTakeRule |
| Scoreboard rule for EndMissionTake rewards. More... | |
| class | CScoreboardKillRule |
| Scoreboard rule for destroying other objects. More... | |
| class | CScoreboardObjectRule |
| Scoreboard rule for counting objects. More... | |
| class | CScoreboardRule |
| Base class for scoreboard rules. More... | |
| struct | Score |
| Struct containing score of individual team and additional variables to allow sorting teams through different criteria. More... | |
Public Types | |
| enum | SortType { SortType::SORT_ID, SortType::SORT_POINTS } |
| Enum defining the scoreboard sorting criteria. More... | |
Public Member Functions | |
| CScoreboard () | |
| ~CScoreboard () | |
| Destroys the scoreboard. More... | |
| void | AddKillRule (std::unique_ptr< CScoreboardKillRule > rule) |
| Add ScoreboardKillRule. More... | |
| void | AddObjectRule (std::unique_ptr< CScoreboardObjectRule > rule) |
| Add ScoreboardObjectRule. More... | |
| void | AddEndTakeRule (std::unique_ptr< CScoreboardEndTakeRule > rule) |
| Add ScoreboardEndTakeRule. More... | |
| void | ProcessKill (CObject *target, CObject *killer=nullptr) |
| void | UpdateObjectCount () |
| Updates the object count rules. More... | |
| void | ProcessEndTake (int team) |
| Called after EndTake contition has been met, used to handle ScoreboardEndTakeRule. More... | |
| void | AddPoints (int team, int points) |
| Score | GetScore (int team) |
| void | SetScore (int team, int points) |
| SortType | GetSortType () |
| void | SetSortType (SortType type) |
| std::vector< std::pair< int, Score > > | GetSortedScores () |
Scoreboard used to score complex code battles.
|
strong |
|
inline |
Creates the scoreboard The scoreboard exists only if enabled in level file
|
inline |
Destroys the scoreboard.
| void CScoreboard::AddKillRule | ( | std::unique_ptr< CScoreboardKillRule > | rule | ) |
Add ScoreboardKillRule.
| void CScoreboard::AddObjectRule | ( | std::unique_ptr< CScoreboardObjectRule > | rule | ) |
Add ScoreboardObjectRule.
| void CScoreboard::AddEndTakeRule | ( | std::unique_ptr< CScoreboardEndTakeRule > | rule | ) |
Add ScoreboardEndTakeRule.
Called after an object is destroyed by another object
| target | The object that has just been destroyed |
| killer | The object that caused the destruction, can be null |
| void CScoreboard::UpdateObjectCount | ( | ) |
Updates the object count rules.
| void CScoreboard::ProcessEndTake | ( | int | team | ) |
Called after EndTake contition has been met, used to handle ScoreboardEndTakeRule.
1.8.16