Added new item sprite.
This commit is contained in:
parent
212f52d555
commit
f8726bcfb3
7 changed files with 4 additions and 3 deletions
|
@ -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
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 |
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
|
||||
|
|
|
@ -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())),
|
||||
|
|
Reference in a new issue