maps are more efficient to make and run on memory
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user