I have looked online for custom events and have been a little confused by the example code. Many of them seem to set to set the event as the changing of a variable. This is a one time event. But what if you want to check for an event that could be true at any time?
I have a custom texture class that has a boolean function isClicked that returns true if the the texture has been clicked onscreen. I am using this in XNA so I constantly check if this this function returns true or not. But is there any way to create an event handler that will run a function when this has been clicked without constantly polling the function. If I have multiple textures onscreen this could affect performance so I would like to know if I can have an event handler that will fire without always running the the isClicked function? I doubt this is possible but just wanted to test the waters.....