这就是问题所在,假设我们正在制作一个视频游戏,并且想要使用依赖注入。下面是我们所拥有的:
Game Class // This is just the code to keep track of the overall game logic
Character Class // This would be the guys in the game, good and bad guys both
Weapon Class // The weapons for the characters
所以通常当我做依赖注入时,我会将地图上的当前位置和游戏状态注入到角色中,这样我的角色就会知道在哪里创建自己
有人能解释一下这个位掩码参数如何被用来自动匹配游戏中的排他性角色吗?是否有可能自动匹配多个不同角色的玩家?
这里提到的是
您的游戏还可以使用createAutoMatchCriteria()中的createAutoMatchCriteria参数对有意在游戏中扮演特定排他性角色的自动匹配的玩家进行配对。
还有
public static Bundle createAutoMatchCriteria (int minAutoMatchPlayers,
int maxAutoMatchPlayers, long exclusiveBi