public override bool OnGenericMotionEvent(MotionEvent e) { if (e.Source != InputSourceType.Touchscreen) { AmazonFireGameController.SetDPad(e.GetAxisValue(Axis.HatX)); AmazonFireGameController.SetLeftAnalogStick(e.GetAxisValue(Axis.X)); return(true); } else { return(false); } }
void HandleKeyPress(object sender, View.KeyEventArgs args) { Console.WriteLine(args.Event + " " + args.KeyCode + " "); // Check if the down times equals the event time. If not, then it's a long press: if (args.Event.Action == KeyEventActions.Down && args.Event.EventTime == args.Event.DownTime) { AmazonFireGameController.HandlePush(args.KeyCode); } else if (args.Event.Action == KeyEventActions.Up) { // CoinTime doesn't currently use it currently, but maybe in the future? //AmazonFireGameController.HandleRelease (args.KeyCode); } }