Implement TS-style terrain lighting.

This commit is contained in:
Paul Chote
2020-07-10 12:46:45 +01:00
committed by abcdefg30
parent fdb66c769c
commit 01e955ca37
11 changed files with 300 additions and 14 deletions

View File

@@ -28,6 +28,7 @@ namespace OpenRA.Graphics
public readonly World World;
public readonly Theater Theater;
public Viewport Viewport { get; private set; }
public readonly ITerrainLighting TerrainLighting;
public event Action PaletteInvalidated = null;
@@ -68,6 +69,7 @@ namespace OpenRA.Graphics
palette.Initialize();
Theater = new Theater(world.Map.Rules.TileSet);
TerrainLighting = world.WorldActor.TraitOrDefault<ITerrainLighting>();
terrainRenderer = world.WorldActor.TraitOrDefault<IRenderTerrain>();
debugVis = Exts.Lazy(() => world.WorldActor.TraitOrDefault<DebugVisualizations>());