Sorry if the title doesnt match. I couldnt really think of what to write for the title.
I'm working on creating a bounding box or a matrix using array to detect the position of the user's finger. My idea of it is setting a bounding box made with array and detect whether the finger is within the range of the bounding box. Is there any way to go about it?
[SOLVED]
I figured out that was such a method called Rect.Contains. This did what I wanted.
var rect = Rect(x,y,width,height);
if(rect.Contains(touch)
{
}
The var rect creates a box and the if statement checks that if the touch is within the box.
However, I have a problem of putting it in ArrayList. It gives me the following error: The type 'System.Collections.ArrayList' does not have a visible constructor. I don't face this problem when I put in Array though.
Would be great if someone can explain why this error may have occured.