Integrating the changes made
Finally, all we have left to do in order to make this work is add the newly created component and system types to the ECS:
void Game::SetUpECS() { ... m_entityManager->AddComponentType<C_ShadowCaster> (Component::ShadowCaster); ... m_systemManager->AddSystem<S_Shadow>(System::Shadow); ... m_systemManager->GetSystem<S_Shadow>(System::Shadow)-> SetLightManager(m_lightManager.get()); }
The shadow system itself also needs a pointer to the light manager for obvious reasons. Running the game now, with all of the lights properly set up and shadow casters correctly loaded, we should have three-dimensional shadows!
Because the entities can hop elevations, the lights can be made to change their heights, and the actual light pass of the scene incorporates different heights of tile layers. Moving the lights around actually creates results in three-dimensional space, allowing the shadows to flow across walls, if at...