public MapRenderer( Game game ) { this.game = game; _1Dcount = game.TerrainAtlas1D.TexIds.Length; builder = new ChunkMeshBuilder( game ); api = game.Graphics; elementsPerBitmap = game.TerrainAtlas1D.elementsPerBitmap; info = game.BlockInfo; game.Events.TerrainAtlasChanged += TerrainAtlasChanged; game.Events.OnNewMap += OnNewMap; game.Events.OnNewMapLoaded += OnNewMapLoaded; game.Events.EnvVariableChanged += EnvVariableChanged; }
public MapRenderer(Game game) { this.game = game; _1DUsed = game.TerrainAtlas1D.CalcMaxUsedRow(game.TerrainAtlas, game.BlockInfo); RecalcBooleans(true); builder = new ChunkMeshBuilder(game); api = game.Graphics; elementsPerBitmap = game.TerrainAtlas1D.elementsPerBitmap; info = game.BlockInfo; game.Events.TerrainAtlasChanged += TerrainAtlasChanged; game.MapEvents.OnNewMap += OnNewMap; game.MapEvents.OnNewMapLoaded += OnNewMapLoaded; game.MapEvents.EnvVariableChanged += EnvVariableChanged; game.Events.BlockDefinitionChanged += BlockDefinitionChanged; game.Events.ViewDistanceChanged += ViewDistanceChanged; }