public Chunk(Point loc, WorldBase world) { if (chunkRenderBatch == null) { chunkRenderBatch = new SpriteBatch(Game1.instance.GraphicsDevice); } this.location = loc; this.world = world; tiles = new TileType[tilesPerChunk, tilesPerChunk]; backgroundTiles = new TileType[tilesPerChunk, tilesPerChunk]; needsReDraw = true; needsReBuildCollisions = true; collisionBoxes = new List <Rectangle>(); collisionBoxWorkBuffer = new List <Rectangle>(); totalBox = new Rectangle(location.X * tilesPerChunk * tileDrawWidth, location.Y * tilesPerChunk * tileDrawWidth, tilesPerChunk * tileDrawWidth, tilesPerChunk * tileDrawWidth); tileBox = new Rectangle(location.X * tilesPerChunk, location.Y * tilesPerChunk, tilesPerChunk, tilesPerChunk); trees = new List <AnimatedTree>(); }
public ChunkMultithreadingHelper(Point point, List <Chunk> deQueue, WorldBase world) { this.deQueue = deQueue; this.point = point; this.world = world; }