Add player turning (Finally)

This commit is contained in:
Bram Verhulst
2024-04-30 11:57:24 +02:00
parent 8d56c747be
commit a1a2406084
9 changed files with 166 additions and 43 deletions

View File

@@ -10,6 +10,7 @@ enum class PlayerState
Idle,
Walking,
Digging,
Turning
};
enum class PlayerDirection
@@ -32,7 +33,9 @@ class Player
public:
explicit Player(const Vector2f& Position, TextureManager* pTextureManager);
Player( const Player& other ) = default;
Player(Player&& other) = default;
Player(Player&& other);
Player& operator=(const Player& other) = delete;
Player& operator=(Player&& other) = delete;
~Player();
@@ -92,6 +95,7 @@ private:
const float m_DigTime{ 0.5f };
bool m_Grounded { false };
bool m_IsTurning{ false };
bool m_DidJustDigRight { false };
bool m_DidJustDigLeft { false };
@@ -101,7 +105,7 @@ private:
Animation* m_digAnimation{ nullptr };
PlayerState m_State { PlayerState::Idle };
PlayerDirection m_Direction { PlayerDirection::Right };
PlayerDirection m_Direction { PlayerDirection::Left };
DigDirection m_DigDirection { DigDirection::Right };
//Testing