From 738c3c59a03135f2adeed3804c5a45faf441c947 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 29 Jul 2017 18:25:01 -0400 Subject: added gif support --- src/player.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/player.cpp') diff --git a/src/player.cpp b/src/player.cpp index 6674da0..3606bc7 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -227,7 +227,7 @@ void PlayerSystem::receive(const UseItemEvent& uie) uie.attack->range.x *= -1; game::events.emit(loc, *uie.attack, true); } else if (uie.item->type == "Bow") { - /*if (InventorySystem::take("Arrow", 1)) { + if (InventorySystem::take("Arrow", 1)) { auto e = game::entities.create(); auto pos = getPosition(); e.assign(pos.x, pos.y + 10); @@ -242,8 +242,10 @@ void PlayerSystem::receive(const UseItemEvent& uie) sprite->addSpriteSegment(SpriteData(tex->sprite), 0); auto dim = HLINES(sprite->getSpriteSize()); e.assign(dim.x, dim.y); - e.assign(10, false); - }*/ + e.assign(uie.attack->power, false); + if (uie.attack->effect.size() > 0) + e.component()->effect = uie.attack->effect; + } } cool.store(false); -- cgit v1.2.3