public LODTerrain(GameSession.GameSession RunningGameSession, int mapNumCellsPerRow, int mapNumCellPerColumn, Effect effect, GraphicsDevice device, GameSession.GameStorage storage) { this.RunningGameSession = RunningGameSession; playerLight = new PPPointLight(new Vector3(0, 0, 0), Color.White * 0.50f, 100); this.playerCamera = this.RunningGameSession.PlayerCamera; modelEffect = this.RunningGameSession.Content.Load <Effect>("PrelightEffects"); CreateNewMap(mapNumCellsPerRow, mapNumCellPerColumn, device, storage); prelightRender = new PrelightingRenderer(this.RunningGameSession, effect, device, entities); this.Initialize(); }
public WorldMap(Game1 game, int mapNumCellsPerRow, int mapNumCellPerColumn, Effect effect, GraphicsDevice device) : base(game) { playerLight = new PPPointLight(new Vector3(0, 0, 0), Color.White * 0.50f, 100); this.playerCamera = game.PlayerCamera; modelEffect = game.Content.Load <Effect>("PrelightEffects"); this.textureSize = 512; if (LoadMap(@"c:\temp\map.dat") != true) { CreateNewMap(mapNumCellsPerRow, mapNumCellPerColumn); } prelightRender = new PrelightingRenderer(game, effect, device, entities); prelightRender.Lights.Add(playerLight); this.Initialize(); }