XNA - How do I change the texture of a 2D object?
- by Adorjan
I am on to make a table game, I successfully figured out how to make the arraw and to move the cursor on it (by tiles). Now I wanna find out how to make that if I hit the Enter key the tile's texture change to another.
I tryed like this:
if (input.KeyPressed(Keys.Enter))
{
cell[X,Y].Cell_texture = tile_texture;
}
but it doesn't really work.
Hope you can help. :)
Thanks!