summaryrefslogtreecommitdiff
path: root/src/resource.cpp
blob: 9583f144b56a7596bc727fd3247a76d445ba7d15 (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
31
32
33
34
35
36
#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;
}

Location Resource::getLocation() 
{
	//Location L(xPosition,yPosition,2);
	return L;
}

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