示例#1
0
        /// <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;
        }
示例#2
0
 /// <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)));
 }