/// <summary> /// 与虚拟按键绑定 /// </summary> /// <param name="button"></param> public virtual void ConnectWith(IVirtualButton button) { if (button == null) { return; } _virtualButton = button; _incompatibleWithRealButton = _virtualButton.IncompatibleWithRealButton; button.IsConnectedWithButton = true; button.ConnectedWith = this; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualButtonBinding" /> class. /// </summary> /// <param name="name">The name.</param> /// <param name="button">The button.</param> public VirtualButtonBinding(object name, IVirtualButton button = null) { Name = name; Button = button; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualButtonTwoWay" /> class. /// </summary> /// <param name="negativeButton">The negative button.</param> /// <param name="positiveButton">The positive button.</param> public VirtualButtonTwoWay(IVirtualButton negativeButton, IVirtualButton positiveButton) { NegativeButton = negativeButton; PositiveButton = positiveButton; }
public VirtualButtonBindingExt( object name, IVirtualButton button, params IVirtualButtonValueTransform[] transforms) : base(name, button) { _transforms = transforms; }
/// <summary> /// 解除与虚拟按键的绑定 /// </summary> public virtual void Disconnect() { _virtualButton = null; _incompatibleWithRealButton = false; }
public VirtualJoystick(IVirtualButton joystick, float deadZone = 0f) { this.joystick = joystick; this.deadZone = deadZone; }
public VirtualMouseAxis(IVirtualButton mouseAxis, bool negative = false, float mouseSensitivity = 100f) { this.mouseAxis = mouseAxis; this.mouseSensitivity = mouseSensitivity; this.negative = negative; }