public void Update()
{
bool lastIsTouched = isBeingTouched;
clearColor.Update();
int index = manager.Panels.IndexOf(this);
if (index != -1)
{
bool touchOccured = false;
int num = 0;
foreach (var touch in Global.Touches)
{
if (touch.Position.X > (Global.ScreenSize.X / manager.Panels.Count) * index
&& touch.Position.X < (Global.ScreenSize.X / manager.Panels.Count) * (index + 1)
&& (touch.State == TouchState.Moved || touch.State == TouchState.Touched)
)
{
touchOccured = true;
if (waitingForTimer && !idList.Contains(touch.Id))
{
idList.Add(touch.Id);
//Global.Output += "Added " + touch.Id + " to idList";
}
num++;
}
}
numFingers = num;
isBeingTouched = touchOccured;
}
if (isBeingTouched != lastIsTouched)
{
IsBeingTouchedChanged(isBeingTouched);
}
}
void IsBeingTouchedChanged(bool touched)