TiledMap draw with color

Is there a way to call the draw method and pass in a color? I’m trying to create a day night cycle in my game.

Yeah, just have draw look like this:

Draw(SpriteBatch spriteBatch, Color passed_color)
{
draw using passed_color…
}

And then when you call draw, you will say Draw(spriteBatch, Color.Green);

The tiledmap and tiledlayer both don’t have a draw method that has color as a parameter though?

Cant you modify the class to include whatever Methods you want?

I dont know Extended, but its still C#…

You can have 2 methods of the same name, accepting different overloads…

@Wishouse88 Do you just want everything to be darker? You could just draw a translucent all black texture on top of everything.

I don’t believe there’s currently a way to do it with the Tiled map renderer.

However, we are currently are working on building a new renderer.

Could you please raise an issue on our github issues page and we’ll take a look at adding it for the next version.

I think @LithiumToast’s idea is a good workaround.

Simple and brilliant! Thanks!