Dragonfly 4.20
A text-based game engine
Debris.h
1///
2/// A debris particle
3///
4
5#ifndef __DEBRIS_H__
6#define __DEBRIS_H__
7
8// Engine include.
9#include "Particle.h"
10
11namespace df {
12
13class Debris : public Particle {
14 private:
15 char m_ch; /// Character to draw.
16 Color m_color; /// Character color.
17 float m_rotate; /// Degrees per tick.
18 float m_rotation; /// Degrees rotated.
19
20 public:
21 /// Constructor.
22 Debris(int age, unsigned char opacity, Color color,
23 Vector velocity, char ch, float rotate);
24
25 /// Draw character, applying rotation.
26 /// Return 0 if ok, else -1.
27 virtual int draw() override;
28};
29
30} // end of namespace df
31
32#endif //__DEBRIS_H__
Definition: Debris.h:13
Color m_color
Character to draw.
Definition: Debris.h:16
Debris(int age, unsigned char opacity, Color color, Vector velocity, char ch, float rotate)
Degrees rotated.
virtual int draw() override
Draw character, applying rotation.
float m_rotate
Character color.
Definition: Debris.h:17
float m_rotation
Degrees per tick.
Definition: Debris.h:18
Definition: Particle.h:38
Definition: Vector.h:12
An animation for a sprite.
Definition: Animation.h:15
Color
Colors Dragonfly recognizes.
Definition: Color.h:11