summaryrefslogtreecommitdiff
path: root/src/resource.cpp
blob: 8b00e0a949beaa76ae2d4cb7728fcf682d79967f (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;
    L.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;
    L.type = 2;
	
    amount = 100;
}

void Resource::eat()
{
	amount-=10;
}