19#ifndef HEADER_KART_WITH_STATS_HPP
20#define HEADER_KART_WITH_STATS_HPP
22#include "karts/kart.hpp"
75 unsigned int world_kart_id,
77 const btTransform& init_transform,
79 virtual void update(
int ticks) OVERRIDE;
80 virtual void reset() OVERRIDE;
The base class for all kart animation, like rescue, explosion, or cannon.
Definition: abstract_kart_animation.hpp:60
Contains the state information of an item, i.e.
Definition: item.hpp:53
This class implements a kart that collects statistics about a race, which is used in profiling mode.
Definition: kart_with_stats.hpp:32
unsigned int getBananaCount() const
Returns the number of bananas that were taken.
Definition: kart_with_stats.hpp:106
virtual void update(int ticks) OVERRIDE
This function is called each timestep, and it collects most of the statistics for this kart.
Definition: kart_with_stats.cpp:61
float m_skidding_time
How much time this kart was skidding.
Definition: kart_with_stats.hpp:71
float m_explosion_time
How long this kart spent in explosions.
Definition: kart_with_stats.hpp:38
virtual void setKartAnimation(AbstractKartAnimation *ka) OVERRIDE
Overloading setKartAnimation with a kind of listener function in order to gather statistics about res...
Definition: kart_with_stats.cpp:77
unsigned int m_off_track_count
How often the kart was off-track.
Definition: kart_with_stats.hpp:65
float getRescueTime() const
Returns how long a kart was rescued all in all.
Definition: kart_with_stats.hpp:118
unsigned int m_small_nitro_count
How many small nitro tanks were taken.
Definition: kart_with_stats.hpp:53
unsigned int m_bubblegum_count
How many bubblegums were taken.
Definition: kart_with_stats.hpp:59
unsigned int getRescueCount() const
Returns how often a kart was rescued.
Definition: kart_with_stats.hpp:100
unsigned int m_rescue_count
How often a kart was rescued.
Definition: kart_with_stats.hpp:44
unsigned int m_large_nitro_count
How many large nitro tanks were taken.
Definition: kart_with_stats.hpp:56
unsigned int getExplosionCount() const
Returns how often this kart was hit by an explosion.
Definition: kart_with_stats.hpp:91
virtual void collectedItem(ItemState *item_state) OVERRIDE
Called when an item is collected.
Definition: kart_with_stats.cpp:105
unsigned int m_bonus_count
How many bonuses were taken.
Definition: kart_with_stats.hpp:47
unsigned int getBonusCount() const
Returns the number of bonuses that were taken.
Definition: kart_with_stats.hpp:103
float m_top_speed
The maximum speed of this kart had.
Definition: kart_with_stats.hpp:35
float getTopSpeed() const
Returns the top speed of this kart.
Definition: kart_with_stats.hpp:85
float m_rescue_time
How much time was spent in rescue.
Definition: kart_with_stats.hpp:68
unsigned int getOffTrackCount() const
Returns how often the kart was off track.
Definition: kart_with_stats.hpp:121
float getExplosionTime() const
Returns how much time this kart spent in explosion animations.
Definition: kart_with_stats.hpp:88
unsigned int m_explosion_count
How often that kart was hit.
Definition: kart_with_stats.hpp:41
unsigned int m_banana_count
How many bananas were taken.
Definition: kart_with_stats.hpp:50
virtual void reset() OVERRIDE
Called at the start of each race, esp.
Definition: kart_with_stats.cpp:38
unsigned int getBrakeCount() const
Returns how often the kart braked.
Definition: kart_with_stats.hpp:97
float getSkiddingTime() const
Returns how much time this kart spent skidding.
Definition: kart_with_stats.hpp:94
unsigned int getLargeNitroCount() const
Returns the number of large nitro tanks that were taken.
Definition: kart_with_stats.hpp:112
unsigned int getSmallNitroCount() const
Returns the number of small nitro tanks that were taken.
Definition: kart_with_stats.hpp:109
unsigned int getBubblegumCount() const
Returns the number of bubblegums that were taken.
Definition: kart_with_stats.hpp:115
unsigned int m_brake_count
How often the kart braked.
Definition: kart_with_stats.hpp:62
The main kart class.
Definition: kart.hpp:69
HandicapLevel
Handicap per player.
Definition: remote_kart_info.hpp:42