diff --git a/src/Entity.cpp b/src/Entity.cpp index 85e7bf5..ee3d9f2 100644 --- a/src/Entity.cpp +++ b/src/Entity.cpp @@ -10,7 +10,7 @@ const std::map Entity::entityTypeLookup = { {"House",EntityType::House}, {"Car",EntityType::Car}}; -Entity::Entity(int x, int y, EntityType type, sf::Texture* texture, int width, int height) : type(type) +Entity::Entity(pro_maat::GridUnit x, pro_maat::GridUnit y, EntityType type, sf::Texture* texture, int width, int height) : type(type) { shape = sf::RectangleShape(sf::Vector2f(width*pro_maat::pixelsPerUnit,height*pro_maat::pixelsPerUnit)); // Sets the origin at the center of the entity diff --git a/src/Entity.h b/src/Entity.h index 1e49601..275ad11 100644 --- a/src/Entity.h +++ b/src/Entity.h @@ -42,7 +42,8 @@ class Entity { public: /// x,y, width and height are in grid coordinates - Entity(int x, int y, EntityType type, sf::Texture* texture, int width = 1, int height = 1); + Entity(pro_maat::GridUnit x, pro_maat::GridUnit y, EntityType type, sf::Texture* texture, int width = 1, + int height = 1); explicit Entity(const pugi::xml_node& entityNode, sf::Texture* texture); void move(Orientation orientation);