data driving walls

This commit is contained in:
Andrew Haynes Macbook
2026-01-14 16:05:17 -05:00
parent 1fa3293df0
commit ad2d01ab05
12 changed files with 319 additions and 209 deletions
+26
View File
@@ -0,0 +1,26 @@
#ifndef DATA_HPP
#define DATA_HPP
#include "globals.hpp"
#include <SFML/Graphics/Color.hpp>
#include <SFML/System/Vector2.hpp>
#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;
};
class EntityData : public ObjectData {
public:
sf::Vector2<float> velocity;
};
extern std::vector<ObjectData> object_data;
#endif // DATA_HPP