Exemple #1
0
			public void UpdateFromSource(IGamepadInputSource source)
			{
				this.IsAvailable = source != null ? source.IsAvailable : false;
				if (source == null) return;

				for (int i = 0; i < this.ButtonPressed.Length; i++)
				{
					this.ButtonPressed[i] = source[(GamepadButton)i];
				}
				for (int i = 0; i < this.AxisValue.Length; i++)
				{
					this.AxisValue[i] = source[(GamepadAxis)i];
				}
			}
Exemple #2
0
            public void UpdateFromSource(IGamepadInputSource source)
            {
                this.IsAvailable = source != null ? source.IsAvailable : false;
                if (source == null)
                {
                    return;
                }

                for (int i = 0; i < this.ButtonPressed.Length; i++)
                {
                    this.ButtonPressed[i] = source[(GamepadButton)i];
                }
                for (int i = 0; i < this.AxisValue.Length; i++)
                {
                    this.AxisValue[i] = source[(GamepadAxis)i];
                }
            }