ECS/Project/Project/Resources/ResourceManager/TextureResourceManager/TextureResourceManager.cpp
//	Update the Texture, specified by name.
Update the Texture, specified by name.
Update the Texture specified by name .
void TextureResourceManager::updateTexture(std::string currentTextureName, std::shared_ptr<TextureData> newTextureData)
{
	auto textureIterator = mapNameToTextureData.find(currentTextureName);
	if (textureIterator != mapNameToTextureData.end())
	{
		textureIterator->second = newTextureData;
		std::shared_ptr<ResourceEvent> newEvent = std::make_shared<ResourceEvent>(ResourceType::TEXTURE_RESOURCE, ResourceEventType::RESOURCE_UPDATED, ModuleType::TEXTURE_MANAGER, currentTextureName, newTextureData);
		getDispatcher()->dispatchToEventQueue(newEvent);
	}
	else
	{
	}
}
void TextureResourceManager :: updateTexture ( std :: string currentTextureName , std :: shared_ptr < TextureData > newTextureData ) { auto textureIterator = mapNameToTextureData . find ( currentTextureName ) ; if ( textureIterator != mapNameToTextureData . end ( ) ) { textureIterator -> second = newTextureData ; std :: shared_ptr < ResourceEvent > newEvent = std :: make_shared < ResourceEvent > ( ResourceType :: TEXTURE_RESOURCE , ResourceEventType :: RESOURCE_UPDATED , ModuleType :: TEXTURE_MANAGER , currentTextureName , newTextureData ) ; getDispatcher ( ) -> dispatchToEventQueue ( newEvent ) ; } else { } }
Update the Texture, specified by name.
Update the Texture specified by name .
//	Find the Texture. //	Set the new Texture Data associated with the Texture. //	Create the update the Texture Resource. //	Dispatch the creation to the EventQueue. //	TO DO //	Throw did not find TextureData error.