Пример #1
0
    /// <summary>
    /// Based on the choice of the given device, select an appropriate control scheme.
    /// </summary>
    /// <param name="device"></param>
    /// <returns></returns>
    /// <remarks>
    /// The chosen control scheme may depend also on what other devices are already in use by other
    /// players.
    /// </remarks>
    public InputControlScheme SelectControlSchemeBasedOnDevice(InputDevice device)
    {
        var scheme = InputControlScheme.FindControlSchemeForControl(device, controls.asset.controlSchemes);

        if (scheme.HasValue)
        {
            return(scheme.Value);
        }

        throw new NotImplementedException();
    }
Пример #2
0
 /// <summary>
 /// Based on the choice of the given device, select an appropriate control scheme.
 /// </summary>
 /// <param name="device"></param>
 /// <returns></returns>
 /// <remarks>
 /// The chosen control scheme may depend also on what other devices are already in use by other
 /// players.
 /// </remarks>
 public InputControlScheme?SelectControlSchemeBasedOnDevice(InputDevice device)
 {
     return(InputControlScheme.FindControlSchemeForControl(device, controls.asset.controlSchemes));
 }