ECS/Project/Project/Systems/CameraSystem/CameraSystem.cpp
//	Set the Active Camera to be No Camera.
Set the Active Camera to be No Camera.
Set the Active Camera to be No Camera .
void CameraSystem::setNoCamera()
{
	std::shared_ptr<EntityManager> entityManager = getEntityManager();
	std::shared_ptr<std::vector<long int>> entities = entityManager->getEntitiesWithComponentOfType(ComponentType::CAMERA_COMPONENT);
	if (entities != NULL)
	{
		for (int i = 0; i < entities->size(); i++)
		{
			Get the Camera Component.
			std::shared_ptr<CameraComponent> cameraComponent = std::dynamic_pointer_cast<CameraComponent>(entityManager->getComponentOfEntity((*entities)[i], ComponentType::CAMERA_COMPONENT, ModuleType::CAMERA_SYSTEM));
			Set this to be the Active Camera Component.
			cameraComponent->setInactive();
		}
	}
	Active Camera Entity
	activeCameraEntity = -1;
}
void CameraSystem :: setNoCamera ( ) { std :: shared_ptr < EntityManager > entityManager = getEntityManager ( ) ; std :: shared_ptr < std :: vector < long int > > entities = entityManager -> getEntitiesWithComponentOfType ( ComponentType :: CAMERA_COMPONENT ) ; if ( entities != NULL ) { for ( int i = 0 ; i < entities -> size ( ) ; i ++ ) { std :: shared_ptr < CameraComponent > cameraComponent = std :: dynamic_pointer_cast < CameraComponent > ( entityManager -> getComponentOfEntity ( ( * entities ) [ i ] , ComponentType :: CAMERA_COMPONENT , ModuleType :: CAMERA_SYSTEM ) ) ; cameraComponent -> setInactive ( ) ; } } activeCameraEntity = -1 ; }
Set the Active Camera to be No Camera.
Set the Active Camera to be No Camera .
//	Get the EntityManager. //	Get the entities with a Transform Component. //	 //	Get the Camera Component. //	Set this to be the Active Camera Component. //	Active Camera Entity