SuperTuxKart
Loading...
Searching...
No Matches
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.
 
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.
 
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)
 

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.
 
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.
 
int m_rescue_moment
 When world ticks > this, it will move the kart above the m_rescue_transform.
 
Refereem_referee
 The referee during a rescue operation.
 
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.
 
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]
 

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

◆ getAnimationType()

virtual KartAnimationType RescueAnimation::getAnimationType ( ) const
inlinevirtual

Implements AbstractKartAnimation.

◆ restoreState()

void RescueAnimation::restoreState ( BareNetworkString buffer)
virtual

Reimplemented from AbstractKartAnimation.

◆ saveState()

void RescueAnimation::saveState ( BareNetworkString buffer)
virtual

Reimplemented from AbstractKartAnimation.

◆ update()

void RescueAnimation::update ( int  ticks)
virtual

Updates the kart animation.

Parameters
ticksNumber of time steps - should be 1.

Reimplemented from AbstractKartAnimation.

◆ updateGraphics()

void RescueAnimation::updateGraphics ( float  dt)
virtual

Reimplemented from AbstractKartAnimation.


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