Update demo code
This commit is contained in:
committed by
Jérôme Leclercq
parent
1727ae8631
commit
f572d229d9
@@ -148,8 +148,12 @@ int main()
|
||||
|
||||
entt::entity headingEntity = registry.create();
|
||||
{
|
||||
auto spotLight = std::make_shared<Nz::SpotLight>();
|
||||
spotLight->EnableShadowCasting(true);
|
||||
spotLight->UpdateShadowMapSize(1024);
|
||||
|
||||
auto& entityLight = registry.emplace<Nz::LightComponent>(playerEntity);
|
||||
entityLight.AttachLight(std::make_shared<Nz::SpotLight>(), 1);
|
||||
entityLight.AttachLight(std::move(spotLight), 1);
|
||||
|
||||
auto& entityGfx = registry.emplace<Nz::GraphicsComponent>(playerEntity);
|
||||
entityGfx.AttachRenderable(model, 1);
|
||||
|
||||
Reference in New Issue
Block a user