SuperTuxKart
Loading...
Searching...
No Matches
hit_sfx.hpp
1//
2// SuperTuxKart - a fun racing game with go-kart
3// Copyright (C) 2011-2015 Joerg Henrichs
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 3
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19#ifndef HEADER_HIT_SFX_HPP
20#define HEADER_HIT_SFX_HPP
21
22#include "graphics/hit_effect.hpp"
23#include "utils/cpp2011.hpp"
24
25class SFXBase;
26
30class HitSFX : public HitEffect
31{
32private:
35
36public:
37 HitSFX(const Vec3& coord, const char* explosion_sound);
38 ~HitSFX();
39 virtual bool updateAndDelete(int ticks) OVERRIDE;
40 virtual void setLocalPlayerKartHit() OVERRIDE;
41
42}; // HitSFX
43
44#endif
45
46/* EOF */
A small interface for effects to be used when a kart is hit.
Definition: hit_effect.hpp:33
Definition: hit_sfx.hpp:31
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 no...
Definition: hit_sfx.cpp:52
~HitSFX()
Destructor stops the explosion sfx from being played and frees its memory.
Definition: hit_sfx.cpp:42
SFXBase * m_sfx
The sfx to play.
Definition: hit_sfx.hpp:34
virtual bool updateAndDelete(int ticks) OVERRIDE
Updates the hit sfx, called one per time step.
Definition: hit_sfx.cpp:64
The base class for sound effects.
Definition: sfx_base.hpp:43
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35