ECS/Project/Project/Resources/ResourceManager/LightResourceManager/LightResourceManager.cpp
//	Update the Light, under the specified name.
Update the Light, under the specified name.
Update the Light under the specified name .
void LightResourceManager::updateLight(std::string currentLightName, std::shared_ptr<LightData> newLightData)
{
	auto lightIterator = mapNameToLightData.find(currentLightName);
	if (lightIterator != mapNameToLightData.end())
	{
		lightIterator->second = newLightData;
	}
	else
	{
		std::shared_ptr<ResourceEvent> newEvent = std::make_shared<ResourceEvent>(ResourceType::LIGHT_RESOURCE, ResourceEventType::RESOURCE_UPDATED, ModuleType::LIGHT_MANAGER, currentLightName, newLightData);
		getDispatcher()->dispatchToEventQueue(newEvent);
	}
}
void LightResourceManager :: updateLight ( std :: string currentLightName , std :: shared_ptr < LightData > newLightData ) { auto lightIterator = mapNameToLightData . find ( currentLightName ) ; if ( lightIterator != mapNameToLightData . end ( ) ) { lightIterator -> second = newLightData ; } else { std :: shared_ptr < ResourceEvent > newEvent = std :: make_shared < ResourceEvent > ( ResourceType :: LIGHT_RESOURCE , ResourceEventType :: RESOURCE_UPDATED , ModuleType :: LIGHT_MANAGER , currentLightName , newLightData ) ; getDispatcher ( ) -> dispatchToEventQueue ( newEvent ) ; } }
Update the Light, under the specified name.
Update the Light under the specified name .
//	TO DO //	Throw did not find LightData error.