private static void SendEvents(int i, SendMouseEvents.HitInfo hit) { bool mouseButtonDown = Input.GetMouseButtonDown(0); bool mouseButton = Input.GetMouseButton(0); if (mouseButtonDown) { if (hit) { SendMouseEvents.m_MouseDownHit[i] = hit; SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseDown"); } } else { if (!mouseButton) { if (SendMouseEvents.m_MouseDownHit[i]) { if (SendMouseEvents.HitInfo.Compare(hit, SendMouseEvents.m_MouseDownHit[i])) { SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseUpAsButton"); } SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseUp"); SendMouseEvents.m_MouseDownHit[i] = default(SendMouseEvents.HitInfo); } } else { if (SendMouseEvents.m_MouseDownHit[i]) { SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseDrag"); } } } if (SendMouseEvents.HitInfo.Compare(hit, SendMouseEvents.m_LastHit[i])) { if (hit) { hit.SendMessage("OnMouseOver"); } } else { if (SendMouseEvents.m_LastHit[i]) { SendMouseEvents.m_LastHit[i].SendMessage("OnMouseExit"); } if (hit) { hit.SendMessage("OnMouseEnter"); hit.SendMessage("OnMouseOver"); } } SendMouseEvents.m_LastHit[i] = hit; }
private static void SendEvents(int i, SendMouseEvents.HitInfo hit) { bool mouseButtonDown = Input.GetMouseButtonDown(0); bool mouseButton = Input.GetMouseButton(0); bool flag = mouseButtonDown; if (flag) { bool flag2 = hit; if (flag2) { SendMouseEvents.m_MouseDownHit[i] = hit; SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseDown"); } } else { bool flag3 = !mouseButton; if (flag3) { bool flag4 = SendMouseEvents.m_MouseDownHit[i]; if (flag4) { bool flag5 = SendMouseEvents.HitInfo.Compare(hit, SendMouseEvents.m_MouseDownHit[i]); if (flag5) { SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseUpAsButton"); } SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseUp"); SendMouseEvents.m_MouseDownHit[i] = default(SendMouseEvents.HitInfo); } } else { bool flag6 = SendMouseEvents.m_MouseDownHit[i]; if (flag6) { SendMouseEvents.m_MouseDownHit[i].SendMessage("OnMouseDrag"); } } } bool flag7 = SendMouseEvents.HitInfo.Compare(hit, SendMouseEvents.m_LastHit[i]); if (flag7) { bool flag8 = hit; if (flag8) { hit.SendMessage("OnMouseOver"); } } else { bool flag9 = SendMouseEvents.m_LastHit[i]; if (flag9) { SendMouseEvents.m_LastHit[i].SendMessage("OnMouseExit"); } bool flag10 = hit; if (flag10) { hit.SendMessage("OnMouseEnter"); hit.SendMessage("OnMouseOver"); } } SendMouseEvents.m_LastHit[i] = hit; }