public void RemoveEventHandle(TouchHandle _handle) { if (null == _handle) { _handle.DestoryEventHandle(); _handle = null; } }
/// <summary> /// Sets the event handler. /// </summary> /// <param name="_touchType">Touch type.</param> /// <param name="_handle">Handle.</param> /// <param name="_params">Parameters.</param> public void SetTouchEventHandle(EnumEventTouchType _touchType, OnTouchEventHandle _handle, params object[] _params) { switch (_touchType) { case EnumEventTouchType.OnClick: if (null == onClick) { onClick = new TouchHandle(); } onClick.SetEventHandle(_handle, _params); break; case EnumEventTouchType.OnDrag: if (null == onDrag) { onDrag = new TouchHandle(); } onDrag.SetEventHandle(_handle, _params); break; case EnumEventTouchType.OnDrop: if (null == onDrop) { onDrop = new TouchHandle(); } onDrop.SetEventHandle(_handle, _params); break; case EnumEventTouchType.TouchDown: if (null == onDown) { onDown = new TouchHandle(); } onDown.SetEventHandle(_handle, _params); break; case EnumEventTouchType.TouchUp: if (null == onUp) { onUp = new TouchHandle(); } onUp.SetEventHandle(_handle, _params); break; default: break; } }