private void updateUpdated(List<int> points)
{
var updatedCount = points.Count;
var list = touchPointListPool.Get();
// Need to loop through all touches to reset those which did not move
var count = touches.Count;
for (var i = 0; i < count; i++)
{
touches[i].INTERNAL_ResetPosition();
}
for (var i = 0; i < updatedCount; i++)
{
var id = points[i];
TouchPoint touch;
if (!idToTouch.TryGetValue(id, out touch))
{
#if TOUCHSCRIPT_DEBUG
Debug.LogWarning("TouchScript > Id [" + id +
"] was in UPDATED list but no touch with such id found.");
#endif
continue;
}
list.Add(touch);
if (touch.Layer != null) touch.Layer.INTERNAL_UpdateTouch(touch);
#if TOUCHSCRIPT_DEBUG
addDebugFigureForTouch(touch);
#endif
}
if (touchesMovedInvoker != null)
touchesMovedInvoker.InvokeHandleExceptions(this, TouchEventArgs.GetCachedEventArgs(list));
touchPointListPool.Release(list);
}