public void Unregister(IInputListener listener) { if (PointerDownCalls.Contains(listener)) { PointerDownCalls.Remove(listener); } if (PointerUpCalls.Contains(listener)) { PointerUpCalls.Remove(listener); } if (PointerMoveCalls.Contains(listener)) { PointerMoveCalls.Remove(listener); } if (PointerClickCalls.Contains(listener)) { PointerClickCalls.Remove(listener); } if (PointerDoubleClickCalls.Contains(listener)) { PointerDoubleClickCalls.Remove(listener); } if (PointerHoldStartCalls.Contains(listener)) { PointerHoldStartCalls.Remove(listener); } if (PointerHoldUpdateCalls.Contains(listener)) { PointerHoldUpdateCalls.Remove(listener); } if (PointerHoldEndCalls.Contains(listener)) { PointerHoldEndCalls.Remove(listener); } if (PointerSwipeStartCalls.Contains(listener)) { PointerSwipeStartCalls.Remove(listener); } if (PointerSwipeUpdateCalls.Contains(listener)) { PointerSwipeUpdateCalls.Remove(listener); } if (PointerSwipeEndCalls.Contains(listener)) { PointerSwipeEndCalls.Remove(listener); } }
public void RegisterForPointerEvent(IInputListener listener, ePointerEvent PointerEvent) { switch (PointerEvent) { case ePointerEvent.OnPointerDown: if (PointerDownCalls.Contains(listener)) { return; } PointerDownCalls.Add(listener); break; case ePointerEvent.OnPointerUp: if (PointerUpCalls.Contains(listener)) { return; } PointerUpCalls.Add(listener); break; case ePointerEvent.OnPointerMove: if (PointerMoveCalls.Contains(listener)) { return; } PointerMoveCalls.Add(listener); break; case ePointerEvent.OnPointerClick: if (PointerClickCalls.Contains(listener)) { return; } PointerClickCalls.Add(listener); break; case ePointerEvent.OnPointerDoubleClick: if (PointerDoubleClickCalls.Contains(listener)) { return; } PointerDoubleClickCalls.Add(listener); break; case ePointerEvent.OnPointerHoldStart: if (PointerHoldStartCalls.Contains(listener)) { return; } PointerHoldStartCalls.Add(listener); break; case ePointerEvent.OnPointerHoldUpdate: if (PointerHoldUpdateCalls.Contains(listener)) { return; } PointerHoldUpdateCalls.Add(listener); break; case ePointerEvent.OnPointerHoldEnd: if (PointerHoldEndCalls.Contains(listener)) { return; } PointerHoldEndCalls.Add(listener); break; case ePointerEvent.OnPointerSwipeStart: if (PointerSwipeStartCalls.Contains(listener)) { return; } PointerSwipeStartCalls.Add(listener); break; case ePointerEvent.OnPointerSwipeUpdate: if (PointerSwipeUpdateCalls.Contains(listener)) { return; } PointerSwipeUpdateCalls.Add(listener); break; case ePointerEvent.OnPointerSwipeEnd: if (PointerSwipeEndCalls.Contains(listener)) { return; } PointerSwipeEndCalls.Add(listener); break; } BootRegistrationCoroutine(); }
public void UnRegisterForPointerEvent(IInputListener listener, ePointerEvent PointerEvent) { switch (PointerEvent) { case ePointerEvent.OnPointerDown: if (PointerDownCalls.Contains(listener)) { PointerDownCalls.Remove(listener); } break; case ePointerEvent.OnPointerUp: if (PointerUpCalls.Contains(listener)) { PointerUpCalls.Remove(listener); } break; case ePointerEvent.OnPointerMove: if (PointerMoveCalls.Contains(listener)) { PointerMoveCalls.Remove(listener); } break; case ePointerEvent.OnPointerClick: if (PointerClickCalls.Contains(listener)) { PointerClickCalls.Remove(listener); } break; case ePointerEvent.OnPointerDoubleClick: if (PointerDoubleClickCalls.Contains(listener)) { PointerDoubleClickCalls.Remove(listener); } break; case ePointerEvent.OnPointerHoldStart: if (PointerHoldStartCalls.Contains(listener)) { PointerHoldStartCalls.Remove(listener); } break; case ePointerEvent.OnPointerHoldUpdate: if (PointerHoldUpdateCalls.Contains(listener)) { PointerHoldUpdateCalls.Remove(listener); } break; case ePointerEvent.OnPointerHoldEnd: if (PointerHoldEndCalls.Contains(listener)) { PointerHoldEndCalls.Remove(listener); } break; case ePointerEvent.OnPointerSwipeStart: if (PointerSwipeStartCalls.Contains(listener)) { PointerSwipeStartCalls.Remove(listener); } break; case ePointerEvent.OnPointerSwipeUpdate: if (PointerSwipeUpdateCalls.Contains(listener)) { PointerSwipeUpdateCalls.Remove(listener); } break; case ePointerEvent.OnPointerSwipeEnd: if (PointerSwipeEndCalls.Contains(listener)) { PointerSwipeEndCalls.Remove(listener); } break; } }