private void DrawMapEvents_DrawMapLayer(object sender, DrawLayerEventArgs e) { if (e.PriorLayerID == "Back" && e.NewLayerID == "Buildings") { int i = 0; while (Game1.currentLocation.Map.Layers[i].Id != "Buildings") { if (Game1.currentLocation.Map.Layers[i].Id != "Back") { Game1.currentLocation.Map.Layers[i].Draw(Game1.mapDisplayDevice, Game1.viewport, Location.Origin, false, Game1.pixelZoom); } i++; } } }
internal static void OnDrawMapLayer(object sender, DrawLayerEventArgs e) { DrawMapEvents.DrawMapLayer?.Invoke(sender, e); }