changes
This commit is contained in:
+25
-9
@@ -5,22 +5,38 @@
|
||||
|
||||
#include <SFML/Graphics/Color.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class ObjectData {
|
||||
public:
|
||||
sf::Vector2<float> size = { TILESIZE, TILESIZE };
|
||||
sf::Vector2<float> pos = { TILESIZE, TILESIZE };
|
||||
sf::Color interior_color = sf::Color::Black;
|
||||
sf::Color exterior_color = sf::Color::White;
|
||||
float edge = -2.0f;
|
||||
struct ObjectData {
|
||||
sf::Vector2<float> size { TILESIZE, TILESIZE };
|
||||
sf::Vector2<float> pos { TILESIZE, TILESIZE };
|
||||
sf::Color interior_color { sf::Color::Black };
|
||||
sf::Color exterior_color { sf::Color::White };
|
||||
float edge { -2.0f };
|
||||
};
|
||||
|
||||
class EntityData : public ObjectData {
|
||||
struct EntityData : ObjectData {
|
||||
sf::Vector2<float> velocity { 0, 0 };
|
||||
};
|
||||
|
||||
struct PlayerData : EntityData {
|
||||
ObjectData object;
|
||||
EntityData entity;
|
||||
float dash_length { 0.0f };
|
||||
float max_vertical_acceleration { 0.0f };
|
||||
};
|
||||
|
||||
class LevelData {
|
||||
public:
|
||||
sf::Vector2<float> velocity;
|
||||
std::array<std::array<char, MAX_COLS>, MAX_ROWS> data = {};
|
||||
std::string name = "Null";
|
||||
};
|
||||
|
||||
extern std::vector<ObjectData> object_data;
|
||||
extern std::vector<EntityData> entity_data;
|
||||
extern std::vector<LevelData> level_data;
|
||||
extern PlayerData player_data;
|
||||
|
||||
#endif // DATA_HPP
|
||||
|
||||
Reference in New Issue
Block a user