Dragonfly
4.20
A text-based game engine
v4.20
include
Firework.h
1
///
2
/// A firework particle
3
///
4
5
#ifndef __FIREWORK_H__
6
#define __FIREWORK_H__
7
8
// Engine include.
9
#include "Particle.h"
10
11
namespace
df
{
12
13
class
Firework
:
public
Particle
{
14
private
:
15
unsigned
char
m_r, m_g,
m_b
;
///< RBG values for drawing.
16
unsigned
char
m_initial_opacity
;
///< Initial opacity when created.
17
int
m_initial_age
;
///< Initial age when created.
18
float
m_initial_size
;
///< Initial size when created.
19
20
public
:
21
/// Constructor, specifing size, age, opacity and rgb.
22
Firework
(
float
size,
int
age,
unsigned
char
opacity,
23
unsigned
char
r,
unsigned
char
g,
unsigned
char
b);
24
25
/// Handle step events.
26
/// Return 0 if ignored, else 1.
27
int
eventHandler
(
const
Event
*p_e)
override
;
28
};
29
30
}
// end of namespace df
31
32
#endif
//__FIREWORK_H__
df::Event
Definition:
Event.h:15
df::Firework
Definition:
Firework.h:13
df::Firework::m_initial_age
int m_initial_age
Initial age when created.
Definition:
Firework.h:17
df::Firework::Firework
Firework(float size, int age, unsigned char opacity, unsigned char r, unsigned char g, unsigned char b)
Constructor, specifing size, age, opacity and rgb.
df::Firework::m_b
unsigned char m_b
RBG values for drawing.
Definition:
Firework.h:15
df::Firework::eventHandler
int eventHandler(const Event *p_e) override
Handle step events.
df::Firework::m_initial_opacity
unsigned char m_initial_opacity
Initial opacity when created.
Definition:
Firework.h:16
df::Firework::m_initial_size
float m_initial_size
Initial size when created.
Definition:
Firework.h:18
df::Particle
Definition:
Particle.h:38
df
An animation for a sprite.
Definition:
Animation.h:15
Generated by
1.9.4