Example #1
0
    /// <summary>
    /// 设置添加一个事件功能
    /// </summary>
    /// <param name="_type"></param>
    /// <param name="_handle"></param>
    /// <param name="_params"></param>
    public void SetEventListener(E_TouchType _type, OnTouchHandle _handle, params object[] _params)
    {
        TouchHandle handle = GetHandle(_type);

        if (handle == null)
        {
            handle = new TouchHandle();
            dicHandles.Add(_type, handle);
        }

        dicHandles[_type].TouchType = _type;
        dicHandles[_type].SetHandle(_handle, _params);
    }
Example #2
0
 static public void RemoveClickListener(OnTouchHandle handle)
 {
     Instance.RemoveClickHandle(handle);
 }
Example #3
0
 /// <summary>
 /// 移除鼠标结束事件监听
 /// </summary>
 /// <param name="handle"></param>
 static public void RemoveTouchEndListener(OnTouchHandle handle)
 {
     Instance.RemoveTouchEndHandle(handle);
 }
Example #4
0
 static public void AddClickListener(OnTouchHandle handle)
 {
     Instance.AddClickHandle(handle);
 }
Example #5
0
 /// <summary>
 /// 添加鼠标离开事件监听
 /// </summary>
 /// <param name="handle"></param>
 static public void AddTouchEndListener(OnTouchHandle handle)
 {
     Instance.AddTouchEndHandle(handle);
 }
Example #6
0
 /// <summary>
 /// 移除鼠标开始事件监听
 /// </summary>
 /// <param name="handle"></param>
 static public void RemoveTouchBeginListener(OnTouchHandle handle)
 {
     Instance.RemoveTouchBeginHandle(handle);
 }
Example #7
0
 /// <summary>
 /// 添加鼠标开始事件监听
 /// </summary>
 /// <param name="handle"></param>
 static public void AddTouchBeginListener(OnTouchHandle handle)
 {
     Instance.AddTouchBeginHandle(handle);
 }
Example #8
0
 private void AddTouchMoveHandle(OnTouchHandle handle)
 {
     touchMoveHandle += handle;
 }
Example #9
0
 private void AddClickHandle(OnTouchHandle handle)
 {
     clickHandle += handle;
 }
Example #10
0
 private void RemoveClickHandle(OnTouchHandle handle)
 {
     clickHandle -= handle;
 }
Example #11
0
 private void RemoveTouchEndHandle(OnTouchHandle handle)
 {
     touchEndHandle -= handle;
 }
Example #12
0
 private void RemoveTouchBeginHandle(OnTouchHandle handle)
 {
     touchBeginHandle -= handle;
 }
Example #13
0
 private void AddTouchEndHandle(OnTouchHandle handle)
 {
     touchEndHandle += handle;
 }
Example #14
0
 public TouchHandle(OnTouchHandle _handle, params object[] _params)
 {
     eventHandle += _handle;
     handParams   = _params;
 }
Example #15
0
 /// <summary>
 /// 添加鼠标移动事件监听
 /// </summary>
 /// <param name="handle"></param>
 static public void AddTouchMoveListener(OnTouchHandle handle)
 {
     Instance.AddTouchMoveHandle(handle);
 }
Example #16
0
 /// <summary>
 /// 设置数据,注意会清除之前设置的信息
 /// </summary>
 /// <param name="_handle"></param>
 /// <param name="_params"></param>
 public void SetHandle(OnTouchHandle _handle, params object[] _params)
 {
     DestoryHandle();
     eventHandle += _handle;
     handParams   = _params;
 }
Example #17
0
 private void AddTouchBeginHandle(OnTouchHandle handle)
 {
     touchBeginHandle += handle;
 }