-
Notifications
You must be signed in to change notification settings - Fork 0
/
Saucer.h
28 lines (23 loc) · 667 Bytes
/
Saucer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// game engine includes
#include "Object.h"
#include "EventCollision.h"
class Saucer : public df::Object {
private:
// count for movetoStart
int count = 0;
// what sprite to use
std::string spriteName;
/* moves the saucer to the right boundary*/
void moveToStart();
/* finds out if the saucer is out of bounds*/
void out();
/* decides what to do if saucer is hit */
void hit(const df::EventCollision *p_c);
public:
/* creates a saucer object */
Saucer(std::string spriteName);
/* destroys the saucer and adds points to score */
~Saucer();
/* decides what to do on saucers registered events*/
int eventHandler(df::Event *p_e);
};