|
supertux
|
This class is a layer between level and worldmap to keep track of stuff like scores, and minor, but funny things, like number of jumps and stuff. More...
#include <statistics.hpp>
Public Types | |
| enum | Status { INVALID, ACCUMULATING, FINAL } |
Public Member Functions | |
| Statistics () | |
| Creates new statistics, call reset() before counting. | |
| void | serialize_to_squirrel (ssq::Table &table) const |
| serialize statistics object as squirrel table "statistics" | |
| void | unserialize_from_squirrel (const ssq::Table &table) |
| unserialize statistics object from squirrel table "statistics" | |
| void | draw_worldmap_info (DrawingContext &context, float target_time) |
| draw worldmap stat HUD | |
| void | draw_endseq_panel (DrawingContext &context, Statistics *best_stats, const SurfacePtr &backdrop, float target_time) |
| draw panel shown during level's end sequence | |
| void | draw_ingame_stats (DrawingContext &context, bool on_pause_menu) |
| draw in-game stats | |
| void | update_timers (float dt_sec) |
| Updates the timers for in-game stats rendering. More... | |
| void | init (const Level &level) |
| void | finish (float time) |
| void | invalidate () |
| void | update (const Statistics &stats) |
| Given another Statistics object finds the best of each one. | |
| bool | completed (const Statistics &stats, const float target_time) const |
| int | get_coins () const |
| int | get_badguys () const |
| int | get_secrets () const |
| float | get_time () const |
| Status | get_status () const |
| void | increment_coins () |
| void | increment_badguys () |
| void | increment_secrets () |
Public Attributes | |
| int | m_total_coins |
| coins in level | |
| int | m_total_badguys |
| (vincible) badguys in level | |
| int | m_total_secrets |
| secret areas in level | |
This class is a layer between level and worldmap to keep track of stuff like scores, and minor, but funny things, like number of jumps and stuff.
| void Statistics::update_timers | ( | float | dt_sec | ) |
Updates the timers for in-game stats rendering.
Should be used from the same object that calls draw_ingame_stats().
1.8.13