I am developing a 2D (No 3D in every aspect) Windows Phone 8 turn based tactical games for my college project. I use Monogame.
I want to draw an object similar to Button in windows form, that if the object is tapped / touched, then an event / method started. I am looking for a way to create a similar event like "OnClick" attached on an object, so I know which tile is tapped by the user specifically.
The object is not entirely visible, because I used an empty transparent texture2D (In case you wondered)
(Please feel free to ask anything if my question is not clear enough, and sorry for my jumbled language, if any.)
FURTHER EXPLANATION : In front of every sprite, I want to draw a "transparent object" that can run an event when tapped (so it appear like user tapped the character, but behind-code-ly, the "transparent object" which is tapped, because it the one that can receive tap input).
Why I need this kind of object, because if I get the tapped coordinate, the coordinate fetched is relatively based on the viewport, once the map bigger, then it's so hard to calculate the tapped thing. But with the "transparent object", wherever the tile is, I can get which tile is tapped precisely.
I think this also an attempt to make my code as detached as possible by dividing each action into a separate class.