SuperTuxKart
Loading...
Searching...
No Matches
graphics
explosion.hpp
1
//
2
// SuperTuxKart - a fun racing game with go-kart
3
// Copyright (C) 2004-2015 Steve Baker <sjbaker1@airmail.net>
4
// Copyright (C) 2014-2015 SuperTuxKart-Team
5
//
6
// This program is free software; you can redistribute it and/or
7
// modify it under the terms of the GNU General Public License
8
// as published by the Free Software Foundation; either version 3
9
// of the License, or (at your option) any later version.
10
//
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program; if not, write to the Free Software
18
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20
#ifndef HEADER_EXPLOSION_HPP
21
#define HEADER_EXPLOSION_HPP
22
23
#include "graphics/hit_sfx.hpp"
24
#include "utils/cpp2011.hpp"
25
#include "utils/no_copy.hpp"
26
27
namespace
irr
28
{
29
namespace
scene {
class
IParticleSystemSceneNode; }
30
}
31
using namespace
irr;
32
33
class
Vec3
;
34
class
SFXBase
;
35
class
ParticleEmitter
;
36
40
class
Explosion
:
public
HitSFX
41
{
42
private
:
43
int
m_remaining_ticks;
44
int
m_emission_frames;
45
ParticleEmitter
* m_emitter;
46
int
m_explosion_ticks;
47
48
49
public
:
50
Explosion
(
const
Vec3
& coord,
const
char
* explosion_sound,
const
char
* particle_file );
51
~Explosion
();
52
bool
updateAndDelete
(
int
ticks) OVERRIDE;
53
bool
hasEnded ()
54
{
55
return
m_remaining_ticks <= -m_explosion_ticks;
56
}
57
58
} ;
59
60
#endif
61
62
/* EOF */
Explosion
Definition:
explosion.hpp:41
Explosion::updateAndDelete
bool updateAndDelete(int ticks) OVERRIDE
Updates the explosion, called one per time step.
Definition:
explosion.cpp:89
Explosion::~Explosion
~Explosion()
Destructor stops the explosion sfx from being played and frees its memory.
Definition:
explosion.cpp:74
HitSFX
Definition:
hit_sfx.hpp:31
ParticleEmitter
manages smoke particle effects
Definition:
particle_emitter.hpp:42
SFXBase
The base class for sound effects.
Definition:
sfx_base.hpp:43
Vec3
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition:
vec3.hpp:35
Generated on Fri May 19 2023 21:44:32 for SuperTuxKart by
1.9.6