diff --git a/include/Map.hpp b/include/Map.hpp index a3fda367..36908f02 100644 --- a/include/Map.hpp +++ b/include/Map.hpp @@ -80,6 +80,16 @@ class MapClass : public Core::Drawable { return m_Map[position.x][position.y]; } + void setTileByCellPosition(glm::vec2 position, + std::shared_ptr tile) { + if (position.x > m_MapWdith - 1 || position.y > m_MapHeight - 1 || + position.x < 0 || position.y < 0) { + LOG_DEBUG("False Position Getting"); + return; + } + m_Map[position.x][position.y] = tile; + } + // weird static std::vector> readMapAndTileSet(std::vector map, std::map tileset) {