Update demo code

This commit is contained in:
SirLynix
2022-11-20 15:43:00 +01:00
committed by Jérôme Leclercq
parent 1727ae8631
commit f572d229d9
3 changed files with 21 additions and 17 deletions

View File

@@ -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);