2D Toolkit Forum
2D Toolkit => Support => Topic started by: Highstorm on January 05, 2015, 02:32:52 am
-
Hi. In the TileMap editor, I would like to be able to adjust the color tint of my selected sprites, before I paint them. This is different from the in-built "Color Channel" feature of the editor as it would be directly modifying the "Color" attribute of the Tk2dSprite on a tile-by-tile basis.
I've searched the forum for a similar request, but came up empty handed. So I've been digging through the editor code, trying to find where I could splice it in myself, but I'm having trouble finding where exactly I can get access to this property.
If someone could point me in the right direction, I would greatly appreciate it.
-
There isn't a tk2dSprite for each tile, everything is merged into the larger partition system. You could, I suppose change the tilemap colors so they aren't interpolated - that way, the tiles would use a solid color each. tk2dTileMapMeshBuilder.cs, BuildForChunk is where this happens, look for
Color color = Color.Lerp(
Color.Lerp(tileColorx0y0, tileColorx1y0, tileColorX),
Color.Lerp(tileColorx0y1, tileColorx1y1, tileColorX),
tileColorY);
You can also change it so painting a tile down will paint a color down at those positions as well, if you wanted to take it further.
-
Ah, I see. Thank you for the quick reply!