XNA - How do I change the texture of a 2D object?

Posted by Adorjan on Game Development See other posts from Game Development or by Adorjan
Published on 2012-04-15T19:23:50Z Indexed on 2012/04/15 23:47 UTC
Read the original article Hit count: 167

Filed under:
|
|
|
|

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!

© Game Development or respective owner

Related posts about XNA

Related posts about textures