This commit is contained in:
DarthMooMancer
2025-10-24 14:37:31 -04:00
parent cebb2e0ce9
commit cb391573e2
8 changed files with 77 additions and 54 deletions
+9 -1
View File
@@ -24,12 +24,20 @@ protected:
float _border_thickness;
};
struct Player_timers {
float dash_cooldown { 0 };
float dash_cooldown_max { 5 };
};
class Player : public Entity {
public:
Player(sf::Vector2<float> size, sf::Vector2<float> pos, sf::Vector2f velocity, float border_thickness, float gravity, float max_acceleration, sf::Color inside_color, sf::Color border_color);
Player(sf::Vector2<float> size, sf::Vector2<float> pos, sf::Vector2f velocity, float border_thickness, float gravity, float max_acceleration, float dash_distance, sf::Color inside_color, sf::Color border_color);
float m_acceleration;
float m_jump_strength;
float m_dash_distance;
bool m_jumping;
bool m_dash;
Player_timers timers;
void handle_movment();
void handle_gravity();
bool get_jumping();