在 Windows Phone 7 模拟器中使用 XBOX360 pad(适用于 Windows)

发布于 2024-11-28 12:55:35 字数 261 浏览 6 评论 0原文

我想使用 XBOX360 控制器来模拟 Windows Phone 7 游戏(在 XNA 4 中创建)中的用户输入。但我无法读取手柄状态 - 属性 GamePadState.IsConnected 设置为 false,尽管我的手柄已连接且高效。我认为键盘的输入可能默认被禁用,就像键盘输入一样(向上翻页/中断激活它),但我无法找到正确的按钮/按钮组合。

我的问题:是否可以在 Windows Phone 7 游戏(XNA 4)中处理 XBOX 360 pad 输入?

I want to use XBOX360 controller to emulate user input in my Windows Phone 7 game ( created in XNA 4). But I am unable to read pad state - property GamePadState.IsConnectedis set to false, although my pad is connected and efficient. I thought that pad's input may be disabled by default, just like keyboard ones ( page up / break activate it), but I was unable to find right button / button combination.

My question: Is it possible to handle XBOX 360 pad input in windows phone 7 game ( XNA 4) ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

可是我不能没有你 2024-12-05 12:55:35

您无法在 Windows Phone 7 应用程序的上下文中使用 Xbox 360 游戏手柄 - 原因很明显(您稍后无法将其连接到物理设备)。

You cannot use the Xbox 360 gamepad in the context of a Windows Phone 7 applications - for obvious reasons (you cannot connect it to a physical device later on).

零度℉ 2024-12-05 12:55:35

GamePad 类可用于检测手机上的后退按钮是否被按下:

if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
{
  // do something      
}

我不相信它会检测实际游戏手柄上的后退按钮,而只会检测手机上的按钮。

The GamePad class can be used to detect that the Back button is pressed on the phone:

if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
{
  // do something      
}

I don't believe that will detect the back button on the actual gamepad, just the button on the phone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文