Example #1
0
    /// <summary>
    /// 按下
    /// </summary>
    /// <param name="go"></param>
    /// <param name="function"></param>
    /// <param name="mouseInput"></param>
    public static void SetDown(this GameObject go, RainierEventTriggerListener.VoidDelegate function, PointerEventData.InputButton mouseInput = PointerEventData.InputButton.Left)
    {
        switch (mouseInput)
        {
        case PointerEventData.InputButton.Left:
            RainierEventTriggerListener.Get(go).onDownLeft = function;
            break;

        case PointerEventData.InputButton.Right:
            RainierEventTriggerListener.Get(go).onDownRight = function;
            break;

        case PointerEventData.InputButton.Middle:
            RainierEventTriggerListener.Get(go).onDownMiddle = function;
            break;

        default:
            break;
        }
    }
Example #2
0
    /// <summary>
    /// 结束拖拽
    /// </summary>
    /// <param name="go"></param>
    /// <param name="function"></param>
    /// <param name="mouseInput"></param>
    public static void AddEndDrag(this GameObject go, RainierEventTriggerListener.VoidDelegate function, PointerEventData.InputButton mouseInput = PointerEventData.InputButton.Left)
    {
        switch (mouseInput)
        {
        case PointerEventData.InputButton.Left:
            RainierEventTriggerListener.Get(go).onEndDragLeft += function;
            break;

        case PointerEventData.InputButton.Right:
            RainierEventTriggerListener.Get(go).onEndDragRight += function;
            break;

        case PointerEventData.InputButton.Middle:
            RainierEventTriggerListener.Get(go).onEndDragMiddle += function;
            break;

        default:
            break;
        }
    }
Example #3
0
 /// <summary>
 /// 当物体被选择时键盘取消
 /// </summary>
 /// <param name="go"></param>
 /// <param name="function"></param>
 public static void AddCancel(this GameObject go, RainierEventTriggerListener.VoidDelegate function)
 {
     RainierEventTriggerListener.Get(go).onCancel += function;
 }
Example #4
0
 /// <summary>
 /// 当物体被选择(每帧)
 /// </summary>
 /// <param name="go"></param>
 /// <param name="function"></param>
 public static void AddUpdateselect(this GameObject go, RainierEventTriggerListener.VoidDelegate function)
 {
     RainierEventTriggerListener.Get(go).onUpdateselect += function;
 }
Example #5
0
 /// <summary>
 /// 当物体被选择时键盘提交
 /// </summary>
 /// <param name="go"></param>
 /// <param name="function"></param>
 public static void SetSumit(this GameObject go, RainierEventTriggerListener.VoidDelegate function)
 {
     RainierEventTriggerListener.Get(go).onSumit = function;
 }