ECS/Project/Project/Resources/ResourceManager/TextureResourceManager/TextureResourceManager.cpp
//	Delete the Texture, specified by name.
Delete the Texture, specified by name.
Delete the Texture specified by name .
void TextureResourceManager::deleteTexture(std::string deadTextureName)
{
	auto textureIterator = mapNameToTextureData.find(deadTextureName);
	if (textureIterator != mapNameToTextureData.end())
	{
		mapNameToTextureData.erase(deadTextureName);
		Create the delete Texture event.
		std::shared_ptr<ResourceEvent> newEvent = std::make_shared<ResourceEvent>(ResourceType::TEXTURE_RESOURCE, ResourceEventType::RESOURCE_DESTROYED, ModuleType::TEXTURE_MANAGER, deadTextureName, nullptr);
		Dispatch the event to the EventQueue.
		getDispatcher()->dispatchToEventQueue(newEvent);
	}
	else
	{
		TO DO
		Throw did not find TextureData error.
	}
}
void TextureResourceManager :: deleteTexture ( std :: string deadTextureName ) { auto textureIterator = mapNameToTextureData . find ( deadTextureName ) ; if ( textureIterator != mapNameToTextureData . end ( ) ) { mapNameToTextureData . erase ( deadTextureName ) ; std :: shared_ptr < ResourceEvent > newEvent = std :: make_shared < ResourceEvent > ( ResourceType :: TEXTURE_RESOURCE , ResourceEventType :: RESOURCE_DESTROYED , ModuleType :: TEXTURE_MANAGER , deadTextureName , nullptr ) ; getDispatcher ( ) -> dispatchToEventQueue ( newEvent ) ; } else { } }
Delete the Texture, specified by name.
Delete the Texture specified by name .
//	Find the Texture. //	 //	Create the delete Texture event. //	Dispatch the event to the EventQueue. //	TO DO //	Throw did not find TextureData error.