/// <summary> /// Registers the actions. /// </summary> public Input(FishingGame game) : base(game) { Register(Action, Polling.Any(Polling.One(Buttons.A), Polling.One(Buttons.Start))); Register(AltAction, Polling.One(Buttons.B)); Register(Cancel, Polling.Any(Polling.One(Buttons.B), Polling.One(Buttons.Back))); Register(Up, Polling.Any(Polling.One(Buttons.DPadUp), Polling.One(Buttons.LeftThumbstickUp))); Register(Down, Polling.Any(Polling.One(Buttons.DPadDown), Polling.One(Buttons.LeftThumbstickDown))); Register(Start, Polling.One(Buttons.Start)); Register(Buy, Polling.One(Buttons.X)); _instance = this; }
/// <summary> /// Polls for the controller with the A button pressed. /// </summary> /// <returns>True if a controller was found; otherwise, false.</returns> public bool FindActiveController() { return(FindActiveController(Polling.One(Buttons.A))); }