maps are more efficient to make and run on memory

This commit is contained in:
DarthMooMancer
2025-10-26 16:47:16 -04:00
parent 5e5f712a84
commit cd19e841a5
6 changed files with 135 additions and 105 deletions
+2 -6
View File
@@ -4,6 +4,7 @@
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/System/Vector2.hpp>
#include "scheduler.hpp"
#include "globals.hpp"
enum class CollisionDir { None, Left, Right, Top, Bottom };
@@ -24,11 +25,6 @@ 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, float dash_distance, sf::Color inside_color, sf::Color border_color);
@@ -37,7 +33,7 @@ public:
float m_dash_distance;
bool m_jumping;
bool m_dash;
Player_timers timers;
Times timers;
void handle_movment();
void handle_gravity();
bool get_jumping();