Пример #1
0
void AddTextureToTileTxtMap(std::string txtPath, std::string key)
{
	std::shared_ptr<sf::Texture> tempText(new sf::Texture());
	if(!(*tempText).loadFromFile(txtPath))
	{
		std::cout << " texture was not loaded!" << std::endl;
	}
	txtMap->insert(MapPair(key, tempText));
}
Пример #2
0
	void Manager::AddConnection(const ID& id, const Id& evtId, Function fct)
	{
		manager_mutex.lock();

		auto it = _event_fct_map.find(id);

		if (it != _event_fct_map.end()) {
			it->second.insert(MultimapPair(evtId, fct));
		}
		else {
			Multimap evt_map;
			evt_map.insert(MultimapPair(evtId, fct));
			_event_fct_map.insert(MapPair(id, evt_map));
		}

		manager_mutex.unlock();
	}