-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGun.h
More file actions
executable file
·33 lines (27 loc) · 803 Bytes
/
Gun.h
File metadata and controls
executable file
·33 lines (27 loc) · 803 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
/*
* Gun.h
*
* Created on: May 5, 2018
* Author: parkerqueen
*/
#ifndef GUN_H_
#define GUN_H_
#define SCR_FRANG 500
#include "Bomb.h"
class Gun {
private:
Bomb *firedB;
float firingRange;
int numBombs;
public:
Gun(); // Constructor
void load(Point &, Point &,
int = SHP_BMB); // Loads a bomb at given direction and position
void destroyBomb(long); // Destroys a bomb with its ID
void bombspeed(float); // Sets the speed to be followed by a ship bomb
bool trigger(); // Triggers the bombs, moves & draws them with some checks
Bomb *getFiredBombs() const; // Returns the bombs array
int getNumBombs() const; // Returns total number of bombs
~Gun(); // Destructor
};
#endif /* GUN_H_ */