/// <summary> /// This method creates a list of rectangles 'shadowHandlers' which holds /// all the walls that should display shadows. /// </summary> public void initShadowHandlers() { for (int y = 0; y < Room.ROOM_HEIGHT; y++) { for (int x = 0; x < Room.ROOM_WIDTH; x++) { int design = roomDesign[x, y]; if (shadowHandlerTiles.Contains(design)) { Vector2 position = new Vector2(x * TILE_SIZE, y * TILE_SIZE); Texture2D supposedTileTexture; supposedTileTexture = tileTexture; ShadowHandler shadowHandler = new ShadowHandler(shadowTexture, playerReference, position, supposedTileTexture); shadowHandlers.Add(shadowHandler); } } } }