internal WorldRenderer(ModData modData, World world) { World = world; TileSize = World.Map.Grid.TileSize; TileScale = World.Map.Grid.Type == MapGridType.RectangularIsometric ? 1448 : 1024; Viewport = new Viewport(this, world.Map); createPaletteReference = CreatePaletteReference; var mapGrid = modData.Manifest.Get <MapGrid>(); enableDepthBuffer = mapGrid.EnableDepthBuffer; foreach (var pal in world.TraitDict.ActorsWithTrait <ILoadsPalettes>()) { pal.Trait.LoadPalettes(this); } foreach (var p in world.Players) { UpdatePalettesForPlayer(p.InternalName, p.Color, false); } palette.Initialize(); Theater = new Theater(world.Map.Rules.TileSet); terrainRenderer = new TerrainRenderer(world, this); debugVis = Exts.Lazy(() => world.WorldActor.TraitOrDefault <DebugVisualizations>()); }
internal WorldRenderer(ModData modData, World world) { World = world; TileSize = World.Map.Grid.TileSize; Viewport = new Viewport(this, world.Map); createPaletteReference = CreatePaletteReference; var mapGrid = modData.Manifest.Get <MapGrid>(); enableDepthBuffer = mapGrid.EnableDepthBuffer; foreach (var pal in world.TraitDict.ActorsWithTrait <ILoadsPalettes>()) { pal.Trait.LoadPalettes(this); } foreach (var p in world.Players) { UpdatePalettesForPlayer(p.InternalName, p.Color, false); } palette.Initialize(); Theater = new Theater(world.Map.Rules.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Exts.Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait <DeveloperMode>() : null); }
internal WorldRenderer(World world) { this.world = world; this.palette = Game.modData.Palette; foreach (var pal in world.traitDict.ActorsWithTraitMultiple <IPalette>(world)) { pal.Trait.InitPalette(this); } terrainRenderer = new TerrainRenderer(world, this); shroudRenderer = new ShroudRenderer(world); }
internal WorldRenderer(World world) { this.world = world; palette = new HardwarePalette(); palettes = new Cache <string, PaletteReference>(CreatePaletteReference); foreach (var pal in world.traitDict.ActorsWithTraitMultiple <IPalette>(world)) { pal.Trait.InitPalette(this); } palette.Initialize(); terrainRenderer = new TerrainRenderer(world, this); shroudRenderer = new ShroudRenderer(world); }
internal WorldRenderer(World world) { this.world = world; Viewport = new Viewport(this, world.Map); palette = new HardwarePalette(); palettes = new Dictionary<string, PaletteReference>(); foreach (var pal in world.traitDict.ActorsWithTrait<ILoadsPalettes>()) pal.Trait.LoadPalettes(this); palette.Initialize(); Theater = new Theater(world.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Exts.Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait<DeveloperMode>() : null); }
internal WorldRenderer(World world) { this.world = world; Viewport = new Viewport(this, world.Map); palette = new HardwarePalette(); palettes = new Cache<string, PaletteReference>(CreatePaletteReference); foreach (var pal in world.traitDict.ActorsWithTraitMultiple<IPalette>(world)) pal.Trait.InitPalette(this); palette.Initialize(); Theater = new Theater(world.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Lazy.New(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait<DeveloperMode>() : null); }
internal WorldRenderer(World world) { this.world = world; Viewport = new Viewport(this, world.Map); palette = new HardwarePalette(); palettes = new Dictionary <string, PaletteReference>(); foreach (var pal in world.traitDict.ActorsWithTrait <ILoadsPalettes>()) { pal.Trait.LoadPalettes(this); } palette.Initialize(); Theater = new Theater(world.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Exts.Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait <DeveloperMode>() : null); }
internal WorldRenderer(World world) { this.world = world; Viewport = new Viewport(this, world.Map); palette = new HardwarePalette(); palettes = new Cache <string, PaletteReference>(CreatePaletteReference); foreach (var pal in world.traitDict.ActorsWithTraitMultiple <IPalette>(world)) { pal.Trait.InitPalette(this); } palette.Initialize(); Theater = new Theater(world.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Lazy.New(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait <DeveloperMode>() : null); }
internal WorldRenderer(World world) { World = world; Viewport = new Viewport(this, world.Map); createPaletteReference = CreatePaletteReference; foreach (var pal in world.TraitDict.ActorsWithTrait<ILoadsPalettes>()) pal.Trait.LoadPalettes(this); foreach (var p in world.Players) UpdatePalettesForPlayer(p.InternalName, p.Color, false); palette.Initialize(); Theater = new Theater(world.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Exts.Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait<DeveloperMode>() : null); }
internal WorldRenderer(World world) { World = world; Viewport = new Viewport(this, world.Map); createPaletteReference = CreatePaletteReference; foreach (var pal in world.TraitDict.ActorsWithTrait <ILoadsPalettes>()) { pal.Trait.LoadPalettes(this); } foreach (var p in world.Players) { UpdatePalettesForPlayer(p.InternalName, p.Color, false); } palette.Initialize(); Theater = new Theater(world.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Exts.Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait <DeveloperMode>() : null); }
internal WorldRenderer(ModData modData, World world) { World = world; TileSize = World.Map.Grid.TileSize; Viewport = new Viewport(this, world.Map); createPaletteReference = CreatePaletteReference; var mapGrid = modData.Manifest.Get<MapGrid>(); enableDepthBuffer = mapGrid.EnableDepthBuffer; foreach (var pal in world.TraitDict.ActorsWithTrait<ILoadsPalettes>()) pal.Trait.LoadPalettes(this); foreach (var p in world.Players) UpdatePalettesForPlayer(p.InternalName, p.Color, false); palette.Initialize(); Theater = new Theater(world.Map.Rules.TileSet); terrainRenderer = new TerrainRenderer(world, this); devTrait = Exts.Lazy(() => world.LocalPlayer != null ? world.LocalPlayer.PlayerActor.Trait<DeveloperMode>() : null); }