-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbullet.h
More file actions
38 lines (26 loc) · 766 Bytes
/
Copy pathbullet.h
File metadata and controls
38 lines (26 loc) · 766 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
#ifndef GALAGA_BULLET
#define GALAGA_BULLET
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_image.h>
#include "utilities.h"
class Bullet {
Rectangle _container;
ALLEGRO_BITMAP *_texture;
bool _alive;
int _moveSpeed = 10;
bool _shipBullet;
Rectangle _bounds;
public:
Bullet(int x, int y, ALLEGRO_BITMAP *texture, bool shipBullet, Rectangle bounds);
~Bullet();
int move();
Rectangle getContainer() { return _container; }
bool isAlive() { return _alive; };
void kill() { _alive = false; }
void vivify() { _alive = true; }
void update(unsigned int ticks);
void render(/* camera *camera */);
void render(int x, int y);
};
#endif