-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeapon.cpp
78 lines (63 loc) · 1.7 KB
/
Weapon.cpp
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include "Weapon.h"
#include "GameObject.h"
//// MÉTODOS CLASE WEAPON ////
//* Constructores *//
Weapon::Weapon() : GameObject() {
this->damage = 0;
this->cylinderSize = 0;
this->ammunition = 0;
this->initialAmmunition = 0;
this->cadence = 0.0;
}
Weapon::Weapon(int damage, int cylinderSize, int ammunition, int initialAmmunition, float cadence) : GameObject() {
this->damage = damage;
this->cylinderSize = cylinderSize;
this->ammunition = ammunition;
this->initialAmmunition = initialAmmunition;
this->cadence = cadence;
}
Weapon::Weapon(const Vector3D& position, const Color& color, const Vector3D& speed, const Vector3D& orientation,
int damage, int cylinderSize, int ammunition, int initialAmmunition, float cadence)
: GameObject(position, color, speed, orientation, Vector3D(), false) {
this->damage = damage;
this->cylinderSize = cylinderSize;
this->ammunition = ammunition;
this->initialAmmunition = initialAmmunition;
this->cadence = cadence;
}
//* Getters *//
int Weapon::getDamage() const {
return this->damage;
}
int Weapon::getCylinderSize() const {
return this->cylinderSize;
}
int Weapon::getAmmunition() const {
return this->ammunition;
}
int Weapon::getInitialAmmunition() const {
return this->initialAmmunition;
}
float Weapon::getCadence() const {
return this->cadence;
}
//* Setters *//
void Weapon::setDamage(const int& d) {
this->damage = d;
}
void Weapon::setCylinderSize(const int cS) {
this->cylinderSize = cS;
}
void Weapon::setAmmunition(const int a) {
this->ammunition = a;
}
void Weapon::setInitialAmmunition(const int& iA) {
this->ammunition = iA;
}
void Weapon::setCadence(const float& c) {
this->cadence = c;
}
//* Otros *//
//Renderizado
void Weapon::render() const {
}