-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGun.cpp
More file actions
62 lines (47 loc) · 1.05 KB
/
Copy pathGun.cpp
File metadata and controls
62 lines (47 loc) · 1.05 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
#include "Gun.hpp"
#include <iostream>
using namespace std;
#include "Object.hpp"
Gun :: Gun() :Object('g'){
bullets = 0;
dmgamount = 0;
range = 0;
}
Gun :: Gun(string name, int bullets, int dmgamount, int range):Object('g'){
this->name = name;
this->bullets = bullets;
this->dmgamount = dmgamount;
this->range = range;
}
int Gun::getBullets() const {
return bullets;
}
void Gun::setBullets(int bullets) {
this->bullets = bullets;
}
int Gun::getDmgamount() const {
return dmgamount;
}
void Gun::setDmgamount(int dmgamount) {
this->dmgamount = dmgamount;
}
const string& Gun::getName() const {
return name;
}
void Gun::setName(const string &name) {
this->name = name;
}
int Gun::getRange() const {
return range;
}
void Gun::setRange(int range) {
this->range = range;
}
Gun::~Gun() {
}
ostream& operator<<(ostream& out, Gun& g){
out << "Gun Info: Name = " << g.getName() << " Bullets = " << g.getBullets() << " DmgAmount = " << g.getDmgamount() << " Range = " << g.getRange();
return out;
}
void Gun::useSpecial(Hero& h1, Object** map) {
}