-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbullet.h
More file actions
38 lines (29 loc) · 719 Bytes
/
Copy pathbullet.h
File metadata and controls
38 lines (29 loc) · 719 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
37
38
/*
* bullet.h
*
* Created on: 2013-09-01
* Author: Liam
*/
#ifndef BULLET_H_
#define BULLET_H_
#include "entity.h"
#include "entitycreator.h"
#define BULLET_SPEED 15
typedef class Bullet: public Entity {
public:
Bullet();
Bullet(const vec2d &pos, const vec2d &vel);
void update(float dt);
virtual bool write(std::ofstream &file);
virtual bool read(std::ifstream &file);
private:
void fillImage();
float m_timer;
} Bullet;
typedef class _BulletCreator: public EntityCreator {
public:
virtual ~_BulletCreator() {}
virtual Entity *create() const {return new Bullet;}
virtual Entity *create(const vec2d &pos, const vec2d &vel, const int &dummy) const;
} Bullet_Creator;
#endif /* BULLET_H_ */