-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrocket.h
More file actions
36 lines (29 loc) · 758 Bytes
/
Copy pathrocket.h
File metadata and controls
36 lines (29 loc) · 758 Bytes
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
29
30
31
32
33
34
35
36
/*
* rocket.h
*
* Created on: 2013-09-03
* Author: Liam
*/
#ifndef ROCKET_H_
#define ROCKET_H_
#include "entity.h"
#include "observer.h"
#include "entitycreator.h"
typedef class Rocket: public Entity, public Observer {
public:
Rocket();
Rocket(const vec2d &pos, const vec2d &direction);
void update(float dt);
virtual bool write(std::ofstream &file);
virtual bool read(std::ifstream &file);
virtual void fixup();
private:
vec2d m_direction;
void fillImage();
} Rocket;
typedef class _RocketCreator: public EntityCreator {
virtual ~_RocketCreator() {};
virtual Entity *create() const {return new Rocket;}
virtual Entity *create(const vec2d &pos, const vec2d &dir, const int &dummy) const;
} Rocket_Creator;
#endif /* ROCKET_H_ */