예제 #1
0
        // ------------------
        public JoystickStateBinding(InputBindingBase parent = null) : base(parent)
        {
            this.enabled = false;

            this.horzAxisBinding = new AxisBinding(this);
            this.vertAxisBinding = new AxisBinding(this);

            this.dirBinding = new DirectionBinding(this);
        }
        // ------------------
        public TouchGestureStateBinding(InputBindingBase parent = null) : base(parent)
        {
            this.enabled = false;

            this.rawPressBinding    = new DigitalBinding(this);
            this.longPressBinding   = new DigitalBinding(this);
            this.normalPressBinding = new DigitalBinding(this);
            //this.releasedBinding	= new DigitalBinding(this);
            this.tapBinding       = new DigitalBinding(this);
            this.doubleTapBinding = new DigitalBinding(this);
            this.longTapBinding   = new DigitalBinding(this);



            this.normalPressSwipeHorzAxisBinding = new AxisBinding(this);
            this.normalPressSwipeVertAxisBinding = new AxisBinding(this);
            this.longPressSwipeHorzAxisBinding   = new AxisBinding(this);
            this.longPressSwipeVertAxisBinding   = new AxisBinding(this);

            this.normalPressScrollHorzBinding = new ScrollDeltaBinding(this);
            this.normalPressScrollVertBinding = new ScrollDeltaBinding(this);
            this.longPressScrollHorzBinding   = new ScrollDeltaBinding(this);
            this.longPressScrollVertBinding   = new ScrollDeltaBinding(this);


            this.rawPressEmuTouchBinding    = new EmuTouchBinding(this);
            this.normalPressEmuTouchBinding = new EmuTouchBinding(this);
            this.longPressEmuTouchBinding   = new EmuTouchBinding(this);

            this.rawPressMousePosBinding         = new MousePositionBinding(10, false, this);
            this.normalPressMousePosBinding      = new MousePositionBinding(20, false, this);
            this.longPressMousePosBinding        = new MousePositionBinding(20, false, this);
            this.tapMousePosBinding              = new MousePositionBinding(30, false, this);
            this.doubleTapMousePosBinding        = new MousePositionBinding(30, false, this);
            this.longTapMousePosBinding          = new MousePositionBinding(30, false, this);
            this.normalPressSwipeMousePosBinding = new MousePositionBinding(20, false, this);
            this.longPressSwipeMousePosBinding   = new MousePositionBinding(20, false, this);


            this.normalPressSwipeDirBinding = new DirectionBinding(this);
            this.longPressSwipeDirBinding   = new DirectionBinding(this);

            this.normalPressSwipeJoyBinding = new JoystickStateBinding(this);
            this.longPressSwipeJoyBinding   = new JoystickStateBinding(this);
        }
예제 #3
0
        // --------------------
        public void CopyFrom(DirectionBinding b)
        {
            if (this.enabled = b.enabled)
            {
                this.Enable();

                this.bindDiagonals = b.bindDiagonals;
                this.bindMode      = b.bindMode;

                this.dirBindingN.CopyFrom(b.dirBindingN);
                this.dirBindingAny.CopyFrom(b.dirBindingAny);
                this.dirBindingU.CopyFrom(b.dirBindingU);
                this.dirBindingUR.CopyFrom(b.dirBindingUR);
                this.dirBindingR.CopyFrom(b.dirBindingR);
                this.dirBindingDR.CopyFrom(b.dirBindingDR);
                this.dirBindingD.CopyFrom(b.dirBindingD);
                this.dirBindingDL.CopyFrom(b.dirBindingDL);
                this.dirBindingD.CopyFrom(b.dirBindingL);
                this.dirBindingUL.CopyFrom(b.dirBindingUL);
            }
        }