blob: 08929bc5ad92d58d5b7eca5964a224ff9a77dfe5 (
plain)
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
|
#include "resource.hpp"
Resource::Resource(Window m, std::string s)
{
texture = loadTexture(s, m);
renderer = m.getRenderer();
L.y = rand()%800;
L.x = rand()%1200;
type = 2;
amount = 100;
}
Resource::Resource(Window m, std::string s, Location z)
{
texture = loadTexture(s, m);
renderer = m.getRenderer();
L.y = z.y;
L.x = z.x;
type = 2;
amount = 100;
}
void Resource::eat()
{
amount-=10;
}
|