-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItems.cpp
57 lines (52 loc) · 1.11 KB
/
Items.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
#include"Items.h"
namespace items {
Items::Items() {
this->name = "test";
this->authority = Authority::Error;
this->quantity = 1;
}
Items::Items(std::string name, int authority, int quantity, ability::Ability ability, img::ImageFile img) {
this->name = name;
this->authority = authority;
this->quantity = quantity;
this->ability = ability;
this->img = img;
}
void Items::setName(std::string name) {
this->name = name;
}
void Items::setAuthority(int authority) {
this->authority = authority;
}
void Items::setQuantity(int quantity) {
this->quantity = quantity;
}
std::string Items::getName() {
return this->name;
}
int Items::getAuthority() {
return this->authority;
}
int Items::getQuantity() {
return this->quantity;
}
img::ImageFile Items::getImg() {
return this->img;
}
void Items::update() {
}
void Items::render(sf::RenderTarget* target) {
target->draw(this->img.getSprite());
}
ItemList::ItemList() {
}
ItemList::ItemList(Items* item) {
this->item = item;
}
ItemList::~ItemList() {
delete this->item;
}
Items* ItemList::getItem(){
return this->item;
}
}