Dragonfly 4.20
A text-based game engine
Fader.h
1//
2// A fading particle
3//
4
5#ifndef __FADER_H__
6#define __FADER_H__
7
8// Engine include.
9#include "Particle.h"
10
11namespace df {
12
13class Fader : public Particle {
14 private:
15 unsigned char m_fade; ///< Amount of fade each step.
16
17 public:
18 /// Create fading particle with size (pixels), age (in ticks),
19 //// opacity (0-255) and rgb color.
20 Fader(float size, int age, unsigned char opacity,
21 unsigned char r, unsigned char g, unsigned char b);
22
23 // Handle step events.
24 // Return 0 if ignored, else 1.
25 int eventHandler(const df::Event *p_e) override;
26};
27
28} // end of namespace df
29
30#endif //__FADER_H__
Definition: Event.h:15
Definition: Fader.h:13
int eventHandler(const df::Event *p_e) override
Handle event (default only handles pathfinding).
Fader(float size, int age, unsigned char opacity, unsigned char r, unsigned char g, unsigned char b)
Create fading particle with size (pixels), age (in ticks), / opacity (0-255) and rgb color.
unsigned char m_fade
Amount of fade each step.
Definition: Fader.h:15
Definition: Particle.h:38
An animation for a sprite.
Definition: Animation.h:15