SuperTuxKart
Public Member Functions | Private Attributes | List of all members
HitSFX Class Reference
Inheritance diagram for HitSFX:
Inheritance graph
[legend]

Public Member Functions

 HitSFX (const Vec3 &coord, const char *explosion_sound)
 Creates a sound effect when something was hit. More...
 
 ~HitSFX ()
 Destructor stops the explosion sfx from being played and frees its memory.
 
virtual bool updateAndDelete (int ticks) OVERRIDE
 Updates the hit sfx, called one per time step. More...
 
virtual void setLocalPlayerKartHit () OVERRIDE
 Called if this hit effect is for a player kart (in which case it might be played louder than for a non-player kart if split screen is used). More...
 
- Public Member Functions inherited from HitEffect
 HitEffect ()
 Constructor for a hit effect. More...
 
bool getLocalPlayerKartHit () const
 Returns if this effect affects a player kart. More...
 

Private Attributes

SFXBasem_sfx
 The sfx to play. More...
 

Constructor & Destructor Documentation

◆ HitSFX()

HitSFX::HitSFX ( const Vec3 coord,
const char *  explosion_sound 
)

Creates a sound effect when something was hit.

Member Function Documentation

◆ setLocalPlayerKartHit()

void HitSFX::setLocalPlayerKartHit ( )
virtual

Called if this hit effect is for a player kart (in which case it might be played louder than for a non-player kart if split screen is used).

If this sfx is for a player kart in split screen, make it louder again.

Reimplemented from HitEffect.

◆ updateAndDelete()

bool HitSFX::updateAndDelete ( int  ticks)
virtual

Updates the hit sfx, called one per time step.

If this function returns true, the effect will be deleted.

Parameters
dtTime step size.
Returns
true If the explosion is finished.

Implements HitEffect.

Reimplemented in Explosion.

Member Data Documentation

◆ m_sfx

SFXBase* HitSFX::m_sfx
private

The sfx to play.


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