SuperTuxKart
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
36
#ifndef SERVER_ONLY
37
class
ParticleEmitter
;
38
#endif
39
43
class
Explosion
:
public
HitSFX
44
{
45
private
:
46
int
m_remaining_ticks;
47
int
m_emission_frames;
48
49
#ifndef SERVER_ONLY
50
ParticleEmitter
* m_emitter;
51
#endif
52
53
int
m_explosion_ticks;
54
55
56
public
:
57
Explosion
(
const
Vec3
& coord,
const
char
* explosion_sound,
const
char
* particle_file );
58
~
Explosion
();
59
bool
updateAndDelete(
int
ticks) OVERRIDE;
60
bool
hasEnded ()
61
{
62
return
m_remaining_ticks <= -m_explosion_ticks;
63
}
64
65
} ;
66
67
#endif
68
69
/* EOF */
Explosion
Definition:
explosion.hpp:44
HitSFX
Definition:
hit_sfx.hpp:31
ParticleEmitter
manages smoke particle effects
Definition:
particle_emitter.hpp:44
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 Tue Nov 4 2025 13:56:37 for SuperTuxKart by
1.9.1