public void Reset(int actID)
 {
     this.actionID   = actID;
     this.evt        = INPUT_INFO.INPUT_EVENT.NO_CHANGE;
     this.active     = false;
     this.devicePos  = Vector3.zero;
     this.origPos    = Vector3.zero;
     this.inputDelta = Vector3.zero;
     this.isTap      = true;
     this.isGesture  = false;
     this.clickTime  = 0f;
     this.isDrag     = false;
 }
 public void Reuse(INPUT_INFO ptr)
 {
     this.evt        = ptr.evt;
     this.actionID   = ptr.actionID;
     this.active     = ptr.active;
     this.devicePos  = ptr.devicePos;
     this.origPos    = ptr.origPos;
     this.inputDelta = ptr.inputDelta;
     this.isTap      = ptr.isTap;
     this.isGesture  = ptr.isGesture;
     this.clickTime  = ptr.clickTime;
     this.isDrag     = ptr.isDrag;
 }
Exemple #3
0
    public override bool Update(INPUT_INFO curInput)
    {
        if (!this.PreCheckUpdate())
        {
            return(false);
        }
        base.ExcuteKeyInputDelegate();
        INPUT_INFO.INPUT_EVENT evt = curInput.evt;
        switch (evt)
        {
        case INPUT_INFO.INPUT_EVENT.NO_CHANGE:
            if (!CharMoveCommandLayer.bDragMove)
            {
                this.NoChangeMove();
            }
            return(false);

        case INPUT_INFO.INPUT_EVENT.PRESS:
            return(false);

        case INPUT_INFO.INPUT_EVENT.DOUBLE_PRESS:
        case INPUT_INFO.INPUT_EVENT.RELEASE:
            return(false);

        case INPUT_INFO.INPUT_EVENT.MIDDLE_PRESS:
        case INPUT_INFO.INPUT_EVENT.RIGHT_PRESS:
        case INPUT_INFO.INPUT_EVENT.HOLD_PRESS:
        case INPUT_INFO.INPUT_EVENT.RIGHT_RELEASE:
IL_49:
            switch (evt)
            {
            }
            return(false);

        case INPUT_INFO.INPUT_EVENT.BOTH_PRESS:
            if (!TsPlatform.IsMobile)
            {
                this.BothCharMove();
            }
            return(false);

        case INPUT_INFO.INPUT_EVENT.TAP:
            this.TabCharMove();
            return(false);
        }
        goto IL_49;
    }