public Controller(int number, string name, Color color, Inputs.InputDevice device, Inputs.InputControlScheme scheme) { _name = name; _color = color; _number = number; _device = device; //_user = Inputs.Users.InputUser.CreateUserWithoutPairedDevices(); //Inputs.Users.InputUser.PerformPairingWithDevice(_device, _user); // Each player gets a separate action setup. This makes the state of actions and bindings // local to each player and also ensures we're not stepping on the action setup used by // DemoGame itself for the main menu (where we are not using control schemes and just blindly // bind to whatever devices are available locally). _scheme = scheme; _actionMap = new ActionMap(); _actionMap.bindingMask = new Inputs.InputBinding { groups = _scheme.bindingGroup }; Enable(); }
internal ControlSchemeSyntax(InputControlScheme controlScheme) { m_Asset = null; m_ControlSchemeIndex = -1; m_ControlScheme = controlScheme; }
internal ControlSchemeSyntax(InputActionAsset asset, int index) { m_Asset = asset; m_ControlSchemeIndex = index; m_ControlScheme = new InputControlScheme(); }
public static InputControlScheme OrWithOptionalDevice(this InputControlScheme scheme, string controlPath) { return(new ControlSchemeSyntax(scheme).OrWithOptionalDevice(controlPath).Done()); }
public static InputControlScheme WithRequiredDevice(this InputControlScheme scheme, string controlPath) { return(new ControlSchemeSyntax(scheme).WithRequiredDevice(controlPath).Done()); }
public static InputControlScheme WithBindingGroup(this InputControlScheme scheme, string bindingGroup) { return(new ControlSchemeSyntax(scheme).WithBindingGroup(bindingGroup).Done()); }