protected PointerEventData GetTouchPointerEventData(Touch input, out bool pressed, out bool released)
{
PointerEventData data;
bool flag = this.GetPointerData(input.fingerId, out data, true);
data.Reset();
pressed = flag || (input.phase == TouchPhase.Began);
released = (input.phase == TouchPhase.Canceled) || (input.phase == TouchPhase.Ended);
if (flag)
{
data.position = input.position;
}
if (pressed)
{
data.delta = Vector2.zero;
}
else
{
data.delta = input.position - data.position;
}
data.position = input.position;
data.button = PointerEventData.InputButton.Left;
base.eventSystem.RaycastAll(data, base.m_RaycastResultCache);
RaycastResult result = BaseInputModule.FindFirstRaycast(base.m_RaycastResultCache);
data.pointerCurrentRaycast = result;
base.m_RaycastResultCache.Clear();
return data;
}