From 084d556f831832c1ca15d1e7cd52944815d9beea Mon Sep 17 00:00:00 2001 From: tom Date: Mon, 2 May 2016 16:21:23 -0500 Subject: implemented the location fully into entity --- src/resource.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/resource.cpp') 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; } -- cgit v1.2.3