aboutsummaryrefslogtreecommitdiffstats
path: root/src/items.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-04-28 10:46:38 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-04-28 10:46:38 -0400
commit68cb663a370747c325eeeeea66cca86803e4b8e5 (patch)
treeb82b7b8d77ff2a3439e99d11589bbf1a3ef1f07c /src/items.cpp
parent2e026aff928b30267a39ef6fdeec3e43e9f106e6 (diff)
parent174bcd3a415c21fc2c59a3af1b6333faa78b37d0 (diff)
New inventory system
Diffstat (limited to 'src/items.cpp')
-rw-r--r--src/items.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/items.cpp b/src/items.cpp
index b25b482..403c49e 100644
--- a/src/items.cpp
+++ b/src/items.cpp
@@ -1,4 +1,7 @@
#include <inventory.hpp>
+#include <entities.hpp>
+
+extern Player *player;
/************************************************************************************
* GLOBAL *
@@ -16,6 +19,10 @@ int BaseItem::useItem()
int Sword::useItem()
{
std::cout << "Swing!" << std::endl;
+ if (player->left)
+ rotation += 10.0f;
+ else
+ rotation -= 10.0f;
return 0;
}