SuperTuxKart
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
RescueAnimation Class Reference

This triggers a rescue of the specified kart. More...

#include <rescue_animation.hpp>

Inheritance diagram for RescueAnimation:
Inheritance graph
[legend]

Public Member Functions

virtual ~RescueAnimation ()
 This object is automatically destroyed when the timer expires.
 
virtual void update (int ticks)
 Updates the kart animation. More...
 
virtual void updateGraphics (float dt)
 
virtual KartAnimationType getAnimationType () const
 
virtual void saveState (BareNetworkString *buffer)
 
virtual void restoreState (BareNetworkString *buffer)
 
- Public Member Functions inherited from AbstractKartAnimation
 AbstractKartAnimation (AbstractKart *kart, const std::string &name)
 Constructor. More...
 
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. More...
 
void handleResetRace ()
 

Static Public Member Functions

static RescueAnimationcreate (AbstractKart *kart, bool is_auto_rescue=false)
 

Protected Member Functions

 RescueAnimation (AbstractKart *kart, BareNetworkString *b)
 
 RescueAnimation (AbstractKart *kart, bool is_auto_rescue)
 The constructor stores a pointer to the kart this object is animating, and initialised the timer. More...
 
void restoreData (BareNetworkString *b)
 
void init (const btTransform &rescue_transform, float velocity)
 
- Protected Member Functions inherited from AbstractKartAnimation
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.
 

Protected Attributes

float m_velocity
 The velocity with which the kart is moved. More...
 
int m_rescue_moment
 When world ticks > this, it will move the kart above the m_rescue_transform. More...
 
Refereem_referee
 The referee during a rescue operation. More...
 
btTransform m_rescue_transform
 
int m_rescue_transform_compressed [4]
 
- Protected Attributes inherited from AbstractKartAnimation
AbstractKartm_kart
 A pointer to the kart which is animated by this class. More...
 
int m_end_ticks
 Time in ticks for the animation which ends in world count up ticks. More...
 
int m_created_ticks
 Time in ticks for the animation creation. More...
 
btTransform m_created_transform
 Transformation by the time the animation was created, used for rewind to recreate the animation with the same one. More...
 
int m_created_transform_compressed [4]
 

Friends

class KartRewinder
 

Detailed Description

This triggers a rescue of the specified kart.

Constructor & Destructor Documentation

◆ RescueAnimation()

RescueAnimation::RescueAnimation ( AbstractKart kart,
bool  is_auto_rescue 
)
protected

The constructor stores a pointer to the kart this object is animating, and initialised the timer.

Parameters
kartPointer to the kart which is animated.

Member Function Documentation

◆ update()

void RescueAnimation::update ( int  ticks)
virtual

Updates the kart animation.

Parameters
ticksNumber of time steps - should be 1.

Reimplemented from AbstractKartAnimation.

Member Data Documentation

◆ m_referee

Referee* RescueAnimation::m_referee
protected

The referee during a rescue operation.

◆ m_rescue_moment

int RescueAnimation::m_rescue_moment
protected

When world ticks > this, it will move the kart above the m_rescue_transform.

◆ m_velocity

float RescueAnimation::m_velocity
protected

The velocity with which the kart is moved.


The documentation for this class was generated from the following files: