summaryrefslogtreecommitdiff
path: root/src/resource.cpp
diff options
context:
space:
mode:
authortom <tom@ground-control>2016-05-02 16:21:23 -0500
committertom <tom@ground-control>2016-05-02 16:21:23 -0500
commit084d556f831832c1ca15d1e7cd52944815d9beea (patch)
tree675973a47691c06f19bd27a742c4888c02d66863 /src/resource.cpp
parent42d7b3bb511333e242a74f360873deb64cd89522 (diff)
implemented the location fully into entity
Diffstat (limited to 'src/resource.cpp')
-rw-r--r--src/resource.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/resource.cpp b/src/resource.cpp
index 8f1a4cf..9583f14 100644
--- a/src/resource.cpp
+++ b/src/resource.cpp
@@ -5,8 +5,9 @@ Resource::Resource(Window m, std::string s)
texture = loadTexture(s, m);
renderer = m.getRenderer();
- yPosition = rand()%800;
- xPosition = rand()%1200;
+ L.y = rand()%800;
+ L.x = rand()%1200;
+ L.type = 2;
amount = 100;
}
@@ -16,15 +17,16 @@ Resource::Resource(Window m, std::string s, Location z)
texture = loadTexture(s, m);
renderer = m.getRenderer();
- yPosition = z.y;
- xPosition = z.x;
-
- amount = 100;
+ L.y = z.y;
+ L.x = z.x;
+ L.type = 2;
+
+ amount = 100;
}
Location Resource::getLocation()
{
- Location L(xPosition,yPosition,2);
+ //Location L(xPosition,yPosition,2);
return L;
}