void Level::destroyEntity(Entity& e) { const sf::Vector2i coord = mapPixelToCoords(entities.getComponent<CompSkin>(e.id())->_sprite.getPosition()); _entitiesLayer->remove(&e,false); _byCoords[coord].remove(&e); e.remove(); }
Vector2f RenderTarget::mapPixelToCoords(const Vector2i& point) const { return mapPixelToCoords(point, getView()); }
sf::Vector2f Window::getMousePositionView(sf::View const& view) { return mapPixelToCoords(sf::Mouse::getPosition(*this),view); }
sf::Vector2f Window::getMousePositionMap() { return mapPixelToCoords(sf::Mouse::getPosition(*this)); }
sf::Vector2f Window::getTouchPositionView(sf::View const& view, unsigned int touchIndex) { return mapPixelToCoords(sf::Touch::getPosition(touchIndex,*this),view); }
sf::Vector2f Window::getTouchPositionMap(unsigned int touchIndex) const { return mapPixelToCoords(sf::Touch::getPosition(touchIndex,*this)); }