4#include <SFML/Graphics.hpp>
19 Texture characterSpriteSheet;
20 std::vector<std::vector<Sprite>> characterStates;
21 Texture characterTexture;
23 std::string characterTexturePath;
24 Vector2f playerVelocity;
25 float playerXRelativeToMap;
26 float playerYRelativeToMap;
27 float playerXRelativeToScreen;
28 float playerYRelativeToScreen;
29 float playerSpriteWidth;
30 float playerSpriteHeight;
31 float playerJumpHeight;
32 int playerSpriteState;
36 std::shared_ptr<Map> map;
37 std::shared_ptr<Camera> camera;
40 void fall(
float deltaTime);
41 void jump(
float deltaTime);
42 void handlePlayerMovement(
float deltaTime);
43 void loadPlayerStates();
46 Player(
const std::string characterTexturePath, Vector2u windowSize, std::shared_ptr<Map> mapRef,
47 std::shared_ptr<Camera> cameraRef);
55 void update(
float deltaTime);
Inventory getInventory()
get and set inventory
Definition Player.cpp:395
static const int MAX_SLOTS
Definition Player.h:56
float getplayerSpriteWidth()
Definition Player.cpp:582
void setInventory(Inventory *inventory)
Definition Player.cpp:398
float getplayerSpriteHeight()
Definition Player.cpp:577
float getPlayerYRelativeToMap() const
Definition Player.cpp:572
float getPlayerXRelativeToMap() const
Definition Player.cpp:567
void update(float deltaTime)
Definition Player.cpp:535
void renderPlayer(RenderWindow &window)
Definition Player.cpp:562
Player(const std::string characterTexturePath, Vector2u windowSize, std::shared_ptr< Map > mapRef, std::shared_ptr< Camera > cameraRef)
Definition Player.cpp:11