I'm currently working with C# with the XNA framework.
I'm trying to create a list of objects that are individually target-able after they are created and set in a list and displayed on a tile map.
For example, I have a blank tile map and I cycle through the tiles and randomly set objects (we'll say a box) throughout the map. When I set the box object, I add that new iteration of Box to a Box List.
At this point I have a tile map with a series of randomly placed boxes. Within these boxes I also have randomly picked values for their name, size, color etc. And these values are correctly stored within the box object in its respective index in the List.
My question is how do I go about setting up a method for targeting/selecting a box so that when I click on any given box it's respective data values appear? I'm not worried about graphical representation of the selected object but the retrieval of the objects specific data via a mouse click on its position.
I've set up Events to handle the changing of my game states, does this require the same methodology or something all together different?
Thanks for your time.