Ejemplo n.º 1
0
void EditorScene::CreateCameraLight()
{
    SafeRelease(cameraLight);
    
    Light *light = new Light();
    light->SetType(Light::TYPE_DIRECTIONAL);

    cameraLight = new Entity();
    cameraLight->SetName(ResourceEditor::EDITOR_CAMERA_LIGHT);
    cameraLight->AddComponent(new LightComponent(light));
    light->Release();
    
    UpdateCameraLightOnScene();
}
Ejemplo n.º 2
0
EditorLightSystem::EditorLightSystem(DAVA::Scene * scene)
	: DAVA::SceneSystem(scene)
{
	Light *light = new Light();
	light->SetType(Light::TYPE_DIRECTIONAL);
		
	cameraLight = new DAVA::Entity();
	cameraLight->SetName(ResourceEditor::EDITOR_CAMERA_LIGHT);
	cameraLight->AddComponent(ScopedPtr<LightComponent> (new LightComponent(light)));
	light->Release();

	lightCountOnScene = 0;
	SetRequiredComponents(1 << Component::LIGHT_COMPONENT);

	isEnabled = true;
	AddCameraLightOnScene();
}