-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbullet.h
50 lines (33 loc) · 810 Bytes
/
bullet.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* File: bullet.h
* Author: gg
*
* Created on 7 de dezembro de 2019, 01:09
*/
#ifndef BULLET_H
#define BULLET_H
#include "projectile.h"
#include "wfobj.h"
class bullet_t : public projectile_t {
private:
static wf_object_t* sModel;
bool enemy;
float radius = 10.0f;
float horizontal = 0;
float vertical = 0;
public:
bullet_t(const point3f& offset, const vector3f& velocity, bool enemy);
void setRadius(float radius) {
this->radius = radius;
}
void hit(obstacle_t* other) override;
void draw() const override;
float getRadius() const override {
return radius;
}
static void init(wf_object_loader_t& loader);
static void draw0() {
sModel->draw();
}
};
#endif /* BULLET_H */