コード例 #1
0
 /**
  * Retrieves a copy of the internal gamepadvalues structure used in decoding signals.
  * This can be used to retrieve signals not readily available through the Gamepad API (such as vendor specific signals or VID/PID).
  * To use this function, first create a gamepadValues instance and pass by reference.
  * <pre>{@code
  *      GamepadValues values = new GamepadValues(); // Create only once and use functiont to update it periodically.
  *      ...
  *      gamepad.GetAllValues(gamepadValues); // Get latest values
  * }</pre>
  * @param gamepadValues reference to update with latest values.
  * @return object reference to gamepadValues for function chaining.
  */
 public GameControllerValues GetAllValues(ref GameControllerValues gamepadValues)
 {
     /* get latest copy if there is new data */
     _provider.Get(ref _values, _index);
     /* copy it to caller */
     gamepadValues.Copy(_values);
     return(gamepadValues);
 }
コード例 #2
0
 public void Copy(GameControllerValues rhs)
 {
     axes[0] = rhs.axes[0];
     axes[1] = rhs.axes[1];
     axes[2] = rhs.axes[2];
     axes[3] = rhs.axes[3];
     axes[4] = rhs.axes[4];
     axes[5] = rhs.axes[5];
     btns    = rhs.btns;
     //btnChanges = rhs.btnChanges;
     //btnsLast = rhs.btnsLast;
     pov         = rhs.pov;
     vid         = rhs.vid;
     pid         = rhs.pid;
     vendorSpecI = rhs.vendorSpecI;
     vendorSpecF = rhs.vendorSpecF;
     flagBits    = rhs.flagBits;
     /* leave commands alone */
 }
コード例 #3
0
 public GameControllerValues(GameControllerValues rhs)
 {
     Copy(rhs);
 }