|
virtual void | update (int ticks) |
| Updates the kart animation.
|
|
virtual void | updateGraphics (float dt) |
|
virtual KartAnimationType | getAnimationType () const |
|
virtual void | saveState (BareNetworkString *buffer) |
|
virtual void | restoreState (BareNetworkString *buffer) |
|
bool | hasResetAlready () const |
|
| AbstractKartAnimation (AbstractKart *kart, const std::string &name) |
| Constructor.
|
|
virtual void | update (int ticks) |
| Updates the timer, and if it expires, the kart animation will be removed from the kart and this object will be deleted.
|
|
virtual void | updateGraphics (float dt) |
|
virtual float | getAnimationTimer () const |
| Returns the current animation timer.
|
|
virtual const std::string & | getName () const |
| To easily allow printing the name of the animation being used atm.
|
|
virtual KartAnimationType | getAnimationType () const =0 |
|
void | handleResetRace () |
|
virtual void | saveState (BareNetworkString *buffer) |
|
virtual void | restoreState (BareNetworkString *buffer) |
|
|
void | restoreData (BareNetworkString *b) |
|
void | init (bool direct_hit, const Vec3 &normal, const btTransform &reset_trans) |
|
| ExplosionAnimation (AbstractKart *kart, BareNetworkString *buffer) |
|
| ExplosionAnimation (AbstractKart *kart, bool direct_hit) |
|
void | resetPowerUp () |
| In CTF mode call this to reset kart powerup when get hit.
|
|
void | restoreBasicState (BareNetworkString *buffer) |
| Used in constructor of sub-class as no virtual function can be used there.
|
|
float | getMaximumHeight (const Vec3 &up_vector, float height_remove) |
| Determine maximum rescue height with up-raycast.
|
|
|
Vec3 | m_normal |
| The normal of kart when it started to explode.
|
|
Vec3 | m_curr_rotation |
| The kart's current rotation.
|
|
Vec3 | m_add_rotation |
| The artificial rotation to toss the kart around.
|
|
float | m_velocity |
| The velocity with which the kart is moved.
|
|
int | m_reset_ticks |
| If not -1, when > world count up ticks it will use m_reset_trans below for animation.
|
|
btTransform | m_reset_trans |
| Used for reset kart back to flag base in CTF.
|
|
int | m_reset_trans_compressed [4] |
|
bool | m_direct_hit |
|
AbstractKart * | m_kart |
| A pointer to the kart which is animated by this class.
|
|
int | m_end_ticks |
| Time in ticks for the animation which ends in world count up ticks.
|
|
int | m_created_ticks |
| Time in ticks for the animation creation.
|
|
btTransform | m_created_transform |
| Transformation by the time the animation was created, used for rewind to recreate the animation with the same one.
|
|
int | m_created_transform_compressed [4] |
|
This class is a 'mixin' for kart, and handles the animated explosion.
I.e. it will throw the kart a certain amount in the air, rotate it randomly, and after the specified time period let it land at the same spot where it was hit, therefore avoiding any problems of karts being pushed on wrong parts of the track, and making explosion more 'fair' (it can't happen that one explosion give you actually a benefit by pushing you forwards. The object is a base class for kart, but will only be used if an explosion happens.