Added new item sprite.

This commit is contained in:
Felix Ableitner 2013-08-18 14:27:59 +02:00
parent 212f52d555
commit f8726bcfb3
7 changed files with 4 additions and 3 deletions

View file

@ -21,3 +21,4 @@ Space: pause
## Texture used
Player/Enemy (modified): http://opengameart.org/content/top-down-runner
Tiles (modified): http://opengameart.org/content/metalstone-textures
Item: http://opengameart.org/content/random-adventure-kit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 B

BIN
resources/textures/item.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -125,7 +125,7 @@ Game::updateGui() {
auto item = mWorld.getClosestItem(mPlayer->getPosition());
if (item.get() != nullptr) {
mPickupInstruction->setText("Press F to pick up " + item->getName());
mPickupInstruction->setText("F - pick up " + item->getName());
mPickupInstruction->setPosition(
mWindow.getSize().x / 2 - mPickupInstruction->getSize().x / 2,
mWindow.getSize().y * 0.66f);

View file

@ -10,7 +10,7 @@
#include "../abstract/Character.h"
Gadget::Gadget(std::string name) :
Item(sf::Vector2f(40, 40), "gadget.png"),
Item(sf::Vector2f(32, 32), "item.png"),
mName(name) {
}

View file

@ -14,7 +14,7 @@
#include "../util/Yaml.h"
Weapon::Weapon(World& world, Character& holder, const Yaml& config) :
Item(Vector2f(80, 30), "weapon.png"),
Item(Vector2f(32, 32), "item.png"),
mWorld(world),
mHolder(&holder),
mName(config.get("name", std::string())),