Back to index

supertuxkart  0.5+dfsg1
Public Member Functions | Public Attributes
Explosion Class Reference

#include <explosion.hpp>

List of all members.

Public Member Functions

 Explosion (sgCoord *coord)
void init (sgCoord *coord)
void update (float delta_t)
int inUse ()
bool hasEnded ()

Public Attributes

int m_step
ssgSelector * m_seq

Detailed Description

Definition at line 25 of file explosion.hpp.


Constructor & Destructor Documentation

Explosion::Explosion ( sgCoord *  coord)

Definition at line 27 of file explosion.cpp.

                                   : ssgTransform()
{
    this->ref();
    ssgCutout *cut = new ssgCutout();
    addKid(cut);  // derefing the explosion will free the cutout
    m_seq   = projectile_manager->getExplosionModel();
    cut->addKid(m_seq);
    init(coord);
}   // Explosion

Here is the call graph for this function:


Member Function Documentation

bool Explosion::hasEnded ( ) [inline]

Definition at line 36 of file explosion.hpp.

{return m_step >= m_seq->getNumKids(); }
void Explosion::init ( sgCoord *  coord)

Definition at line 38 of file explosion.cpp.

{
    sound_manager->playSfx( SOUND_EXPLOSION );

    setTransform(coord);
    m_step = -1;
    scene->add(this);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int Explosion::inUse ( ) [inline]

Definition at line 35 of file explosion.hpp.

{return (m_step >= 0);                 }
void Explosion::update ( float  delta_t)

Definition at line 48 of file explosion.cpp.

{

    if ( ++m_step >= m_seq->getNumKids() )
    {
        scene->remove((ssgTransform*)this);
        projectile_manager->FinishedExplosion();
        return ;
    }

    m_seq -> selectStep ( m_step ) ;

}

Here is the call graph for this function:


Member Data Documentation

ssgSelector* Explosion::m_seq

Definition at line 29 of file explosion.hpp.

Definition at line 28 of file explosion.hpp.


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