internal void INTERNAL_EndTouch(int id)
{
lock (touchLock)
{
TouchPoint touch;
if (!idToTouch.TryGetValue(id, out touch))
{
// This touch was added this frame
touch = touchesBegan.Find((t) => t.Id == id);
// No touch with such id
if (touch == null)
{
#if TOUCHSCRIPT_DEBUG
Debug.LogWarning("TouchScript > Touch with id [" + id +
"] is requested to END but no touch with such id found.");
#endif
return;
}
}
if (!touchesEnded.Contains(id)) touchesEnded.Add(id);
#if TOUCHSCRIPT_DEBUG
else
Debug.LogWarning("TouchScript > Touch with id [" + id +
"] is requested to END more than once this frame.");
#endif
}
}