summaryrefslogtreecommitdiff
path: root/src/resource.cpp
blob: c4a93410e1105fb3f3160e3424ea92de91c10b2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "resource.hpp"

Resource::Resource(Window m, std::string s) //Constructor
{
	texture = loadTexture(s, m);
	renderer = m.getRenderer();

	//Initialized random position coordinates
	int yStart = rand()%800;
	int xStart = rand()%1200;
	yPosition = yStart;
	xPosition = xStart;
}

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