Defines a collection of JoystickButtons.
示例#1
0
 internal JoystickDevice(int id, int axes, int buttons)
 {
     if (axes < 0)
     throw new ArgumentOutOfRangeException("axes");
       if (buttons < 0)
     throw new ArgumentOutOfRangeException("buttons");
       this.Id = id;
       this.axis_collection = new JoystickAxisCollection(axes);
       this.button_collection = new JoystickButtonCollection(buttons);
 }
示例#2
0
 internal JoystickDevice(int id, int axes, int buttons)
 {
     if (axes < 0)
     {
         throw new ArgumentOutOfRangeException("axes");
     }
     if (buttons < 0)
     {
         throw new ArgumentOutOfRangeException("buttons");
     }
     Id = id;
     axis_collection   = new JoystickAxisCollection(axes);
     button_collection = new JoystickButtonCollection(buttons);
 }
示例#3
0
        internal JoystickDevice(int id, int axes, int buttons)
        {
            if (axes < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(axes));
            }

            if (buttons < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(buttons));
            }

            Id     = id;
            Axis   = new JoystickAxisCollection(axes);
            Button = new JoystickButtonCollection(buttons);
        }