summaryrefslogtreecommitdiff
path: root/src/resource.cpp
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@cornell.engr.siu.edu>2015-05-08 14:25:47 -0500
committerTom Barrett <tombarrett@cornell.engr.siu.edu>2015-05-08 14:25:47 -0500
commit88579e8ab934e1ec50ee4c1a5e2d39b1308c1db9 (patch)
tree93deb6db9cc318e903b7c9b47d5cfee21f323741 /src/resource.cpp
parent39d7fe95633baafe4539f604186b151f30401a39 (diff)
all creatures should die now, and leave a body which is a resource.
they currently don't have a way to gain health so they live short sad lives. haven't compiled or tested, so more work needs to be done
Diffstat (limited to 'src/resource.cpp')
-rw-r--r--src/resource.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/resource.cpp b/src/resource.cpp
index 5044760..e549214 100644
--- a/src/resource.cpp
+++ b/src/resource.cpp
@@ -12,6 +12,15 @@ Resource::Resource(Window m, std::string s) //Constructor
xPosition = xStart;
}
+Resource::Resource(Window m, std::string s, Location z)
+{
+ texture = loadTexture(s, m);
+ renderer = m.getRenderer();
+
+ yPosition = z.y;
+ xPosition = z.x;
+}
+
Location Resource::getLocation() //Returns resource object
{
Location L(xPosition,yPosition,2);