Dragonfly 4.19
A text-based game engine
EventStep.h
1///
2/// A "step" event, generated once per game loop.
3///
4
5#ifndef __EVENT_STEP_H__
6#define __EVENT_STEP_H__
7
8#include "Event.h"
9
10namespace df {
11
12const std::string STEP_EVENT = "df-step";
13
14class EventStep : public Event {
15
16 private:
17 int m_step_count; /// Iteration number of game loop.
18
19 public:
20 /// Default constructor.
22
23 /// Constructor with initial step count.
24 EventStep(int init_step_count);
25
26 /// Set step count.
27 void setStepCount(int new_step_count);
28
29 /// Get step count.
30 int getStepCount() const;
31};
32
33} // end of namespace df
34#endif // __EVENT_STEP_H__
Definition: EventStep.h:14
void setStepCount(int new_step_count)
Set step count.
int getStepCount() const
Get step count.
EventStep(int init_step_count)
Constructor with initial step count.
EventStep()
Iteration number of game loop.
Definition: Event.h:15
An animation for a sprite.
Definition: Animation.h:15