Пример #1
0
            public void UpdateFromSource(IJoystickInputSource 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.ButtonPressed(i);
                }

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

                for (int i = 0; i < this.HatPosition.Length; i++)
                {
                    this.HatPosition[i] = source.HatPosition(i);
                }
            }