Share via


RawGameController.GetSwitchKind(Int32) 方法

定义

获取原始游戏控制器上指定开关的类型。

public:
 virtual GameControllerSwitchKind GetSwitchKind(int switchIndex) = GetSwitchKind;
GameControllerSwitchKind GetSwitchKind(int const& switchIndex);
public GameControllerSwitchKind GetSwitchKind(int switchIndex);
function getSwitchKind(switchIndex)
Public Function GetSwitchKind (switchIndex As Integer) As GameControllerSwitchKind

参数

switchIndex
Int32

int

要查询其类型的开关的原始游戏控制器开关数组中的索引。

返回

原始游戏控制器上给定开关的类型。

注解

此函数采用一个整数,该整数是原始游戏控制器开关数组中的索引,指向要查询的开关。 可以创建自己的开关数组,然后使用 RawGameController.GetCurrentReading 用表示每个开关状态的值填充该数组。 有关详细信息 ,请参阅原始游戏控制器

适用于

另请参阅