2个玩家在每个游戏手柄上登录游戏 [英] 2 players game with login on each gamepad

查看:110
本文介绍了2个玩家在每个游戏手柄上登录游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



是否有关于如何设置2人本地游戏的示例/教程,每个游戏都签名一个Xbox Live用户?



我可以访问两个游戏手柄,但是Windows.Gaming中存在的所有游戏手柄中的.User字段.Input.Gamepad.Gamepads指向同一个用户。另外,我不知道哪个游戏手柄正在使用已登录的播放器(我想它是第一个,但我不知道
,如果我可以依赖它)。



谢谢,

解决方案

嗨KakCAT,


你在PC或Xbox上测试吗?


在Windows 10 PC上,一次只能登录一个Xbox Live用户。 



在Xbox上,通常最好的方法是让游戏跟踪当用户选择"登录"时按下哪个控制器并跟踪用户/控制器的映射。



虽然这是使用团结,这个le可能有助于显示控制器和用户的处理方式:  https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-creators/add-multi-user-support




Hi,

is there any example/tutorial on how to setup a 2 player local game, each one signed with an Xbox Live user?

I'm able to access two gamepads, but the .User field in all the gamepads present in Windows.Gaming.Input.Gamepad.Gamepads point to the same user. Also , I can't know which gamepad is using the logged in player (I suppose it's the first one, but I don't know if I can rely on that).

thanks,

解决方案

Hi KakCAT,

Are you testing on PC or Xbox?

On Windows 10 PC, only one Xbox Live User can be signed in at a time. 

On Xbox, usually the best way is for the game to keep track of which controller got pressed when the user chose to 'Sign In' and keep track of the user/controller mapping that way.

Although this is using Unity, this article could be useful to show how controllers and users are being handled: https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-creators/add-multi-user-support


这篇关于2个玩家在每个游戏手柄上登录游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆